/* ============================================================
 * IVK Overview Strip — Phase 1 (1차) tile design
 * v1.2 — wider container + responsive arrow navigation
 * ============================================================
 *
 * Renders below Cover Block, above Jay's Top Picks.
 * 6 tiles horizontally scrolling with arrow nav on overflow.
 *
 * Class hierarchy (matches class-ivk-overview-renderer.php):
 *   .ivk-overview
 *     .ivk-container                  (provided by ivk-compare.css; widened here)
 *       .ivk-section-header           (provided by ivk-compare.css)
 *       .ivk-overview-strip-wrapper   (positioning context for arrows)
 *         .ivk-overview-nav-prev/next (arrow buttons; conditionally shown via JS)
 *         .ivk-overview-strip
 *           .ivk-overview-tile.ivk-overview-tile-{key}
 *             .ivk-overview-tile-head
 *               .ivk-overview-tile-icon
 *               .ivk-overview-tile-label
 *             .ivk-overview-tile-value
 *             .ivk-overview-tile-sub
 *             .ivk-overview-tile-list (ul)
 *               .ivk-overview-tag-name
 *               .ivk-overview-tag-pct
 *             .ivk-overview-newcomer-pill (Best for only)
 *
 * JS state classes (set by ivk-overview.js):
 *   .has-overflow  → arrows visible
 *   .at-start      → prev arrow hidden
 *   .at-end        → next arrow hidden
 *
 * ============================================================ */


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

.ivk-overview {
  margin: 0;
  padding: 24px 0 8px;
}

/* Override container width specifically for overview section.
* Other sections (.ivk-picks, .ivk-compare, etc.) keep default width.
* Section header still centers correctly within wider container. */
.ivk-overview .ivk-container {
  max-width: 1280px;
}


/* ── Strip wrapper (positioning context for arrows) ─────── */

.ivk-overview-strip-wrapper {
  position: relative;
  margin: 8px -16px 0;  /* match strip negative margin on mobile */
}


/* ── Strip (horizontal scroll on mobile) ────────────────── */

.ivk-overview-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scroll-padding-left: 16px;
  padding: 4px 16px 16px;
}

/* Custom scrollbar (subtle, visible only when needed) */
.ivk-overview-strip::-webkit-scrollbar {
  height: 6px;
}
.ivk-overview-strip::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
.ivk-overview-strip::-webkit-scrollbar-track {
  background: transparent;
}


/* ── Tile (flex item) ───────────────────────────────────── */

.ivk-overview-tile {
  flex: 0 0 180px;
  scroll-snap-align: start;
  background: #f7f6f3;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  box-sizing: border-box;
}


/* ── Tile header (icon + label) ─────────────────────────── */

.ivk-overview-tile-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6f6c63;
  font-weight: 500;
}

.ivk-overview-tile-icon {
  font-size: 13px;
  line-height: 1;
}

.ivk-overview-tile-label {
  line-height: 1.2;
}


/* ── Primary value (large number) ───────────────────────── */

.ivk-overview-tile-value {
  font-size: 18px;
  font-weight: 600;
  color: #1f1d19;
  line-height: 1.2;
  margin: 0;
}


/* ── Subtitle (single line context) ─────────────────────── */

.ivk-overview-tile-sub {
  font-size: 12px;
  color: #6f6c63;
  line-height: 1.45;
  margin: 0;
}

.ivk-overview-tile-sub-muted {
  color: #999592;
  font-size: 11px;
}


/* ── Tag list (Themes / Best for / Tour types / Duration buckets) ── */

.ivk-overview-tile-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ivk-overview-tile-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

.ivk-overview-tag-name {
  color: #1f1d19;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.ivk-overview-tag-pct {
  color: #6f6c63;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  flex-shrink: 0;
}


/* ── Newcomer-friendly pill (Best for only) ─────────────── */

.ivk-overview-newcomer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8f0e3;
  color: #3a5f1f;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 12px;
  align-self: flex-start;
  line-height: 1.3;
}


/* ── Tile-specific accents (subtle) ─────────────────────── */

.ivk-overview-tile-price    .ivk-overview-tile-value { color: #1f1d19; }
.ivk-overview-tile-reviews  .ivk-overview-tile-value { color: #cf8b1c; }


/* ── Arrow navigation buttons ───────────────────────────── */

.ivk-overview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  color: #1f1d19;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: none;  /* hidden by default; shown by JS when overflow */
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;  /* slight nudge to center chevron visually */
  font-family: sans-serif;
  transition: background 0.15s, box-shadow 0.15s;
}

.ivk-overview-nav-prev { left: -4px; }
.ivk-overview-nav-next { right: -4px; }

.ivk-overview-nav:hover {
  background: #f7f6f3;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.ivk-overview-nav:focus-visible {
  outline: 2px solid #cf8b1c;
  outline-offset: 2px;
}

.ivk-overview-nav:active {
  transform: translateY(-50%) scale(0.96);
}

/* Show arrows when JS detects overflow */
.ivk-overview-strip-wrapper.has-overflow .ivk-overview-nav {
  display: flex;
}

/* Hide individual arrow when at corresponding edge */
.ivk-overview-strip-wrapper.at-start .ivk-overview-nav-prev,
.ivk-overview-strip-wrapper.at-end   .ivk-overview-nav-next {
  display: none;
}


/* ── Desktop layout (≥ 768px): fit 6 tiles or scroll if narrow ── */

@media (min-width: 768px) {
  .ivk-overview {
      padding: 28px 0 12px;
  }
  .ivk-overview-strip-wrapper {
      margin: 8px 0 0;
  }
  .ivk-overview-strip {
      padding: 4px 0 16px;
      gap: 14px;
  }
  /* Tiles stretch to fill the wider container */
  .ivk-overview-tile {
      flex: 1 1 0;
      min-width: 130px;
      max-width: none;
  }
  /* Arrows slightly larger on desktop, positioned outside the strip */
  .ivk-overview-nav {
      width: 40px;
      height: 40px;
      font-size: 24px;
  }
  .ivk-overview-nav-prev { left: -20px; }
  .ivk-overview-nav-next { right: -20px; }
}


/* ── Large desktop (≥ 1024px): tighter spacing ──────────── */

@media (min-width: 1024px) {
  .ivk-overview-tile {
      padding: 16px 18px;
      min-height: 150px;
  }
  .ivk-overview-tile-value {
      font-size: 20px;
  }
}


/* ── Hide arrows on touch devices (touch scroll is natural) ── */

@media (hover: none) and (pointer: coarse) {
  .ivk-overview-strip-wrapper.has-overflow .ivk-overview-nav {
      display: none;
  }
}