/* =====================================================================
   Embark Booking — Frontend CSS
   Class names match embark-public.js exactly.
   ===================================================================== */

/* ── Base ─────────────────────────────────────────────────────────── */
.embark-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px;
  color: #1a1a2e;
  box-sizing: border-box;
}
.embark-wrap *, .embark-wrap *::before, .embark-wrap *::after { box-sizing: border-box; }

/* ── Demo banner ──────────────────────────────────────────────────── */
.embark-demo-banner {
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-left: 4px solid #f9a825;
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #6d4c00;
}
.embark-demo-banner a { color: #e65100; font-weight: 600; }

/* ── Login-required notice (shown at the payment step for guests) ──── */
.embark-login-notice {
  background: #fff3e0;
  border: 1px solid #ffb74d;
  border-left: 4px solid #fb8c00;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 13.5px;
  color: #7a4a00;
}
.embark-login-notice a { color: #e65100; font-weight: 600; text-decoration: underline; }

.demo-tag {
  display: inline-block;
  background: #ff9800;
  color: #fff;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
  vertical-align: middle;
}

/* ── Search card ──────────────────────────────────────────────────── */
#embark-flight-search-box,
#embark-bus-search-box {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  margin-bottom: 24px;
}

/* ── Tabs ──────────────────────────────────────────────────────────── */
.embark-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.embark-tab {
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  color: #444;
}
.embark-tab.active {
  background: #e3f2fd;
  border-color: #1e88e5;
  color: #0d47a1;
  font-weight: 700;
}

/* ── Search fields row ────────────────────────────────────────────── */
.embark-search-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.efield {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 110px;
}
.efield label {
  font-size: 11px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.efield input,
.efield select {
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #fafafa;
  transition: border-color .2s;
  width: 100%;
}
.efield input:focus, .efield select:focus {
  border-color: #1e88e5;
  background: #fff;
}
.efield-swap {
  flex: 0 0 auto;
  align-items: center;
  padding-bottom: 2px;
}
.efield-btn { flex: 0 0 auto; }

/* Swap button */
.swap-btn, #ef-swap, #eb-swap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swap-btn:hover, #ef-swap:hover, #eb-swap:hover {
  border-color: #1e88e5;
  color: #1e88e5;
}

/* PAX dropdown */
.pax-trigger-wrap { position: relative; }
.pax-trigger-btn {
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fafafa;
  cursor: pointer;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
.pax-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  padding: 16px;
  z-index: 1000;
  min-width: 260px;
}
.pax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  gap: 12px;
}
.pax-row:last-child { border: none; }
.pax-row select { border: 1px solid #ddd; border-radius: 6px; padding: 4px 8px; font-size: 13px; }
.pax-counter { display: flex; align-items: center; gap: 10px; }
.pax-counter button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #1e88e5;
  color: #1e88e5;
  font-size: 16px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}
.pax-counter button:hover { background: #1e88e5; color: #fff; }
.pax-counter span { min-width: 20px; text-align: center; font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.embark-btn-primary {
  background: #1e88e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.embark-btn-primary:hover { background: #1565c0; }
.embark-btn-primary:disabled { background: #90caf9; cursor: not-allowed; }
.embark-btn-sm {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #444;
}
.embark-btn-link {
  background: none;
  border: none;
  color: #1e88e5;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.embark-btn-outline {
  background: #fff;
  border: 2px solid #1e88e5;
  color: #1e88e5;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.embark-btn-pay {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 12px;
  border-radius: 10px;
}

/* ── Loading ──────────────────────────────────────────────────────── */
.embark-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #888;
  gap: 16px;
  font-size: 15px;
}
.embark-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #1e88e5;
  border-radius: 50%;
  animation: embarkSpin .7s linear infinite;
}
@keyframes embarkSpin { to { transform: rotate(360deg); } }

/* ── Empty / error ────────────────────────────────────────────────── */
.embark-empty {
  text-align: center;
  padding: 48px 20px;
  color: #999;
  font-size: 16px;
  background: #fafafa;
  border-radius: 10px;
  border: 1.5px dashed #e0e0e0;
}

/* ── Results header ───────────────────────────────────────────────── */
.embark-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.results-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}
.embark-sort-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888;
}
.esort {
  background: #f5f5f5;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}
.esort.active { background: #e3f2fd; border-color: #1e88e5; color: #0d47a1; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════
   FLIGHT CARDS  — must match JS class names exactly
   ═══════════════════════════════════════════════════════════════════ */
#ef-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.embark-flight-card {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  transition: box-shadow .2s, border-color .2s;
  cursor: default;
}
.embark-flight-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  border-color: #90caf9;
}

/* Left: Airline code + name */
.efc-left {
  min-width: 80px;
  text-align: center;
}
.efc-airline-code {
  font-size: 22px;
  font-weight: 900;
  color: #1e88e5;
  letter-spacing: -1px;
}
.efc-airline-name {
  font-size: 11px;
  color: #777;
  margin-top: 2px;
}
.efc-flight-num {
  font-size: 10px;
  color: #aaa;
}

