/* ============================================================
   BOOKING PAGE — Stepper, trip bar, panels (1-4), seat map,
   passenger forms, sidebar, payment QR, success
   ============================================================ */

/* ============================================================
   STEPPER (8 visual steps, mapped to 4 logic panels)
   ============================================================ */
.stepper { background: #fff; border-bottom: 1px solid var(--border); padding: 16px 0; }
.stepper-inner { display: flex; align-items: center; justify-content: center; overflow-x: auto; padding-bottom: 2px; }
.step-item { display: flex; flex-direction: column; align-items: center; min-width: 90px; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; border: 2px solid var(--border);
  background: #fff; color: var(--muted); transition: all 0.2s;
}
.step-item.done .step-circle { background: var(--blue); border-color: var(--blue); color: #fff; }
.step-item.active .step-circle { background: var(--blue); border-color: var(--blue); color: #fff; }
.step-label { font-size: 11.5px; margin-top: 5px; color: var(--muted); text-align: center; white-space: nowrap; }
.step-item.active .step-label { color: var(--blue); font-weight: 600; }
.step-item.done .step-label { color: var(--text); }
.step-line { flex: 1; height: 2px; background: var(--border); margin-bottom: 20px; min-width: 16px; max-width: 40px; transition: background 0.2s; }
.step-line.done { background: var(--blue); }

/* ============================================================
   TRIP SUMMARY BAR (shown from panel 2 onwards)
   ============================================================ */
.trip-bar {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 24px; margin: 16px auto;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.trip-city { font-weight: 800; font-size: 20px; color: var(--primary); }
.trip-port { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.trip-swap { color: var(--blue); font-size: 20px; }
.trip-info { display: flex; align-items: center; gap: 8px; }
.trip-info-label { font-size: 13px; font-weight: 600; }
.trip-info-sub { font-size: 12px; color: var(--muted); }

/* ============================================================
   STEP-PANEL system (4 panels, app.js compatible)
   ============================================================ */
.step-panel { display: block; }
.step-panel.hidden { display: none !important; }

/* ============================================================
   PANEL 1 — HERO SEARCH (Step 1+2)
   Same look as homepage hero but standalone page
   ============================================================ */
#step-panel-1 .hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14,165,233,0.40) 0%, rgba(3,105,161,0.55) 60%, rgba(30,58,138,0.75) 100%),
    url('/assets/img/hero-booking.jpg') center / cover no-repeat;
  /* Ensure the image covers the full hero height — no awkward gaps */
  background-size: cover;
  background-position: center center;
  min-height: 540px;
}
#step-panel-1 .hero::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg,transparent,transparent 40px,rgba(255,255,255,0.03) 40px,rgba(255,255,255,0.03) 80px);
  pointer-events: none;
}
#step-panel-1 .hero-content {
  position: relative; z-index: 1; max-width: 1100px;
  margin: 0 auto; padding: 150px 24px 150px 0px;
}

.search-card {
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-radius: 16px; padding: 28px 32px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  max-width: 700px; margin: 0 auto;
}
.search-card-title { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.search-card-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

.trip-type-row { display: flex; gap: 8px; margin-bottom: 18px; }
.trip-type-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 99px;
  background: #fff; border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all 0.15s;
}
.trip-type-btn .trip-type-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.trip-type-btn.active { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.trip-type-btn.active .trip-type-dot { border-color: var(--blue); background: var(--blue); }
.trip-type-btn.active .trip-type-dot::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

.search-form-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr 1fr;
  gap: 12px; align-items: end; margin-bottom: 16px;
  position: relative;
}
.search-form-row.with-return {
  grid-template-columns: 1fr auto 1fr 1fr 1fr;
}
.search-form-row.no-return {
  grid-template-columns: 1fr auto 1fr 1fr;
}

.search-field {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 8px 12px;
  transition: border-color 0.15s;
}
.search-field:focus-within { border-color: var(--blue); }
.search-field-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.search-field-icon { display: flex; align-items: center; gap: 8px; }
.search-field-control {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--text);
  padding: 4px 0; min-width: 0; width: 100%;
}
.search-field-control::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.5; }
.search-field-control:disabled, .search-field-control.disabled { color: #cbd5e1; cursor: not-allowed; }

.search-swap {
  display: flex;
  align-items: center;          /* center vertically with adjacent fields */
  justify-content: center;
  /* padding-top: 18px;  */
  height: 100%;
  width: 100%;
}
.search-swap-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-light); border: 1.5px solid var(--blue-border);
  color: var(--blue); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
  transform: rotate(90deg);
}
.search-swap-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.search-btn {
  width: 100%; background: var(--blue-dark); color: #fff;
  border: none; padding: 14px; border-radius: 12px;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: background 0.15s;
}
.search-btn:hover { background: var(--primary); }

#step-panel-1 .hero-features {
  background: transparent;
  padding: 18px 0 24px;
  margin-top: 0;
}
#step-panel-1 .hero-features-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
#step-panel-1 .hero-feature {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.95);
  flex: 1 1 calc(25% - 18px);
  min-width: 180px;
}
#step-panel-1 .hero-feature-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.18); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
#step-panel-1 .hero-feature strong { font-size: 13.5px; font-weight: 600; display: block; color: #fff; }
#step-panel-1 .hero-feature small { font-size: 11.5px; opacity: 0.75; display: block; }

