/**
 * Article Forge - Custom Block Styles (Frontend)
 * 
 * Styles for KKday, Klook, Booking.com, Airbnb, and Google Maps
 * recommendation blocks rendered in WordPress posts.
 *
 * Version: 1.3.0
 */

/* ─── Base Brand Block ─────────────────────────────────────────────── */

.af-brand-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5em 0;
  padding: 0.75em 1em;
  border-radius: 8px;
  font-size: 0.95em;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  border-left-width: 4px;
  border-left-style: solid;
}

.af-brand-block:hover {
  transform: translateY(-1px);
}

.af-brand-block:active {
  transform: translateY(0);
}

/* ─── KKday ────────────────────────────────────────────────────────── */

.af-brand-kkday {
  background: linear-gradient(135deg, #e6faf8 0%, #f0fdfb 100%);
  border-left-color: #00c4b3;
}

.af-brand-kkday:hover {
  box-shadow: 0 2px 8px rgba(0, 196, 179, 0.25);
  border-left-color: #009688;
}

.af-brand-kkday .af-brand-label {
  color: #00a89d;
  font-weight: 700;
}

.af-brand-kkday .af-brand-keyword {
  color: #00c4b3;
  font-weight: 500;
}

/* ─── Klook ────────────────────────────────────────────────────────── */

.af-brand-klook {
  background: linear-gradient(135deg, #fff3ee 0%, #fff8f5 100%);
  border-left-color: #ff5722;
}

.af-brand-klook:hover {
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.25);
  border-left-color: #e64a19;
}

.af-brand-klook .af-brand-label {
  color: #e64a19;
  font-weight: 700;
}

.af-brand-klook .af-brand-keyword {
  color: #ff5722;
  font-weight: 500;
}

/* ─── Booking.com ──────────────────────────────────────────────────── */

.af-brand-booking {
  background: linear-gradient(135deg, #e8eef7 0%, #f0f4fa 100%);
  border-left-color: #003580;
}

.af-brand-booking:hover {
  box-shadow: 0 2px 8px rgba(0, 53, 128, 0.25);
  border-left-color: #002a66;
}

.af-brand-booking .af-brand-label {
  color: #003580;
  font-weight: 700;
}

.af-brand-booking .af-brand-keyword {
  color: #003580;
  font-weight: 600;
}

/* ─── Airbnb ───────────────────────────────────────────────────────── */

.af-brand-airbnb {
  background: linear-gradient(135deg, #ffeeef 0%, #fff5f5 100%);
  border-left-color: #FF5A5F;
}

.af-brand-airbnb:hover {
  box-shadow: 0 2px 8px rgba(255, 90, 95, 0.25);
  border-left-color: #e0484d;
}

.af-brand-airbnb .af-brand-label {
  color: #FF5A5F;
  font-weight: 700;
}

.af-brand-airbnb .af-brand-keyword {
  color: #FF5A5F;
  font-weight: 500;
}

/* ─── Product Links Container ──────────────────────────────────────── */

.af-product-links {
  margin: 1.25em 0;
  display: flex;
  flex-direction: column;
  gap: 0.375em;
}

.af-product-links-hotel {
  margin: 1.25em 0;
  display: flex;
  flex-direction: column;
  gap: 0.375em;
}

/* ─── Google Maps Place Card ───────────────────────────────────────── */

.af-place-card {
  display: flex;
  flex-direction: column;
  margin: 1em 0;
  padding: 14px;
  border: 1px solid #dadce0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.af-place-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-color: #1a73e8;
}

.af-place-card .af-place-photo {
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #e8eaed;
  width: 100%;
  height: 160px;
}

.af-place-card .af-place-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.af-place-card .af-place-info {
  flex: 1;
  min-width: 0;
  padding: 12px 0 0 0;
}

.af-place-card .af-place-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.af-place-card .af-place-name-text {
  color: #1a0dab;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  line-height: 1.3;
}

.af-place-card .af-place-rating {
  color: #f9ab00;
  font-size: 14px;
  margin-left: 6px;
}

.af-place-card .af-place-address {
  margin-top: 4px;
  font-size: 13px;
  color: #70757a;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.af-place-card .af-place-website {
  margin-top: 6px;
  font-size: 13px;
}

.af-place-card .af-place-website a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
}

.af-place-card .af-place-website a:hover {
  text-decoration: underline;
}

/* Google Maps simple link */
.af-google-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4em 0.75em;
  background: #f1f8ff;
  border-radius: 6px;
  text-decoration: none;
  color: #1a73e8;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.af-google-map-link:hover {
  background: #dbeafe;
}

/* ─── Brand Icon Sizing ────────────────────────────────────────────── */

.af-brand-block .af-brand-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.af-brand-block .af-brand-icon img,
.af-brand-block .af-brand-icon svg {
  width: 20px;
  height: 20px;
}

/* ─── Responsive: Desktop ──────────────────────────────────────────── */

@media (min-width: 640px) {
  .af-place-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
  }

  .af-place-card .af-place-photo {
    width: 120px;
    height: 120px;
  }

  .af-place-card .af-place-info {
    padding: 0;
  }
}

/* ─── Dark Mode Support ────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  .af-brand-kkday {
    background: linear-gradient(135deg, #0d2926 0%, #0f302c 100%);
  }

  .af-brand-klook {
    background: linear-gradient(135deg, #2a1810 0%, #301c14 100%);
  }

  .af-brand-booking {
    background: linear-gradient(135deg, #0d1520 0%, #101a28 100%);
  }

  .af-brand-airbnb {
    background: linear-gradient(135deg, #2a1011 0%, #301415 100%);
  }

  .af-place-card {
    background: #1e1e1e;
    border-color: #3a3a3a;
  }

  .af-place-card:hover {
    border-color: #4a90d9;
  }

  .af-place-card .af-place-name-text {
    color: #8ab4f8;
  }

  .af-place-card .af-place-address {
    color: #9aa0a6;
  }

  .af-google-map-link {
    background: #1a2332;
    color: #8ab4f8;
  }

  .af-google-map-link:hover {
    background: #1e2d42;
  }
}

/* ─── Print Styles ─────────────────────────────────────────────────── */

@media print {
  .af-brand-block {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }

  .af-place-card {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* ─── Section Wrappers ─────────────────────────────────────────────── */

.af-block-section-intro,
.af-block-section-transportation,
.af-block-section-attractions,
.af-block-section-food,
.af-block-section-accommodation,
.af-block-section-products,
.af-block-section-tips,
.af-block-section-conclusion,
.af-block-section-seasonal-events,
.af-block-section-overview,
.af-block-section-main-content,
.af-block-section-analysis,
.af-block-section-comparison,
.af-block-section-how-to,
.af-block-section-resources,
.af-block-section-general {
  margin: 0;
  padding: 0;
}