/* Middle: Schedule */
.efc-schedule {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}
.efc-point { text-align: center; min-width: 58px; }
.efc-time { font-size: 22px; font-weight: 800; color: #1a1a2e; display: block; }
.efc-city { font-size: 13px; color: #666; display: block; }
.efc-middle { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.efc-dur { font-size: 11px; color: #888; }
.efc-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #1e88e5, #90caf9, #1e88e5);
  border-radius: 2px;
  position: relative;
}
.efc-line span {
  display: block;
  width: 8px; height: 8px;
  background: #1e88e5;
  border-radius: 50%;
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}
.efc-stops { font-size: 11px; color: #1e88e5; font-weight: 600; }

/* Right: Price + Book */
.efc-right {
  min-width: 160px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.efc-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 2px; }
.etag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.etag-refund    { background: #e8f5e9; color: #2e7d32; }
.etag-norefund  { background: #ffebee; color: #c62828; }
.etag-seats     { background: #fff8e1; color: #e65100; }
.efc-baggage    { font-size: 12px; color: #777; }
.efc-price      { font-size: 26px; font-weight: 900; color: #1a1a2e; }
.efc-svc        { font-size: 11px; color: #888; }
.efc-book-btn {
  margin-top: 6px;
  padding: 9px 18px;
  font-size: 13px;
}

/* Fare options */
.efc-fare-options { width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }

/* ═══════════════════════════════════════════════════════════════════
   BUS CARDS
   ═══════════════════════════════════════════════════════════════════ */
#eb-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.embark-bus-card {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  transition: box-shadow .2s;
}
.embark-bus-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

.ebc-left { flex: 1; min-width: 160px; }
.ebc-operator strong { font-size: 16px; font-weight: 700; }
.ebc-type { font-size: 12px; color: #777; margin: 2px 0; }
.ebc-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.etag-noac { background: #f5f5f5; color: #777; }

.ebc-schedule {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 220px;
}
.ebc-time { font-size: 20px; font-weight: 700; text-align: center; }
.ebc-time .ebc-city { display: block; font-size: 12px; color: #888; font-weight: 400; }
.ebc-dur { flex: 1; text-align: center; font-size: 12px; color: #888; }

.ebc-right { min-width: 150px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ebc-rating { font-size: 12px; color: #f59e0b; }
.ebc-seats  { font-size: 12px; color: #e65100; font-weight: 600; }
.ebc-price  { font-size: 24px; font-weight: 900; color: #1a1a2e; }
.ebc-svc    { font-size: 11px; color: #888; }
.ebc-policy { font-size: 11px; color: #2e7d32; }
.ebc-select-btn { margin-top: 6px; padding: 9px 16px; font-size: 13px; }

/* ── Seat Picker ──────────────────────────────────────────────────── */
.embark-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.bus-front-label {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #888;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 6px;
  margin-bottom: 16px;
}
.seat-deck-label {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 16px 0 8px;
}
.seat-deck-label:first-of-type { margin-top: 0; }
.seat-rows-wrap { display: flex; flex-direction: column; gap: 8px; }
.seat-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bus-seat {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: all .15s;
  user-select: none;
}
.seat-avail {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
  cursor: pointer;
}
.seat-avail:hover, .seat-selected {
  background: #1e88e5 !important;
  color: #fff !important;
  border-color: #1565c0 !important;
  transform: scale(1.05);
}
.seat-ladies {
  background: #fce4ec;
  color: #880e4f;
  border-color: #f48fb1;
  cursor: pointer;
}
.seat-booked {
  background: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
}
.seat-legend {
  display: flex;
  gap: 16px;
  margin: 16px 0 8px;
  font-size: 12px;
  flex-wrap: wrap;
}
.seat-legend span { display: flex; align-items: center; gap: 5px; }

.seat-summary-bar {
  background: #e3f2fd;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Passenger Form ───────────────────────────────────────────────── */
.embark-pax-card {
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
}
.embark-pax-card h4 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
}
.embark-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.embark-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 130px;
}
.embark-field-wide { flex-basis: 100%; }
.embark-field label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}
.embark-field input,
.embark-field select {
  border: 1.5px solid #ddd;
  border-radius: 7px;
  padding: 9px 11px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color .2s;
  width: 100%;
}
.embark-field input:focus, .embark-field select:focus { border-color: #1e88e5; }
.embark-field-error { border-color: #ef5350 !important; }
.req { color: #ef5350; }

/* ── Boarding / Dropping Point Picker ─────────────────────────────── */
.embark-bp-group { margin-bottom: 18px; }
.embark-bp-group h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
}
.embark-bp-list { display: flex; flex-direction: column; gap: 8px; }
.embark-bp-item {
  background: #f8f9fa;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.embark-bp-item:hover { border-color: #90caf9; }
.embark-bp-board-selected, .embark-bp-drop-selected {
  border-color: #1e88e5;
  background: #e3f2fd;
}
.embark-bp-name { font-weight: 700; font-size: 14px; color: #1a1a2e; }
.embark-bp-meta { font-size: 12px; color: #666; margin-top: 2px; }
.embark-bp-addr { font-size: 12px; color: #888; margin-top: 2px; }
.embark-bp-empty { font-size: 13px; color: #999; padding: 8px 0; }

/* Trip summary bar */
.trip-summary-bar {
  background: #e3f2fd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1a237e;
  margin-bottom: 16px;
}

/* Price summary */
.price-summary-box {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}
.price-row:last-child { border: none; }
.price-total {
  padding-top: 10px;
  margin-top: 4px;
  font-size: 16px;
  border-top: 2px solid #e0e0e0 !important;
  border-bottom: none !important;
}

/* ── Booking Confirmed ────────────────────────────────────────────── */
.embark-success-card {
  text-align: center;
  padding: 40px 24px;
}
.success-icon { font-size: 72px; margin-bottom: 16px; }
.embark-success-card h2 { color: #2e7d32; font-size: 24px; margin-bottom: 20px; }
.embark-confirm-table {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-collapse: collapse;
}
.embark-confirm-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.embark-confirm-table td:first-child { color: #888; }
.estatus { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.estatus-confirmed { background: #e8f5e9; color: #2e7d32; }
.estatus-pending   { background: #fff8e1; color: #f57f17; }
.estatus-cancelled { background: #ffebee; color: #c62828; }
.success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ── My Bookings ──────────────────────────────────────────────────── */
.embark-bookings-list { display: flex; flex-direction: column; gap: 12px; }
.embark-booking-card {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}
.ebk-header {
  background: #f8f9fa;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #eee;
}
.ebk-type { background: #1e88e5; color: #fff; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.ebk-ref  { font-size: 13px; color: #555; flex: 1; }
.ebk-body { padding: 12px 16px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.ebk-pnr  { font-size: 13px; }
.ebk-fare { font-size: 20px; font-weight: 800; }
.ebk-date { font-size: 12px; color: #888; flex: 1; }
.embark-status-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.status-confirmed,.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-pending   { background: #fff8e1; color: #f57f17; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-processing { background: #e3f2fd; color: #1565c0; }
.status-failed    { background: #ffebee; color: #c62828; }

/* ── My Bookings: tabs, filters, pagination, delete ──────────────────
   Deliberately card-based (reusing .embark-booking-card above), not a
   wide <table> — a table with enough columns for a booking row (ref,
   type, route/hotel, PNR, fare, status, date, actions) is exactly what
   pushes fields off-screen on anything narrower than a desktop, forcing
   horizontal scrolling to see them. A card's fields wrap and reflow
   instead, so every field stays visible without scrolling on any
   screen size — the fix is the layout choice itself, not a scrollable
   container hiding the same problem. */
.ebk-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 2px solid #eee; }
.ebk-tab {
  background: none; border: none; padding: 10px 16px; font-size: 14px; font-weight: 600;
  color: #777; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.ebk-tab:hover { color: #1e88e5; }
.ebk-tab.active { color: #1e88e5; border-bottom-color: #1e88e5; }

.ebk-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.ebk-filter-input { padding: 8px 10px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 13px; min-width: 130px; flex: 1 1 130px; max-width: 220px; }

.ebk-row-fields { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ebk-row-fields > div { min-width: 110px; }
.ebk-field-label { font-size: 10.5px; color: #999; text-transform: uppercase; letter-spacing: .3px; }
.ebk-field-value { font-size: 13.5px; color: #222; font-weight: 600; }

.ebk-delete-btn {
  background: #fff; border: 1.5px solid #e0b4b4; color: #c62828; border-radius: 7px;
  padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.ebk-delete-btn:hover { background: #ffebee; }

.ebk-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 18px 0; }
.ebk-page-btn {
  background: #fff; border: 1.5px solid #e0e0e0; border-radius: 7px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; min-width: 34px;
}
.ebk-page-btn:hover:not(:disabled) { border-color: #1e88e5; color: #1e88e5; }
.ebk-page-btn.active { background: #1e88e5; border-color: #1e88e5; color: #fff; }
.ebk-page-btn:disabled { opacity: .4; cursor: default; }

@media (max-width: 600px) {
  .ebk-filter-bar { flex-direction: column; align-items: stretch; }
  .ebk-filter-input { max-width: none; }
  .ebk-row-fields > div { min-width: 45%; }
}

/* ── Wallet ───────────────────────────────────────────────────────── */
.embark-wallet-balance {
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  color: #fff;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.wallet-label  { font-size: 13px; opacity: .8; display: block; }
.wallet-amount { font-size: 42px; font-weight: 900; display: block; }
.wallet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.embark-wallet-balance .embark-btn-primary { background: #fff; color: #1565c0; }
.embark-wallet-balance .embark-btn-outline  { border-color: rgba(255,255,255,.8); color: #fff; }
.embark-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.embark-form-table { width: 100%; border-collapse: collapse; }
.embark-form-table td { padding: 8px 4px; vertical-align: top; }
.embark-form-table input {
  border: 1.5px solid #ddd;
  border-radius: 7px;
  padding: 8px 10px;
  width: 100%;
  font-size: 14px;
  outline: none;
}
.embark-form-table input:focus { border-color: #1e88e5; }

/* Wallet log table */
.embark-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.embark-table th { background: #f8f9fa; padding: 10px 12px; text-align: left; font-weight: 700; border-bottom: 2px solid #eee; }
.embark-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; }

/* ── Bus summary bar ──────────────────────────────────────────────── */
#eb-bus-summary {
  background: #e3f2fd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1a237e;
  margin-bottom: 16px;
}

/* ── Back button ──────────────────────────────────────────────────── */
#ef-back-to-search,
#ef-back-to-results,
#eb-back-to-search,
#eb-back-to-results,
#eb-back-to-seats {
  background: none;
  border: none;
  color: #1e88e5;
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 12px 0;
  display: block;
  text-decoration: none;
}
#ef-back-to-search:hover,
#ef-back-to-results:hover,
#eb-back-to-search:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .embark-search-fields { flex-direction: column; }
  .efield { min-width: unset; }
  .efield-swap { transform: rotate(90deg); align-self: center; }
  .embark-flight-card,
  .embark-bus-card    { flex-direction: column; align-items: flex-start; }
  .efc-right,
  .ebc-right          { text-align: left; align-items: flex-start; width: 100%; }
  .efc-schedule,
  .ebc-schedule       { width: 100%; }
  .embark-wallet-balance { flex-direction: column; }
}

/* ── Additions / overrides (v2 fixes) ──────────────────────────── */

/* Results header */
.embark-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.results-title { font-size: 15px; font-weight: 600; color: #1a1a2e; }
.results-count { font-size: 13px; color: #888; font-weight: 400; }

/* Sort bar */
.embark-sort-bar { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; }
.esort {
  background: #f5f5f5; border: 1px solid #ddd; border-radius: 6px;
  padding: 4px 12px; cursor: pointer; font-size: 13px;
}
.esort.active { background: #e3f2fd; border-color: #1e88e5; color: #0d47a1; font-weight: 600; }

/* Ensure flight cards are visible */
#ef-results-list, #eb-results-list { display: block; }
.embark-flight-card { display: flex !important; }

/* Bus schedule layout */
.ebc-schedule {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}
.ebc-time-block { text-align: center; }
.ebc-time { display: block; font-size: 20px; font-weight: 800; color: #1a1a2e; }
.ebc-city { display: block; font-size: 12px; color: #888; }
.ebc-dur  { font-size: 12px; color: #888; white-space: nowrap; }

/* Booking confirmed */
.booking-confirm-box { padding: 16px; }
.embark-confirm-table { width: 100%; border-collapse: collapse; }
.embark-confirm-table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.embark-confirm-table td:first-child { color: #666; width: 40%; }
.estatus-confirmed { background: #e8f5e9; color: #2e7d32; padding: 4px 12px; border-radius: 12px; font-weight: 700; font-size: 13px; }
.confirm-note { color: #16a34a; margin-top: 16px; font-size: 14px; }
.demo-note   { color: #f59e0b; margin-top: 16px; font-size: 12px; border: 1px dashed #f59e0b; padding: 8px; border-radius: 6px; }

/* Error field highlight */
.embark-field-error { border-color: #ef4444 !important; outline: 2px solid #fee2e2 !important; }

/* Back link buttons */
.embark-btn-link {
  background: none; border: none; color: #1e88e5;
  cursor: pointer; font-size: 14px; padding: 0;
  margin-bottom: 16px; display: inline-block;
}
.embark-btn-link:hover { text-decoration: underline; }

/* Trip summary bar */
.trip-summary-bar {
  background: #f0f7ff;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #1a1a2e;
}

/* Price summary */
.price-summary-box {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 20px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.price-row:last-child { border: none; }
.price-total { font-size: 16px; padding-top: 10px; }

/* Pay button */
.embark-btn-pay {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 16px;
  border-radius: 10px;
}

/* Success card */
.embark-success-card { text-align: center; }
.success-icon { font-size: 56px; margin-bottom: 8px; }
.success-actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.embark-btn-outline {
  background: #fff; border: 2px solid #1e88e5; color: #1e88e5;
  padding: 10px 24px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.embark-btn-outline:hover { background: #e3f2fd; }

/* Req asterisk */
.req { color: #ef4444; }


/* ================================================================
   HOTEL WIDGET CSS
   ================================================================ */

/* Search form */
.embark-hotel-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.embark-search-heading { font-size: 22px; font-weight: 800; color: #1a1a2e; margin: 0 0 20px; }
.embark-hotel-fields { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.embark-hfield { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.embark-hfield--wide { flex: 2; min-width: 220px; }
.embark-hfield--sm { min-width: 110px; }
.embark-hfield--btn { min-width: auto; }
.embark-hfield label { font-size: 12px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.4px; }
.embark-hfield input, .embark-hfield select {
  border: 2px solid #e0e0e0; border-radius: 10px; padding: 10px 14px;
  font-size: 15px; transition: border-color .15s; background: #fff;
}
.embark-hfield input:focus, .embark-hfield select:focus { border-color: #1e88e5; outline: none; }

/* Results header */
.eh-results-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.eh-results-title  { font-size: 14px; color: #555; }
.eh-sort-bar { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #888; }
.eh-sort { background: #f5f5f5; border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 12px; font-weight: 600; color: #555; }
.eh-sort.active { background: #e3f2fd; border-color: #1e88e5; color: #0d47a1; }

/* Hotel card */
.eh-hotel-card {
  display: flex; gap: 0; background: #fff; border: 2px solid #e8e8e8;
  border-radius: 16px; margin-bottom: 16px; overflow: hidden;
  transition: all .2s; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.eh-hotel-card:hover { border-color: #1e88e5; box-shadow: 0 6px 24px rgba(30,136,229,.15); transform: translateY(-2px); }
.eh-hotel-img-wrap { width: 200px; min-height: 180px; flex-shrink: 0; }
.eh-hotel-img-placeholder {
  width: 100%; height: 100%; min-height: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: rgba(255,255,255,.8);
}
.eh-hotel-info { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.eh-hotel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eh-hotel-stars  { font-size: 13px; color: #f59e0b; font-weight: 700; margin-bottom: 2px; }
.eh-hotel-stars span { color: #888; font-weight: 400; }
.eh-hotel-name   { font-size: 18px; font-weight: 800; color: #1a1a2e; margin: 2px 0; }
.eh-hotel-addr   { font-size: 13px; color: #888; }
.eh-hotel-desc   { font-size: 13px; color: #666; line-height: 1.6; }
.eh-score-badge  { background: #1e88e5; color: #fff; border-radius: 10px 10px 10px 2px; padding: 6px 12px; font-size: 18px; font-weight: 900; text-align: center; min-width: 48px; }
.eh-score-count  { font-size: 11px; color: #888; text-align: center; margin-top: 3px; }
.eh-amenities    { font-size: 12px; color: #888; }
.eh-hotel-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid #f0f0f0; flex-wrap: wrap; gap: 10px; }
.eh-hotel-price-from { display: flex; align-items: baseline; gap: 4px; }
.eh-from-label  { font-size: 12px; color: #888; }
.eh-from-price  { font-size: 26px; font-weight: 900; color: #1a1a2e; }
.eh-from-night  { font-size: 13px; color: #888; }

/* Hotel detail */
.eh-detail-card { padding: 24px; }
.eh-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.eh-detail-name  { font-size: 24px; font-weight: 900; color: #1a1a2e; margin: 4px 0 6px; }
.eh-detail-desc  { font-size: 14px; color: #666; line-height: 1.7; margin: 12px 0; }
.eh-amenities-full { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.eh-amenity-tag  { background: #e3f2fd; color: #1565c0; font-size: 12px; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.eh-rooms-list   { display: flex; flex-direction: column; gap: 14px; }
.eh-room-card    {
  display: flex; justify-content: space-between; align-items: center;
  background: #f9fafb; border: 2px solid #e8e8e8; border-radius: 12px;
  padding: 16px 20px; gap: 16px; flex-wrap: wrap;
  transition: border-color .15s;
}
.eh-room-card:hover { border-color: #1e88e5; }
.eh-room-type   { font-size: 16px; font-weight: 800; color: #1a1a2e; margin-bottom: 6px; }
.eh-room-meta   { font-size: 13px; color: #888; }
.eh-room-pricing { text-align: right; }
.eh-room-price  { font-size: 24px; font-weight: 900; color: #1e88e5; }
.eh-room-night  { font-size: 13px; color: #888; font-weight: 400; }
.eh-room-total  { font-size: 13px; color: #666; margin-top: 2px; }

/* Enquiry form */
.eh-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 16px 0; }
.eh-summary-bar { background: #e3f2fd; border: 1.5px solid #90caf9; border-radius: 10px; padding: 12px 16px; font-size: 14px; color: #1a1a2e; margin-bottom: 20px; }
.eh-enquiry-note { background: #fff8e1; border: 1.5px solid #ffe082; border-radius: 10px; padding: 14px; font-size: 13px; color: #6d4c00; margin: 16px 0; line-height: 1.7; }
.eh-form-error { background: #ffebee; border: 1.5px solid #ef9a9a; border-radius: 8px; padding: 10px 14px; font-size: 14px; color: #c62828; margin-bottom: 12px; }
.embark-btn-large { width: 100%; padding: 15px; font-size: 16px; border-radius: 12px; margin-top: 8px; }
.embark-field textarea { border: 2px solid #e0e0e0; border-radius: 10px; padding: 10px 14px; font-size: 14px; width: 100%; resize: vertical; font-family: inherit; }
.embark-field textarea:focus { border-color: #1e88e5; outline: none; }

/* Success */
.eh-success-card { text-align: center; padding: 32px; }
.eh-success-icon { font-size: 64px; margin-bottom: 8px; }
.eh-success-sub  { color: #666; font-size: 15px; margin-bottom: 24px; }
.eh-confirm-box  { text-align: left; margin: 0 auto 24px; max-width: 480px; }
.eh-confirm-table { width: 100%; border-collapse: collapse; }
.eh-confirm-table tr td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.eh-confirm-table tr td:first-child { color: #888; width: 45%; }
.eh-success-steps { display: flex; gap: 0; margin: 24px auto; max-width: 560px; justify-content: center; flex-wrap: wrap; }
.eh-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 110px; padding: 12px 8px; }
.eh-step-icon { font-size: 22px; }
.eh-step span:last-child { font-size: 12px; color: #888; text-align: center; }
.eh-step--done .eh-step-icon { filter: none; }
.eh-step--done span:last-child { color: #2e7d32; font-weight: 700; }

/* Responsive */
@media (max-width: 640px) {
  .eh-hotel-card { flex-direction: column; }
  .eh-hotel-img-wrap { width: 100%; height: 160px; }
  .eh-hotel-img-placeholder { min-height: 160px; }
  .eh-room-card { flex-direction: column; }
  .eh-room-pricing { text-align: left; }
}

/* ═══════════════════════════════════════════════════════════════════
   FILTER PANEL — Flight & Bus results (Ixigo-style left sidebar)
   Shared classes: .embark-results-layout / .embark-filters-panel / .efp-*
   ═══════════════════════════════════════════════════════════════════ */

.embark-filter-toggle-btn {
  display: none;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
}
.embark-filter-toggle-btn:hover { border-color: #1e88e5; color: #1e88e5; }

.embark-results-layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* ── Filter panel (sidebar) ──────────────────────────────────────── */
.embark-filters-panel {
  flex: 0 0 270px;
  width: 270px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 4px 18px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.embark-filters-panel::-webkit-scrollbar { width: 6px; }
.embark-filters-panel::-webkit-scrollbar-thumb { background: #ddd; border-radius: 6px; }

.efp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0 10px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}
.efp-head h4 { margin: 0; font-size: 15px; font-weight: 800; color: #1a1a2e; flex: 1; }
.efp-clear-btn {
  background: none; border: none; color: #1e88e5; font-size: 12.5px;
  font-weight: 700; cursor: pointer; padding: 0;
}
.efp-clear-btn:hover { text-decoration: underline; }
.efp-close-btn {
  display: none;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 14px;
  cursor: pointer;
  color: #555;
  align-items: center;
  justify-content: center;
}

.efp-group {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.efp-group:last-child { border-bottom: none; }
.efp-group h5 {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #444;
}
.efp-sub { font-size: 10.5px; font-weight: 400; text-transform: none; color: #999; letter-spacing: 0; }
.efp-sub em { font-style: normal; color: #1e88e5; }

.efp-options { display: flex; flex-direction: column; gap: 9px; }
.efp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  user-select: none;
}
.efp-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #1e88e5;
  cursor: pointer;
  flex-shrink: 0;
}
.efp-count { color: #999; font-size: 12px; margin-left: auto; }

/* Sort pills inside the panel */
#ef-sort-bar, #eb-sort-bar { display: flex; flex-wrap: wrap; gap: 6px; }
#ef-sort-bar .esort, #eb-sort-bar .esort {
  flex: 1 1 calc(50% - 6px);
  text-align: center;
  padding: 7px 6px;
}

/* Time-of-day grid (Departure / Arrival) */
.efp-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.efp-time-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 10.5px;
  text-align: center;
  color: #555;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.efp-time-opt input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.efp-time-ic { font-size: 16px; }
.efp-time-opt:has(input:checked) {
  border-color: #1e88e5;
  background: #e3f2fd;
  color: #0d47a1;
  font-weight: 700;
}

/* Range sliders (Price / Duration) */
.efp-range input[type="range"] {
  width: 100%;
  accent-color: #1e88e5;
  cursor: pointer;
}
.efp-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Results main column ─────────────────────────────────────────── */
.embark-results-main { flex: 1; min-width: 0; }
.embark-results-main .embark-empty { margin-top: 0; }

/* ── Mobile filter drawer ────────────────────────────────────────── */
body.efp-lock-scroll { overflow: hidden; }

.efp-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 999;
}
.efp-backdrop.efp-open { display: block; }

@media (max-width: 860px) {
  .embark-filter-toggle-btn { display: inline-block; }

  .embark-results-layout { display: block; }

  .embark-filters-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 86%;
    max-width: 340px;
    max-height: none;
    border-radius: 0;
    box-shadow: -6px 0 24px rgba(0,0,0,.2);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 1000;
    padding: 4px 16px 24px;
  }
  .embark-filters-panel.efp-open { transform: translateX(0); }
  .efp-close-btn { display: flex; }
}

@media (max-width: 480px) {
  .embark-filters-panel { width: 92%; max-width: none; }
  .efp-time-grid { grid-template-columns: 1fr 1fr; }
}

/* City ID hint under the hotel search field (see templates/hotel/search.php) */
.embark-field-hint {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Flight: View Fare modal ─────────────────────────────────────── */
.embark-fare-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 640px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  z-index: 1000;
}
.efm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #eee;
  position: sticky; top: 0; background: #fff; border-radius: 12px 12px 0 0;
}
.efm-head h3 { margin: 0; font-size: 16px; }
.efm-body { padding: 12px 20px 20px; }
.efm-fare-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0f0f0;
}
.efm-fare-row:last-child { border-bottom: none; }
.efm-fare-recommended { background: #f8f9ff; margin: 0 -20px; padding: 14px 20px; }
.efm-fare-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.efm-fare-benefits { display: flex; flex-wrap: wrap; gap: 8px; }
.efm-benefit {
  font-size: 11.5px; color: #2e7d32; background: #e8f5e9;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}
.efm-benefit-no { color: #c62828; background: #fdecea; }
.efm-fare-right { text-align: right; flex-shrink: 0; }
.efm-fare-price { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.etag-fares { background: #eef2ff; color: #4f46e5; }

@media (max-width: 600px) {
  .embark-fare-modal { width: 96%; max-height: 88vh; }
  .efm-fare-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .efm-fare-right { text-align: left; }
}

/* ── Flight: Details panel (Fare Rules / Baggage & Meals / Seat Map) ── */
.ef-details-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ef-details-tab.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.ef-fare-rule-block { padding: 10px 0; border-bottom: 1px solid #eee; }
.ef-fare-rule-block:last-child { border-bottom: none; }

.ef-seat-grid { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding: 8px 0; }
.ef-seat-row { display: flex; gap: 6px; }
.ef-seat {
  width: 34px; height: 34px; border-radius: 6px; border: 1px solid #ccc;
  background: #fff; font-size: 10px; cursor: pointer; flex-shrink: 0;
}
.ef-seat:hover:not(:disabled) { border-color: #4f46e5; }
.ef-seat-taken { background: #eee; color: #aaa; cursor: not-allowed; }
.ef-seat-selected { background: #4f46e5; color: #fff; border-color: #4f46e5; }

.embark-loading, .embark-error { padding: 10px 0; font-size: 13px; color: #666; }
.embark-error { color: #c62828; }

/* =====================================================================
   BUS SEAT MAP — vertical coach, one card per deck (renderSeatMap() in embark-public.js)
   Front at the TOP, rows run down. Seats are placed from the API's own RowNo (row)
   and ColumnNo (column); the aisle is the empty column. Decks sit side by side when
   they fit and stack when they do not; a bus wider than its container scrolls INSIDE
   its own frame, never the page. Selectors carry #embark-bus-widget #eb-seat-grid so
   they win over the core .bus-seat rules (whose selected state uses !important) and
   the KaNa skin's #embark-bus-widget .kbu-seat-grid rules.
   ===================================================================== */
#embark-bus-widget #eb-seat-grid .ebs-wrap {
  --ebs-w: 46px; --ebs-wmin: 34px; --ebs-h: 50px; --ebs-gap: 8px; --ebs-rgap: 26px; --ebs-aisle: 34px; --ebs-amin: 14px;
  --ebs-green: #1f9d55; --ebs-green-dark: #15803d; --ebs-green-soft: #dff1e6;
  --ebs-ink: var(--kbu-ink, #14213d); --ebs-soft: var(--kbu-ink-soft, #5b6683); --ebs-line: #d9dce6;
  width: 100%; max-width: 600px; margin: 0 auto; min-width: 0; box-sizing: border-box; color: var(--ebs-ink);
}
#embark-bus-widget #eb-seat-grid .ebs-wrap.ebs-tall { --ebs-w: 46px; --ebs-h: 92px; }
#embark-bus-widget #eb-seat-grid .ebs-wrap *, #embark-bus-widget #eb-seat-grid .ebs-wrap *::before, #embark-bus-widget #eb-seat-grid .ebs-wrap *::after { box-sizing: border-box; }

/* legend + swipe hint */
#embark-bus-widget #eb-seat-grid .ebs-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 0 0 14px; font-size: 12px; font-weight: 600; color: var(--ebs-soft); }
#embark-bus-widget #eb-seat-grid .ebs-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#embark-bus-widget #eb-seat-grid .ebs-sw { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--ebs-green); background: #fff; font-style: normal; font-size: 11px; font-weight: 800; line-height: 1; color: var(--ebs-ink); }
#embark-bus-widget #eb-seat-grid .ebs-sw-sel { background: var(--ebs-green); border-color: var(--ebs-green-dark); color: #fff; }
#embark-bus-widget #eb-seat-grid .ebs-sw-booked { background: #ececf0; border: 2px dashed #a9adbb; color: #4b5469; }
#embark-bus-widget #eb-seat-grid .ebs-sw-res { background: repeating-linear-gradient(45deg, #fbefd3 0 5px, #f3dca6 5px 10px); border: 2px solid #d49a1c; color: #7a4d00; font-size: 10px; }
#embark-bus-widget #eb-seat-grid .ebs-sw-ladies { background: #fff; border-color: #e8548f; color: #b3195c; }
#embark-bus-widget #eb-seat-grid .ebs-sw-male { background: #fff; border-color: #3d8fd6; color: #0b5d94; }
#embark-bus-widget #eb-seat-grid .ebs-sw-berth { width: 14px; height: 24px; border-radius: 5px; background: linear-gradient(#fff 0 14px, var(--ebs-green-soft) 14px 18px, #fff 18px); }
#embark-bus-widget #eb-seat-grid .ebs-swipe { display: none; flex-basis: 100%; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ebs-green-dark); background: #e6f5ec; border-radius: 999px; padding: 4px 12px; }
#embark-bus-widget #eb-seat-grid .ebs-wrap.ebs-scrolls .ebs-swipe { display: block; }

/* decks: side by side when they fit, stacked when they do not (they wrap by container width) */
#embark-bus-widget #eb-seat-grid .ebs-decks { display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: center; align-items: stretch; gap: 14px; }
#embark-bus-widget #eb-seat-grid .ebs-decks .ebs-deck { width: 100%; max-width: 560px; margin: 0 auto; flex: none; }
@media (min-width: 993px) {
  #embark-bus-widget #eb-seat-grid .ebs-decks:not(.ebs-stack) { flex-direction: row; align-items: flex-start; }
  #embark-bus-widget #eb-seat-grid .ebs-decks:not(.ebs-stack) .ebs-deck { flex: 1 1 0; width: auto; max-width: none; margin: 0; }
}
#embark-bus-widget #eb-seat-grid .ebs-swipe, #embark-bus-widget #eb-seat-grid .ebs-wrap.ebs-scrolls .ebs-swipe { display: none !important; }
#embark-bus-widget #eb-seat-grid .ebs-deck { flex: 0 1 auto; width: -moz-max-content; width: max-content; max-width: 100%; min-width: 0; padding: 14px 14px 16px; background: #f6f6f9; border-radius: 16px; }
   /* Lower deck | Upper deck: equal columns that never wrap */
#embark-bus-widget #eb-seat-grid .ebs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; margin: 0 0 12px; padding: 0 2px; }
#embark-bus-widget #eb-seat-grid .ebs-driver-left .ebs-head { flex-direction: row-reverse; }
#embark-bus-widget #eb-seat-grid .ebs-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--ebs-ink); line-height: 1.2; }
#embark-bus-widget #eb-seat-grid .ebs-wheel { flex: none; color: #b7bac6; }

/* the bus body */
#embark-bus-widget #eb-seat-grid .ebs-bus { position: relative; max-width: 100%; min-width: 0; padding: 10px 12px 12px; background: #fff; border: 2px solid #d9dce6; border-radius: 22px 22px 14px 14px; }
#embark-bus-widget #eb-seat-grid .ebs-front-label, #embark-bus-widget #eb-seat-grid .ebs-rear { display: block; text-align: center; font-size: 9.5px; font-weight: 800; letter-spacing: .16em; color: #a4a9ba; }
#embark-bus-widget #eb-seat-grid .ebs-front-label { margin: 0 0 8px; }
#embark-bus-widget #eb-seat-grid .ebs-rear { margin: 2px 0 0; }
/* v5.27.10: NO sideways scrolling. The map is never a scroller; if side-by-side decks do not fit, they stack (see ebsFit() in embark-public.js). */
#embark-bus-widget #eb-seat-grid .ebs-scroll { max-width: 100%; overflow: visible; padding: 8px 0 30px; margin: -8px 0 -10px; }
#embark-bus-widget #eb-seat-grid .ebs-scroll::-webkit-scrollbar { height: 8px; }
#embark-bus-widget #eb-seat-grid .ebs-scroll::-webkit-scrollbar-track { background: #eaf3ee; border-radius: 99px; }
#embark-bus-widget #eb-seat-grid .ebs-scroll::-webkit-scrollbar-thumb { background: #a9c9b5; border-radius: 99px; }
#embark-bus-widget #eb-seat-grid .ebs-grid { display: grid; gap: var(--ebs-rgap) var(--ebs-gap); width: 100%; justify-content: center; position: relative; }
#embark-bus-widget #eb-seat-grid .ebs-aisle { display: flex; align-items: center; justify-content: center; justify-self: center; width: 10px; z-index: 0; border-radius: 6px; background: repeating-linear-gradient(180deg, transparent 0 10px, #e8eaf1 10px 14px); }
#embark-bus-widget #eb-seat-grid .ebs-aisle span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 9px; font-weight: 800; letter-spacing: .22em; color: #a4a9ba; background: #fff; padding: 6px 1px; border-radius: 4px; }

/* seats — reset what the core/skin put on .bus-seat, then restyle. The price / "Sold" label hangs BELOW the seat (inside the row gap). */
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat {
  position: relative; z-index: 1; width: auto; height: auto; min-width: 0; margin: 0; padding: 4px 2px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0;
  border: 2px solid var(--ebs-green); border-radius: 10px; background: #fff; color: var(--ebs-ink);
  font-size: 12px; font-weight: 700; line-height: 1.1; text-align: center; cursor: pointer; user-select: none; touch-action: manipulation;
  transform: none; box-shadow: none; transition: background .12s, border-color .12s, box-shadow .12s;
}
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat::before, #embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat::after { content: none !important; display: none !important; }
#embark-bus-widget #eb-seat-grid .ebs-seat.ebs-chair.bus-seat { justify-content: flex-start; padding-top: 4px; border-radius: 9px 9px 7px 7px; box-shadow: inset 0 -5px 0 rgba(31, 157, 85, .16); }
#embark-bus-widget #eb-seat-grid .ebs-seat .ebs-num { font-size: 15px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
#embark-bus-widget #eb-seat-grid .ebs-seat.ebs-chair .ebs-num { margin-top: 0; }
#embark-bus-widget #eb-seat-grid .ebs-seat.ebs-chair .ebs-person { top: auto; bottom: 6px; transform: translateX(-50%); width: 12px; height: 20px; }
#embark-bus-widget #eb-seat-grid .ebs-seat .ebs-pillow { position: absolute; left: 50%; bottom: 9px; width: 24px; height: 9px; transform: translateX(-50%); border-radius: 5px; background: var(--ebs-green-soft); }
#embark-bus-widget #eb-seat-grid .ebs-seat .ebs-fare { position: absolute; left: 50%; top: 100%; margin-top: 3px; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #1f7a45; white-space: nowrap; letter-spacing: -.01em; pointer-events: none; }
#embark-bus-widget #eb-seat-grid .ebs-seat .ebs-person { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%); }
#embark-bus-widget #eb-seat-grid .ebs-p-n { color: #b8bbc8; }
#embark-bus-widget #eb-seat-grid .ebs-p-f { color: #ee7fae; }
#embark-bus-widget #eb-seat-grid .ebs-p-m { color: #7ea7ee; }

/* states */
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-avail:hover, #embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-avail:focus-visible { background: #f0faf4 !important; border-color: var(--ebs-green-dark) !important; color: var(--ebs-ink) !important; transform: none !important; outline: 0; box-shadow: 0 0 0 3px rgba(31, 157, 85, .22) !important; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-ladies { border-color: #e8548f; background: #fff; color: #8e0f48; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-ladies .ebs-pillow { background: #fbd9e8; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-ladies .ebs-fare { color: #b3195c; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.ebs-male { border-color: #3d8fd6; background: #fff; color: #08486f; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.ebs-male .ebs-pillow { background: #d6e7fa; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.ebs-male .ebs-fare { color: #0b5d94; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-booked, #embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-booked:hover {
  background: #ececf0 !important; border: 2px dashed #a9adbb !important; color: #4b5469 !important; cursor: not-allowed; box-shadow: none !important; transform: none !important; opacity: 1;
}
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-booked .ebs-fare { color: #8a90a2; font-weight: 600; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.ebs-blocked, #embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.ebs-blocked:hover { background: repeating-linear-gradient(45deg, #fbefd3 0 7px, #f6e3b4 7px 14px) !important; border: 2px solid #d49a1c !important; color: #5c3a00 !important; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.ebs-blocked .ebs-fare { color: #7a4d00; font-weight: 700; }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-selected, #embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-selected:hover {
  background: var(--ebs-green) !important; color: #fff !important; border: 3px solid var(--ebs-green-dark) !important; transform: none !important;
  box-shadow: 0 0 0 3px rgba(31, 157, 85, .28), 0 4px 10px rgba(21, 128, 61, .35) !important;
}
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-selected .ebs-pillow { background: rgba(255, 255, 255, .55); }
#embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat.seat-selected .ebs-fare { color: var(--ebs-green-dark); font-weight: 800; }

/* corner badges: always real text, so state never depends on colour alone. They overhang the seat's corner so they never cover the number. */
#embark-bus-widget #eb-seat-grid .ebs-ico { position: absolute; display: none; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 1.5px solid #9aa3b8; font-style: normal; font-weight: 800; line-height: 1; z-index: 2; }
#embark-bus-widget #eb-seat-grid .ebs-ico-booked { display: inline-flex; top: -7px; right: -6px; font-size: 9px; color: #4b5469; }
#embark-bus-widget #eb-seat-grid .ebs-ico-ladies, #embark-bus-widget #eb-seat-grid .ebs-ico-male { display: inline-flex; top: -7px; left: -6px; font-size: 11px; }
#embark-bus-widget #eb-seat-grid .ebs-ico-ladies { color: #b3195c; border-color: #e8548f; }
#embark-bus-widget #eb-seat-grid .ebs-ico-male { color: #0b5d94; border-color: #3d8fd6; }
#embark-bus-widget #eb-seat-grid .ebs-seat.seat-selected .ebs-ico-sel { display: inline-flex; top: -8px; right: -7px; width: 19px; height: 19px; background: #fff; border-color: var(--ebs-green-dark); color: var(--ebs-green-dark); font-size: 11px; box-shadow: 0 1px 4px rgba(21, 128, 61, .4); }

/* the map replaces the skin's decorative frame/headlights and its fixed-aisle legend */
#embark-bus-widget #eb-seat-picker.ebs-on .kbu-seat-bus-frame { background: none; border: 0; box-shadow: none; padding: 0; max-width: 100%; width: 100%; min-width: 0; border-radius: 0; }
#embark-bus-widget #eb-seat-picker.ebs-on .kbu-bus-headlights, #embark-bus-widget #eb-seat-picker.ebs-on .seat-legend { display: none; }
/* grid/flex items default to min-width:auto and would let a wide bus stretch the page — it must scroll inside its own frame instead */
#embark-bus-widget #eb-seat-picker.ebs-on #eb-seat-grid, #embark-bus-widget #eb-seat-picker.ebs-on .kbu-seat-layout-wrap, #embark-bus-widget #eb-seat-picker.ebs-on .seat-layout-wrap { min-width: 0; max-width: 100%; }

/* ---- responsive (seats keep a usable size; decks wrap, a wide bus scrolls instead of shrinking) ---- */
@media (max-width: 1023px) { #embark-bus-widget #eb-seat-grid .ebs-wrap { --ebs-aisle: 30px; } }
@media (max-width: 640px) {
  #embark-bus-widget #eb-seat-grid .ebs-wrap { --ebs-w: 44px; --ebs-wmin: 32px; --ebs-h: 48px; --ebs-gap: 4px; --ebs-rgap: 24px; --ebs-aisle: 24px; --ebs-amin: 10px; }
  #embark-bus-widget #eb-seat-grid .ebs-wrap.ebs-tall { --ebs-h: 86px; }
  #embark-bus-widget #eb-seat-grid .ebs-decks { gap: 8px; }
  #embark-bus-widget #eb-seat-grid .ebs-deck { padding: 10px 6px 12px; border-radius: 14px; }
  #embark-bus-widget #eb-seat-grid .ebs-head { min-height: 34px; gap: 6px; margin-bottom: 8px; padding: 0 1px; }
  #embark-bus-widget #eb-seat-grid .ebs-title { font-size: 15px; }
  #embark-bus-widget #eb-seat-grid .ebs-wheel { width: 30px; height: 30px; }
  #embark-bus-widget #eb-seat-grid .ebs-bus { padding: 8px 4px 10px; border-radius: 16px 16px 12px 12px; }
  #embark-bus-widget #eb-seat-grid .ebs-scroll { padding: 8px 0 26px; margin: -8px 0 -10px; max-width: 100%; }
  #embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat { border-radius: 8px; padding-left: 1px; padding-right: 1px; }
  #embark-bus-widget #eb-seat-grid .ebs-seat .ebs-num { font-size: 13.5px; }
  #embark-bus-widget #eb-seat-grid .ebs-seat .ebs-fare { font-size: 10.5px; letter-spacing: -.03em; }
  #embark-bus-widget #eb-seat-grid .ebs-legend { gap: 6px 11px; font-size: 11.5px; }
}
@media (max-width: 360px) { #embark-bus-widget #eb-seat-grid .ebs-wrap { --ebs-aisle: 20px; --ebs-amin: 9px; } #embark-bus-widget #eb-seat-grid .ebs-seat .ebs-num { font-size: 13px; } }
@media (max-width: 330px) { #embark-bus-widget #eb-seat-grid .ebs-seat .ebs-fare { font-size: 9.5px; letter-spacing: -.06em; } }
@media (max-width: 340px) { #embark-bus-widget #eb-seat-grid .ebs-wrap { --ebs-wmin: 28px; --ebs-amin: 8px; --ebs-gap: 3px; } #embark-bus-widget #eb-seat-grid .ebs-seat .ebs-num { font-size: 12px; } #embark-bus-widget #eb-seat-grid .ebs-seat .ebs-fare { font-size: 10px; } }
/* phones/tablets turned sideways: short viewport — same two columns, shorter rows */
@media (orientation: landscape) and (max-height: 520px) {
  #embark-bus-widget #eb-seat-grid .ebs-wrap { --ebs-rgap: 24px; --ebs-aisle: 24px; }
  #embark-bus-widget #eb-seat-grid .ebs-wrap.ebs-tall { --ebs-h: 80px; }
  #embark-bus-widget #eb-seat-grid .ebs-legend { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { #embark-bus-widget #eb-seat-grid .ebs-seat.bus-seat { transition: none; } }