/* ============================================================
   BOOKING LAYOUT (Panels 2, 3, 4 — main content + sidebar)
   ============================================================ */
/* ═══ Booking layout ═══
 * Default (oneway): 2 columns, sidebar is sticky on the right.
 *   ┌──────────────┬─────────┐
 *   │ booking-     │ detail- │  (sidebar position: sticky)
 *   │   content    │ sidebar │
 *   ├──────────────┴─────────┤
 *   │ cta-section            │
 *   └────────────────────────┘
 *
 * Roundtrip mode: 1 column, sidebar moves below content but BEFORE cta-section.
 *   ┌────────────────────────┐
 *   │ booking-content        │
 *   ├────────────────────────┤
 *   │ detail-sidebar         │  (full width below)
 *   ├────────────────────────┤
 *   │ cta-section            │
 *   └────────────────────────┘
 */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-areas:
    "content sidebar"
    "cta     cta";
  gap: 24px;
  margin-top: 24px;
}
.booking-layout > .booking-content   { grid-area: content; min-width: 0; }
.booking-layout > .detail-sidebar    { grid-area: sidebar; }
.booking-layout > .cta-section       { grid-area: cta; }

/* Sidebar sticky in oneway booking-layout.
 * The grid has 2 rows: row 1 (content+sidebar) + row 2 (cta full-width).
 * `position: sticky` keeps the sidebar pinned while user scrolls through content.
 * When the bottom of the grid (cta) reaches the sticky offset, the browser
 * naturally "releases" the sticky element so it scrolls with cta — exactly
 * the "stop sticky on cta" behavior we want. */
.booking-layout > .detail-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  /* Limit height to viewport so very tall sidebars get an internal scrollbar
     instead of running off screen. Calc keeps a small visual gap at top. */
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

/* Roundtrip: collapse to single column, sidebar below content, cta last */
.booking-layout.roundtrip-mode {
  grid-template-columns: 1fr;
  grid-template-areas:
    "content"
    "sidebar"
    "cta";
}
.booking-layout.roundtrip-mode > .detail-sidebar {
  position: static;
  max-height: none;
  overflow: visible;
  width: 100%;
}

@media (max-width: 900px) {
  .booking-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "sidebar"
      "cta";
  }
  .booking-layout > .detail-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* ============================================================
   PANEL 2 — VOYAGE LIST (Step 3) — supports roundtrip (2 lists)
   ============================================================ */
.voyage-panels { display: flex; flex-direction: column; gap: 20px; }

.voyage-panel { background: #fff; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.voyage-panel.hidden { display: none; }

.voyage-panel-hdr {
  padding: 14px 20px; display: flex; justify-content: space-between;
  align-items: center; border-bottom: 1px solid var(--border);
}
.voyage-panel-hdr.out { background: var(--blue-light); border-left: 4px solid var(--blue); }
.voyage-panel-hdr.ret { background: #fff7ed; border-left: 4px solid var(--orange); }
.vp-route { font-weight: 700; font-size: 15px; color: var(--primary); }
.vp-date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.btn-change-search {
  background: none; border: none; color: var(--blue);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 12px;
}
.btn-change-search:hover { text-decoration: underline; }

.vp-loading {
  padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.vp-loading.hidden { display: none; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ferry cards (instead of table — more responsive) */
#voyage-list-out, #voyage-list-ret { padding: 12px; }
.voyage-card {
  display: grid; grid-template-columns: 1fr auto auto auto auto;
  gap: 16px; align-items: center;
  padding: 16px; border: 1.5px solid var(--border);
  border-radius: 12px; margin-bottom: 10px;
  background: #fff; transition: all 0.15s;
}
.voyage-card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.voyage-card.voyage-card-selected { border-color: var(--blue); background: var(--blue-light); }
.voyage-card.voyage-card-disabled { opacity: 0.55; pointer-events: none; }

/* App.js-rendered card structure: .vc-boat / .vc-time / .vc-remain / .vc-price / .vc-action */
.vc-boat { min-width: 0; }
.vc-boat-name { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.vc-boat-type { font-size: 12px; color: var(--muted); }

.vc-time {
  text-align: center; min-width: 80px;
  padding: 8px 12px; background: var(--blue-light);
  border-radius: 8px;
  font-size: 18px; font-weight: 800; color: var(--primary);
}

.vc-remain { font-size: 12px; color: var(--success); font-weight: 700; }
.vc-remain.remain-low { color: var(--orange); }
.vc-remain.remain-zero { color: var(--red); }

.vc-price { text-align: right; font-size: 16px; font-weight: 800; }

.vc-action {}

/* Mobile: stack boat info on top row, then [time | seats | price | btn] inline */
@media (max-width: 640px) {
  #voyage-list-out, #voyage-list-ret { padding: 8px; }
  .voyage-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }
  .vc-boat {
    grid-column: 1 / -1;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
  }
  /* Wrap time/seats/price/action in a flex row for inline layout */
  .vc-time, .vc-remain, .vc-price, .vc-action {
    grid-column: auto;
  }
  .voyage-card {
    grid-template-areas:
      "boat   boat   boat   boat"
      "time   remain price  action";
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
  }
  .vc-boat   { grid-area: boat; }
  .vc-time   {
    grid-area: time;
    min-width: 0;
    padding: 4px 10px;
    font-size: 14px;
  }
  .vc-remain { grid-area: remain; text-align: center; font-size: 11px; }
  .vc-price  { grid-area: price; font-size: 14px; }
  .vc-action { grid-area: action; }
  .vc-action .btn-choose-voyage,
  .vc-action button {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.badge-sold {
  background: var(--bg); color: var(--muted);
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
}

.voyage-empty {
  padding: 40px 20px; text-align: center;
  color: var(--muted); font-size: 14px;
}

.seat-load-error {
  padding: 30px 20px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.seat-load-error span { font-size: 36px; }

/* Legacy voyage-card-* aliases (kept for forward compat) */
.voyage-card-time { text-align: center; min-width: 80px; padding: 8px 12px; background: var(--blue-light); border-radius: 8px; }
.voyage-card-time strong { font-size: 18px; font-weight: 800; color: var(--primary); display: block; }
.voyage-card-time small { font-size: 11px; color: var(--muted); }
.voyage-card-info {}
.voyage-card-boat { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.voyage-card-boat-icon { width: 32px; height: 22px; background: linear-gradient(90deg,#0369a1,#2563eb); border-radius: 4px; flex-shrink: 0; }
.voyage-card-meta { font-size: 12px; color: var(--muted); }
.voyage-card-seats { font-size: 12px; }
.voyage-card-seats.few { color: var(--orange); font-weight: 700; }
.voyage-card-seats.many { color: var(--success); font-weight: 700; }
.voyage-card-price { text-align: right; }
.voyage-card-price strong { font-size: 16px; font-weight: 800; color: var(--blue); display: block; }
.voyage-card-price small { font-size: 11px; color: var(--muted); }

.btn-choose-voyage {
  background: var(--blue-dark); color: #fff; border: none;
  padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-choose-voyage:hover { background: var(--primary); }
.voyage-card.voyage-card-selected .btn-choose-voyage { background: var(--success); }

/* Date scroll bar (built by app.js — appendDateScrollToPanel) */
.inline-date-scroll {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  padding: 14px 0;
  margin-top: 4px;
}
.inline-ds-bar, .date-scroll-bar {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.inline-ds-bar::-webkit-scrollbar, .date-scroll-bar::-webkit-scrollbar { height: 6px; }
.inline-ds-bar::-webkit-scrollbar-thumb, .date-scroll-bar::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 99px;
}

.inline-ds-btn, .date-scroll-btn {
  flex-shrink: 0;
  scroll-snap-align: start;
  min-width: 64px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.inline-ds-btn:hover, .date-scroll-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-1px);
}
.inline-ds-btn.active, .date-scroll-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}
.ds-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inline-ds-btn.active .ds-day, .date-scroll-btn.active .ds-day { color: rgba(255,255,255,0.9); }
.ds-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.inline-ds-btn.active .ds-date, .date-scroll-btn.active .ds-date { color: #fff; }

/* Legacy aliases (kept for backward compat) */
.date-scroll {
  display: flex; gap: 8px; padding: 12px; overflow-x: auto;
  border-bottom: 1px solid var(--border); background: #fafbfc;
}
.date-scroll-item {
  flex-shrink: 0; padding: 8px 12px; border-radius: 8px;
  background: #fff; border: 1.5px solid var(--border);
  font-size: 12px; cursor: pointer; text-align: center; min-width: 60px;
  transition: all 0.15s;
}
.date-scroll-item:hover { border-color: var(--blue); }
.date-scroll-item.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.date-scroll-item strong { display: block; font-size: 14px; font-weight: 800; }
.date-scroll-item small { font-size: 10px; opacity: 0.8; }

/* ============================================================
   PANEL 3 — SEAT + FORMS + CONFIRM (sub-steps 4, 5, 6)
   ============================================================ */
.step3-nav-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 16px; flex-wrap: wrap;
}
.btn-back-voyages {
  background: none; border: none; color: var(--blue);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0;
}
.btn-back-voyages:hover { text-decoration: underline; }
.step3-nav-info { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-info-chip {
  padding: 4px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 600;
}
.nav-info-chip.out { background: var(--blue-light); color: var(--blue); }
.nav-info-chip.ret { background: #ffedd5; color: var(--orange); }

/* Seat panels — stacked vertical when oneway (only out shows); side-by-side when roundtrip */
.seat-panels { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }

/* Roundtrip with both panels visible: lay them side-by-side.
   The sidebar has been moved below by .booking-layout.roundtrip-mode,
   so the main content area has full width to fit two seat grids. */
.seat-panels.dual-panels {
  flex-direction: row;
  gap: 16px;
}
.seat-panels.dual-panels .seat-panel {
  flex: 1 1 0;
  min-width: 0;
}

/* Mobile: stack vertically anyway */
@media (max-width: 900px) {
  .seat-panels.dual-panels { flex-direction: column; }
}
.seat-panel { background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 20px; }
.seat-panel.hidden { display: none; }

.seat-panel-hdr {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.seat-panel-hdr.out { border-left: 4px solid var(--blue); padding-left: 12px; }
.seat-panel-hdr.ret { border-left: 4px solid var(--orange); padding-left: 12px; }
.sp-route { font-weight: 700; font-size: 14px; color: var(--primary); }
.sp-info { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sp-count { font-size: 13px; font-weight: 600; color: var(--blue); }

.seat-legend-compact { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.leg-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.leg-dot { width: 14px; height: 14px; border-radius: 4px; }
.leg-dot.avail { background: #fff; border: 1px solid var(--border); }
.leg-dot.booked { background: #e2e8f0; border: 1px solid #cbd5e1; }
.leg-dot.chosen { background: var(--blue); }
.leg-dot.vip-dot { background: #fef9ee; border: 1px solid #fcd34d; }

/* ════════════════════════════════════════════════════════════
   SEAT MAP — flexbox row layout matching app.js render output
   Each row uses a fixed cell width (35px) to align cols.
   ════════════════════════════════════════════════════════════ */
.seat-map-wrap {
  background: #f0f7ff; border-radius: 12px; padding: 16px;
  border: 1px solid var(--blue-border); min-height: 200px;
  min-width: 0;        /* allow shrink in flex parent */
}

.seat-section {
  background: #fff; border-radius: 10px; padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  /* Don't show scrollbar when content fits — only when overflowing */
}
.seat-section:last-child { margin-bottom: 0; }

/* Scrollbar styling (only visible when content overflows) */
.seat-section { scrollbar-width: thin; }
.seat-section::-webkit-scrollbar { height: 6px; }
.seat-section::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.seat-section::-webkit-scrollbar-thumb:hover { background: var(--blue-border); }

/* Allow horizontal scroll only if content is wider than container */
@media (max-width: 1100px) {
  .seat-section { overflow-x: auto; }
}

.seat-section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.seat-section-title {
  font-size: 13px; font-weight: 800; color: var(--primary);
  margin: 0; letter-spacing: 0.3px;
}
.seat-section-count { font-size: 12px; color: var(--muted); }

/* When 2 seat panels are shown side-by-side (roundtrip on desktop),
   the available width per panel is roughly 50%. The seat grid
   has fixed 32px cells × ~13 cols + gaps = ~480px which often
   exceeds the panel width. Allow horizontal scroll inside each
   seat-section in this case so the grid doesn't break out.

   IMPORTANT: this only applies on desktop (>900px). On mobile
   (≤900px) the panels stack vertically (flex-direction:column from
   the rule above), each takes full width, and we must NOT clip
   the seat grid — otherwise the seat picker disappears entirely. */
@media (min-width: 901px) {
  .seat-panels.dual-panels .seat-section {
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .seat-panels.dual-panels .seat-section::-webkit-scrollbar { height: 6px; }
  .seat-panels.dual-panels .seat-section::-webkit-scrollbar-thumb {
    background: var(--border); border-radius: 99px;
  }
  .seat-panels.dual-panels .seat-section::-webkit-scrollbar-thumb:hover {
    background: var(--blue-border);
  }

  /* Make the seat panel itself a min-width:0 flex item so it can shrink
     below its content's intrinsic size — required for overflow-x:auto to
     actually clip the inner grid. */
  .seat-panels.dual-panels .seat-panel {
    min-width: 0;
    overflow: hidden;
  }
}

/* On mobile: seat-section needs horizontal scroll to fit the wide grid
   when device width < grid width. Panel itself is full-width column. */
@media (max-width: 900px) {
  .seat-section {
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .seat-section::-webkit-scrollbar { height: 6px; }
  .seat-section::-webkit-scrollbar-thumb {
    background: var(--border); border-radius: 99px;
  }
}

.seat-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: max-content;   /* let row dictate width so columns align */
}

.seat-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
}

.seat-col-labels {
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}

/* All cells share the same width so columns align across rows */
.seat-row-label,
.seat-col-label,
.seat-btn,
.seat,
.seat-empty-cell {
  flex: 0 0 32px;    /* fixed width */
  width: 32px;
  height: 30px;
  box-sizing: border-box;
}
.seat-gap   { flex: 0 0 14px; }
.seat-aisle { flex: 0 0 8px; }

.seat-row-label {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: var(--muted);
}
.seat-col-label {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--muted); font-weight: 600;
}
.seat-empty-cell { /* placeholder for missing col */ }

/* Seat buttons */
.seat-btn, .seat {
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 9.5px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  transition: all 0.1s; user-select: none;
  padding: 0;
  font-family: inherit;
}
.seat-btn.available, .seat.available {
  background: #fff;
  border: 1.5px solid var(--blue);     /* clear blue border = "available" */
  color: var(--primary);
  font-weight: 700;
}
.seat-btn.available:hover, .seat.available:hover {
  border-color: var(--blue);
  background: var(--blue-light);
  transform: scale(1.08); z-index: 2;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.25);
}
.seat-btn.taken, .seat.taken,
.seat-btn.booked, .seat.booked {
  background: #e2e8f0 !important; color: #94a3b8 !important; cursor: not-allowed; border-color: #cbd5e1 !important;
}

.seat-btn.held { background: #fef3c7; color: #92400e; cursor: not-allowed; border-color: #fcd34d; }
.seat-btn.selected, .seat-btn.chosen, .seat.selected {
  background: var(--blue); color: #fff; border-color: var(--blue);
}
.seat-btn.vip, .seat.vip {
  background: #fef9ee; color: #92400e; border-color: #fcd34d;
}
.seat-btn.vip.selected, .seat-btn.vip.chosen, .seat.vip.selected {
  background: var(--blue); color: #fff; border-color: var(--blue);
}

.seat-summary {
  margin-top: 12px; padding: 10px 14px; background: var(--blue-light);
  border-radius: 8px; font-size: 12px; color: var(--primary);
}
.seat-summary.hidden { display: none; }

/* Selected seat tags inside seat-summary — proper spacing between chips */
.seat-summary .seat-tag,
.seat-tag {
  display: inline-flex;
  align-items: center;
  margin: 4px 6px 4px 0;       /* explicit gap between tags */
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  border: 1px solid;
  background: #fff;
}
.seat-tag-eco {
  background: var(--blue-light);
  color: var(--primary);
  border-color: var(--blue-border);
}
.seat-tag-vip {
  background: #fef9ee;
  color: #92400e;
  border-color: #fcd34d;
}
.seat-error {
  text-align: center; padding: 30px; color: var(--muted); font-size: 13px;
}

/* Floor tabs (multi-floor boats) */
.floor-tabs {}
.floor-tab-bar {
  display: flex; gap: 4px; margin-bottom: 12px;
  padding: 4px; background: var(--bg); border-radius: 8px;
}
.floor-tab-btn {
  flex: 1; padding: 6px 12px; border-radius: 6px; border: none;
  background: transparent; font-size: 12px; font-weight: 600;
  color: var(--muted); cursor: pointer; font-family: inherit;
}
.floor-tab-btn.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.floor-tab-content { display: none; }
.floor-tab-content.active { display: block; }

/* Annotations (WC, exits, stairs, etc.) — positioned via inline margin-left */
.annot-wrap {
  margin-bottom: 10px;
  background: #fafbfc; border-radius: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--border);
}
.annot-row {
  display: flex; align-items: center;
  margin-bottom: 4px; min-height: 22px;
}
.annot-row:last-child { margin-bottom: 0; }
.annot-cell {
  height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.3px;
  flex-shrink: 0;
}
.annot-wc    { background: #fee2e2; color: #b91c1c; }
.annot-stair { background: #fef3c7; color: #92400e; }
.annot-exit  { background: #d1fae5; color: #065f46; }
.annot-vip   { background: #fef9ee; color: #92400e; border: 1px dashed #fcd34d; }
.annot-eco   { background: var(--blue-light); color: var(--blue); border: 1px dashed var(--blue-border); }
.annot-info  { background: #f1f5f9; color: var(--muted); }

/* Float seat-bottom decorations (legacy — for any HTML that still uses them) */
.seat-bottom { display: flex; justify-content: space-between; margin-top: 14px; padding: 0 30px; }
.seat-wc { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.seat-door { text-align: center; font-size: 11px; color: var(--muted); }
.seat-door-icon { font-size: 20px; }

/* ---- Roundtrip 2-block info row ---- */
.rt-info-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 16px;
}
.rt-info-row.hidden { display: none; }
.rt-info-block {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
}
.rt-info-block:nth-child(1) { border-left: 4px solid var(--blue); }
.rt-info-block:nth-child(2) { border-left: 4px solid var(--orange); }
.rt-info-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.rt-voyage-name { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.rt-voyage-detail { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rt-seats { font-size: 12px; color: var(--blue); font-weight: 600; }

/* ---- Buyer + Pax info cards ---- */
.info-card {
  background: #fff; border-radius: 12px; border: 1px solid var(--border);
  padding: 20px; margin-bottom: 16px;
}
.info-card-title {
  font-weight: 700; font-size: 15px; color: var(--primary);
  margin-bottom: 14px; display: flex; align-items: center;
}

.pax-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pax-form-grid .form-group { margin-bottom: 0; }
.pax-form-grid .form-group.span-2 { grid-column: span 2; }

/* Invoice toggle */
.invoice-toggle-wrap { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.invoice-switch-label {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 12px; border-radius: 10px; background: var(--bg);
}
.invoice-switch-icon {
  width: 36px; height: 36px; border-radius: 8px; background: var(--blue-light);
  display: flex; align-items: center; justify-content: center; color: var(--blue);
  flex-shrink: 0;
}
.invoice-switch-text { font-weight: 600; font-size: 13px; color: var(--text); }
.invoice-switch-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.toggle-switch {
  width: 40px; height: 22px; border-radius: 99px;
  background: var(--border); position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.on { background: var(--blue); }
.toggle-switch.on::after { transform: translateX(18px); }

/* Passenger sections (out + ret stacked vertical) */
.pax-section { margin-bottom: 20px; }
.pax-section:last-child { margin-bottom: 0; }
.pax-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  border: 1px solid;
}
.pax-section-header.out {
  background: var(--blue-light); color: var(--primary); border-color: var(--blue-border);
}
.pax-section-header.ret {
  background: #fff7ed; color: #9a3412; border-color: #fed7aa;
}
.pax-section-icon { font-size: 16px; }
.pax-section-title { font-weight: 700; }
.pax-section-count { margin-left: auto; font-size: 12px; font-weight: 500; opacity: 0.85; }

/* Same-pax banner (top of return section) */
.same-pax-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid var(--orange);
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.same-pax-banner:hover { background: #fff7ed; }
.same-pax-banner input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--orange);
  cursor: pointer; flex-shrink: 0;
}
.same-pax-banner-text { flex: 1; }
.same-pax-banner-text strong {
  display: block; font-size: 13.5px; color: var(--text); margin-bottom: 2px;
}
.same-pax-banner-text small {
  display: block; font-size: 12px; color: var(--muted); line-height: 1.4;
}

/* Direction dots (replaces 🔵 / 🟠 emoji) */
.dot-out, .dot-ret {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: -1px;
  margin-right: 6px;
  flex-shrink: 0;
}
.dot-out { background: var(--blue); box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.18); }
.dot-ret { background: var(--orange); box-shadow: 0 0 0 2px rgba(234,88,12,0.18); }

/* SVG icon classes (replaces emoji) — set color via CSS, size via font-size */
.icn {
  display: inline-block;
  width: 1em; height: 1em;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icn-lg { width: 1.2em; height: 1.2em; vertical-align: -0.2em; }
.pax-same-notice {
  background: linear-gradient(90deg, #fff7ed, #fff);
  border-left: 3px solid var(--orange);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  color: #9a3412;
}
.pax-same-notice strong { color: var(--text); font-weight: 700; }

/* 2-column pax card layout (≥3 HK for oneway, ≥2 HK for roundtrip).
   Header & same-pax-banner span both columns, cards lay out 2-up. */
@media (min-width: 900px) {
  .pax-section.pax-multi-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .pax-section.pax-multi-col .pax-section-header,
  .pax-section.pax-multi-col .same-pax-banner {
    grid-column: 1 / -1;
  }
}

/* Passenger card */
.passenger-card { border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 14px; background: #fff; }
.passenger-card.passenger-card-ret { border-left: 4px solid var(--orange); }
.passenger-card.passenger-card-out { border-left: 4px solid var(--blue); }
.passenger-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.passenger-title { font-weight: 700; font-size: 14px; color: var(--primary); }
.passenger-seat-badge {
  background: var(--blue); color: #fff;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.radio-group { display: flex; gap: 16px; padding-top: 8px; }
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.radio-label input { display: none; }
.radio-dot {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.radio-dot.checked { border-color: var(--blue); background: var(--blue); }
.radio-dot.checked::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

.step-num-badge {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue); display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}

/* ---- CTA bar (bottom of panel 3) ---- */
.cta-total-bar {
  position: sticky; bottom: 0; background: #fff;
  border-top: 1px solid var(--border); padding: 14px 20px;
  margin-top: 20px; border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  display: flex; justify-content: space-between; align-items: center;
  z-index: 10;
}
.cta-total-info .cta-total-label { font-size: 12px; color: var(--muted); }
.cta-total-info .cta-total-amount { font-size: 22px; font-weight: 900; color: var(--blue); font-variant-numeric: tabular-nums; }
.btn-cta-confirm {
  background: var(--blue-dark); color: #fff; border: none;
  padding: 12px 28px; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.btn-cta-confirm:hover:not(:disabled) { background: var(--primary); }
.btn-cta-confirm:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* ============================================================
   SIDEBAR (right column, panels 3 & 4)
   ============================================================ */
.detail-sidebar { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.detail-sidebar h3 { font-size: 16px; margin-bottom: 14px; }
.detail-section { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 14px; }
.detail-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.detail-section-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.detail-row { display: flex; gap: 8px; margin-bottom: 6px; font-size: 13px; line-height: 1.5; }
.detail-row strong { font-weight: 600; }
.detail-total { display: flex; justify-content: space-between; padding-top: 10px; border-top: 2px solid var(--border); }
.detail-total-label { font-size: 14px; font-weight: 700; }
.detail-total-value { font-size: 16px; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.sidebar-promo { background: var(--blue-light); border-radius: 10px; padding: 14px; margin-top: 14px; text-align: center; }
.sidebar-promo h4 { font-size: 13px; font-weight: 600; color: var(--primary); margin-top: 6px; }
.sidebar-promo p { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Empty state */
.sidebar-empty-msg { font-size: 13px; color: var(--muted); padding: 4px 0; }

/* ── Sidebar voyage block — prominent date/route/ship/time ── */
.sidebar-voyage-leg-block {
  background: linear-gradient(135deg, var(--blue-light) 0%, #ffffff 100%);
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.sidebar-voyage-leg-block:last-child { margin-bottom: 0; }
.sidebar-voyage-leg-chip {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
  margin-bottom: 8px;
}
.sidebar-voyage-leg-chip.out { background: var(--blue); color: #fff; }
.sidebar-voyage-leg-chip.ret { background: var(--orange); color: #fff; }

.sidebar-voyage-date-big {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}
.sidebar-voyage-route {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.sidebar-voyage-boat {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 4px;
}
.sidebar-voyage-time {
  font-size: 13px;
  font-weight: 700;
  color: #ea580c;     /* orange — stand out */
}

/* ── Sidebar seat list — bold seat number, colored class chip ── */
.sb-seat-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.sb-seat-row:last-child { border-bottom: none; }
.sb-seat-nm {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
  min-width: 44px;
}
.sb-seat-cls {
  font-size: 10.5px; font-weight: 800;
  padding: 2px 8px; border-radius: 99px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.sb-seat-cls.eco {
  background: var(--blue-light);
  color: var(--primary);
  border: 1px solid var(--blue-border);
}
.sb-seat-cls.vip {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
}
.sb-seat-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.sidebar-leg-divider {
  font-size: 12px; font-weight: 700;
  color: var(--muted);
  padding: 8px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.sidebar-leg-divider:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.sidebar-harbor-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; margin-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.sidebar-harbor-label { color: #ea580c; font-weight: 600; }
.sidebar-harbor-amount { font-weight: 700; color: #ea580c; font-variant-numeric: tabular-nums; }

/* ============================================================
   PANEL 4 — CONFIRM SUMMARY (Step 6)
   ============================================================ */
.confirm-block { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.confirm-block:last-of-type { border-bottom: none; }
.confirm-block.hidden { display: none; }
.confirm-block h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }

.table-info { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-info th { text-align: left; padding: 6px 10px 6px 0; font-weight: 600; color: var(--muted); width: 110px; vertical-align: top; }
.table-info td { padding: 6px 0; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table-wrap th { background: var(--bg); padding: 8px 10px; text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); }
.table-wrap td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table-wrap tfoot td { background: var(--bg); }

.time-badge { background: var(--blue-light); color: var(--blue); padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }

.payment-methods { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.payment-option {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; background: #fff;
  transition: all 0.15s;
}
.payment-option.selected { border-color: var(--blue); background: var(--blue-light); }
.payment-option input { display: none; }
.payment-icon-box {
  width: 44px; height: 30px; border-radius: 6px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--primary); flex-shrink: 0;
}
.payment-icon-box--bank,
.payment-icon-box--qr,
.payment-icon-box--sepay_qr { background: linear-gradient(90deg,#0369a1,#2563eb); color: #fff; }
.payment-icon-box--napas { background: #003d7a; color: #fff; }
.payment-icon-box--visa { background: #1a1f71; color: #fff; }
.payment-icon-box--gateway,
.payment-icon-box--pg,
.payment-icon-box--sepay_pg { background: linear-gradient(135deg,#1a1f71,#dc2626); color: #fff; }
.payment-label-inner { font-size: 13px; font-weight: 600; }
.payment-label-sub { font-size: 11px; color: var(--muted); margin-top: 2px; display: block; }

.notice {
  font-size: 12px; color: var(--muted);
  background: #fffbeb; border: 1px solid #fcd34d;
  padding: 10px 12px; border-radius: 8px; margin: 10px 0;
}

.confirm-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px; background: var(--blue-light); border-radius: 10px;
  margin-top: 14px;
}
.confirm-total span { font-size: 14px; font-weight: 600; color: var(--text); }
.confirm-total strong { font-size: 22px; font-weight: 900; color: var(--blue); font-variant-numeric: tabular-nums; }

.step-nav-bar {
  display: flex; justify-content: space-between;
  margin-top: 20px; gap: 12px;
}

/* ============================================================
   PAY-PENDING — QR PAGE (Step 7)
   ============================================================ */
/* Pay-pending layout — sidebar is always sticky here (no cta to conflict with) */
.pay-pending-layout {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 24px; margin-top: 24px;
}
.pay-pending-layout > .detail-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
@media (max-width: 900px) {
  .pay-pending-layout { grid-template-columns: 1fr; }
  .pay-pending-layout > .detail-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.timer-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 14px; text-align: center; margin-bottom: 20px; }
.timer-value { font-size: 32px; font-weight: 900; color: var(--red); font-variant-numeric: tabular-nums; }
.timer-label { font-size: 12px; color: var(--red); }

.qr-box { text-align: center; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.qr-box h3 { font-size: 15px; margin-bottom: 6px; }
.qr-image-wrap {
  width: 240px; height: 240px; margin: 16px auto;
  background: #fff; border: 2px solid var(--border); border-radius: 8px;
  padding: 10px; display: flex; align-items: center; justify-content: center;
}
.qr-image-wrap img { max-width: 100%; max-height: 100%; }
.bank-tags { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.bank-tag {
  background: var(--bg); padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: var(--primary);
}

.transfer-info { margin-top: 12px; }
.transfer-info-row { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.transfer-info-row strong { color: var(--blue); font-weight: 800; }
.transfer-content {
  font-size: 15px; font-weight: 800; color: var(--red);
  background: #fef2f2; padding: 4px 12px; border-radius: 6px;
  display: inline-block; font-family: monospace;
}
.btn-copy {
  background: none; border: none; color: var(--blue);
  font-size: 12px; font-weight: 500; cursor: pointer; padding: 4px 8px;
}

.payment-guide {
  background: var(--bg); border-radius: 8px;
  padding: 14px 16px; margin: 20px 0;
}
.payment-guide-title { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.payment-guide-list { font-size: 13px; color: var(--muted); line-height: 2; }

/* ════════════════════════════════════════════════════════════
   Trip summary bar (at top of pay-pending page)
   Shows: route, ship name, date, time, pax count + "Thay đổi"
   ════════════════════════════════════════════════════════════ */
.trip-summary-bar {
  display: flex; align-items: center; gap: 24px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.trip-summary-leg {
  display: flex; flex-direction: column; gap: 4px;
  flex: 0 0 auto;
}
.trip-summary-route {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.ts-from, .ts-to {
  white-space: nowrap;
}
.ts-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue);
  font-size: 12px; font-weight: 700;
}
.trip-summary-boat {
  font-size: 12.5px; color: var(--muted);
}
.trip-summary-cell {
  display: flex; align-items: center; gap: 10px;
  flex: 0 0 auto;
}
.ts-icon {
  font-size: 18px;
  line-height: 1;
}
.ts-label {
  font-size: 11px; color: var(--muted); margin-bottom: 1px;
}
.ts-label-date {
  font-size: 13.5px; font-weight: 700; color: var(--text);
}
.ts-time {
  font-size: 12px; color: var(--muted);
}
.ts-value {
  font-size: 13.5px; font-weight: 700; color: var(--text);
}
.trip-summary-change {
  margin-left: auto;
  padding: 8px 18px;
  border: 1.5px solid var(--blue);
  border-radius: 99px;
  font-size: 13px; font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  background: #fff;
  transition: all 0.15s;
  white-space: nowrap;
}
.trip-summary-change:hover {
  background: var(--blue);
  color: #fff;
}

@media (max-width: 700px) {
  .trip-summary-bar { gap: 12px; padding: 12px; }
  .trip-summary-change {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
  #step-panel-1 .hero-content {
    padding: 60px 24px 0px;
  }
}

/* ════════════════════════════════════════════════════════════
   Alternate payment method (Visa/NAPAS) on QR pay-pending page
   Card-style toggle that expands inline (no scroll-up jump).
   ════════════════════════════════════════════════════════════ */
.alt-payment-card {
  margin-top: 18px;
  border: 2px dashed var(--blue-border);
  border-radius: 14px;
  padding: 0;
  background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
  overflow: hidden;
  transition: all 0.25s ease;
}
.alt-payment-card.expanded {
  border-style: solid;
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(211, 47, 47, 0.15);
}
.alt-payment-toggle {
  display: flex; align-items: center; gap: 16px;
  width: 100%;
  padding: 18px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}
.alt-payment-toggle:hover {
  background: var(--blue-light);
}
.alt-payment-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a1f71 0%, #2563eb 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.alt-payment-text { flex: 1; }
.alt-payment-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.alt-payment-sub {
  font-size: 13px; color: var(--muted);
}
.alt-payment-arrow {
  font-size: 22px; color: var(--blue); font-weight: 700;
  transition: transform 0.2s;
}
.alt-payment-toggle:hover .alt-payment-arrow {
  transform: translateX(4px);
}

/* PG button block (revealed when alt-payment-card.expanded) */
.pg-button-block {
  padding: 0 20px 20px;
  text-align: center;
  animation: pg-block-slide 0.3s ease;
}
@keyframes pg-block-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pg-button-block-hint {
  font-size: 13px; color: var(--success); font-weight: 600;
  margin-bottom: 12px;
}
.btn-pg-primary {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1a1f71 0%, #2563eb 100%);
  color: #fff;
  border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
}
.btn-pg-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}
.btn-pg-primary .btn-arrow {
  font-size: 20px;
  transition: transform 0.2s;
}
.btn-pg-primary:hover .btn-arrow { transform: translateX(4px); }
.pg-button-block-secure {
  font-size: 12px; color: var(--muted);
  margin-top: 10px;
}

/* ============================================================
   SUCCESS / CALLBACK (Step 8)
   ============================================================ */
.success-icon { width: 72px; height: 72px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 36px; }
.booking-code { font-size: 24px; font-weight: 900; color: var(--blue); background: var(--blue-light); padding: 8px 24px; border-radius: 10px; border: 1px solid var(--blue-border); display: inline-block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .seat-panels.dual-panels { flex-direction: column; }
  .pax-form-grid { grid-template-columns: 1fr; }
  .pax-form-grid .form-group.span-2 { grid-column: span 1; }
  .voyage-card { grid-template-columns: 1fr; gap: 8px; text-align: left; }
  .voyage-card-price, .btn-choose-voyage { justify-self: start; }
  .rt-info-row { grid-template-columns: 1fr; }
  .search-form-row { grid-template-columns: 1fr 1fr; }
  .search-form-row .search-swap { grid-column: span 2;position: absolute;
        top: 55px; height: auto !important;}
   #step-panel-1 .hero-content {
    padding: 60px 24px 0px;
  }
}
@media (max-width: 768px) {
  .stepper-inner { gap: 0; }
  .step-item { min-width: 70px; }
  .step-label { font-size: 10px; }
  .trip-bar { flex-direction: column; align-items: flex-start; }
  .cta-total-bar { flex-direction: column; gap: 10px; align-items: stretch; }
  .btn-cta-confirm { justify-content: center; }
   #step-panel-1 .hero-content {
    padding: 60px 24px 0px;
  }
}
@media (max-width: 480px) {
  /* Stack form 1 col, swap button becomes a tiny inline divider */
  .search-form-row {
    grid-template-columns: 1fr;
    gap: 8px;
    position: relative;
  }
  /* Swap btn: small overlay between Nơi đi & Nơi đến (cols 1 + 2) */
  .search-form-row .search-swap {
   position: absolute;
        top: 55px;
        right: 12px;
        grid-column: auto;
        padding: 0;
        z-index: 5;
        height: auto !important;
    
  }
  .search-swap-btn {
    width: 30px; height: 30px;
    background: #fff;
    border: 1.5px solid var(--blue);
    color: var(--blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  .search-swap-btn svg { width: 12px; height: 12px; }
  /* Smaller card padding on mobile */
  .search-card { padding: 18px 16px; border-radius: 14px; }
  .search-card-title { font-size: 18px; }
  .search-card-sub { font-size: 12px; margin-bottom: 14px; }
}
