/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS PAGE — Trip.com / Skyscanner inspired
   All colors / spacing / typography pulled from style.css :root tokens.
   Sections (top→bottom): search bar · layout · sort tabs · filters · cards ·
   roundtrip cards · expandable timeline · skeleton · no-results · modals ·
   RT/MC summary bar · responsive.
   ═══════════════════════════════════════════════════════════════════════════ */

body { padding-top: 64px; background: var(--bg); }

/* ══════════════════════════════════════════════════════════════════════════
   COMPACT SEARCH BAR — sticky under navbar
   ══════════════════════════════════════════════════════════════════════════ */
.search-bar {
  position: sticky; top: 64px; z-index: var(--z-dropdown);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
  transition: transform var(--duration-slow) var(--easing),
              opacity var(--duration) var(--easing);
  will-change: transform;
}
/* Auto-hide state — applied by results.js on scroll-down (mobile only). */
.search-bar.is-hidden { transform: translateY(-110%); opacity: 0; pointer-events: none; }

/* Mobile compact pill — hidden by default, shown only ≤768px (rule below). */
.sb-compact-pill { display: none; }
/* Mobile-only edit-mode close button — hidden by default on desktop */
.sb-edit-close { display: none; }
.sb-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 var(--space-5);
}
.sb-fields {
  display: flex; align-items: stretch; gap: 1px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  position: relative;
}
.sb-field {
  flex: 1; min-width: 0;
  padding: 10px 14px;
  background: var(--bg-elevated);
  position: relative;
  cursor: pointer;
  transition: background var(--duration) var(--easing);
}
.sb-field:first-child  { border-radius: 12px 0 0 12px; }
.sb-field + .sb-field  { border-left: 1px solid var(--border); }
.sb-field:hover { background: var(--bg-hover); }
.sb-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.sb-value {
  font-size: var(--text-md);
  font-weight: var(--weight-semi);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-type-input {
  position: absolute; inset: 10px 14px;
  width: calc(100% - 28px);
  border: none; outline: none; background: transparent;
  font-size: var(--text-md); font-weight: var(--weight-semi);
  font-family: inherit; color: var(--text);
  display: none;
}
.sb-field.typing .sb-value { visibility: hidden; }
.sb-field.typing .sb-type-input { display: block; }
.sb-swap {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  align-self: center; flex-shrink: 0;
  margin: 0 -16px; z-index: 2;
  cursor: pointer; color: var(--primary);
  transition: transform var(--duration) var(--easing), box-shadow var(--duration);
}
.sb-swap:hover { transform: rotate(180deg); box-shadow: var(--shadow-sm); }
.sb-swap svg { width: 14px; height: 14px; }
.sb-sep {
  width: 1px; background: var(--border); margin: 8px 0;
}
.sb-search-btn {
  background: var(--accent); color: white; border: none;
  border-radius: 0 12px 12px 0;
  padding: 0 24px;
  font-size: var(--text-md); font-weight: var(--weight-bold);
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; transition: background var(--duration) var(--easing);
}
.sb-search-btn:hover { background: var(--accent-dark); }
.sb-search-btn svg { width: 18px; height: 18px; }

/* Airport dropdown (under field) */
.airport-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 320px; overflow-y: auto;
  display: none; z-index: var(--z-dropdown);
}
.airport-dropdown.open,
.airport-dropdown.is-open { display: block; }
.airport-dropdown .airport-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--bg-subtle);
}
.airport-dropdown .airport-item:hover { background: var(--primary-tint); }
.airport-dropdown .ai-code {
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  color: var(--primary); min-width: 38px;
}
.airport-dropdown .ai-info { flex: 1; min-width: 0; }
.airport-dropdown .ai-city {
  font-size: var(--text-base); font-weight: var(--weight-semi);
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.airport-dropdown .ai-country {
  font-size: var(--text-xs); color: var(--text-muted);
}

/* Passenger panel */
.sb-pax-panel {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  min-width: 320px;
  display: none; z-index: var(--z-dropdown);
}
.sb-pax-panel.open,
.sb-pax-panel.is-open { display: block; }
.sb-pax-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--bg-subtle);
}
.sb-pax-row:last-of-type { border-bottom: none; }
.sb-pax-type { font-size: var(--text-base); font-weight: var(--weight-semi); color: var(--text); }
.sb-pax-hint { font-size: var(--text-xs); color: var(--text-muted); }
.sb-pax-counter { display: flex; align-items: center; gap: var(--space-3); }
.sb-pax-counter button {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  font-size: var(--text-md); font-weight: var(--weight-semi);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--duration) var(--easing);
}
.sb-pax-counter button:hover { border-color: var(--primary); color: var(--primary); }
.sb-pax-counter button:disabled { opacity: 0.4; cursor: not-allowed; }
.sb-pax-counter span { min-width: 18px; text-align: center; font-weight: var(--weight-semi); }
.sb-pax-class { padding-top: var(--space-4); border-top: 1px solid var(--border); margin-top: var(--space-3); }
.sb-pax-class-label { font-size: var(--text-xs); font-weight: var(--weight-semi); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--space-2); }
.sb-pax-class-options { display: flex; gap: var(--space-2); }
.sb-class-opt {
  flex: 1; padding: var(--space-2) var(--space-3);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  color: var(--text); cursor: pointer;
  transition: all var(--duration) var(--easing);
}
.sb-class-opt.active,
.sb-class-opt.is-active { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.sb-pax-done {
  width: 100%; margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-base); font-weight: var(--weight-semi);
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT — sidebar + main
   ══════════════════════════════════════════════════════════════════════════ */
.results-page {
  max-width: 1280px; margin: 0 auto;
  padding: var(--space-6) var(--space-5);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
}
.filters-sidebar { position: relative; }
.filter-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: sticky;
  top: calc(64px + 80px + var(--space-4));
  max-height: calc(100vh - 64px - 80px - 32px);
  overflow-y: auto;
  /* Keep the panel scrollable (so lower filters stay reachable on short
     screens) but hide the visible scrollbar — it looked like clutter. */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* old Edge/IE */
}
.filter-card::-webkit-scrollbar { width: 0; height: 0; display: none; } /* Chrome/Safari */
.results-main { min-width: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   RESULTS HEADER (count + sort tabs)
   ══════════════════════════════════════════════════════════════════════════ */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
/* Agent-only Netto/Brutto switch. Sits with the sort tabs on the right, so the
   result count keeps the left edge to itself. Empty (and invisible) whenever
   there is no public price to compare against. */
.obp-mode-slot { margin-left: auto; }
.obp-mode-slot:empty { display: none; }

.results-count {
  font-size: var(--text-base); color: var(--text-secondary);
  font-weight: var(--weight-medium);
}
.results-count strong { color: var(--text); font-weight: var(--weight-bold); }
.sort-tabs {
  display: flex; gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
}
.sort-tab {
  background: transparent; border: none;
  padding: 8px 18px; border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text-secondary); cursor: pointer;
  font-family: inherit;
  transition: all var(--duration) var(--easing);
}
.sort-tab:hover { color: var(--text); }
.sort-tab.active {
  background: var(--primary); color: white;
  box-shadow: var(--shadow-sm);
}
.filters-toggle {
  display: none;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text); cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════════════
   FILTERS SIDEBAR
   ══════════════════════════════════════════════════════════════════════════ */
.filter-group {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.filter-group:first-child { padding-top: 0; }
.filter-group:last-of-type { border-bottom: none; padding-bottom: 0; }
.filter-title {
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  color: var(--text); margin-bottom: var(--space-3);
}
.filter-check {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 6px 0;
  font-size: var(--text-sm); color: var(--text);
  cursor: pointer;
  user-select: none;
}
.filter-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.filter-check span { flex: 1; }
.filter-check .check-count,
.filter-check .check-price {
  font-size: var(--text-xs); color: var(--text-muted);
  font-weight: var(--weight-medium);
}
.filter-check .check-price { color: var(--primary); font-weight: var(--weight-semi); }
.filter-airline-row { gap: var(--space-3); }
.filter-airline-name {
  flex: 1; min-width: 0;
  font-size: var(--text-sm); color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filter-check .filter-airline-count {
  flex: 0 0 auto;
  font-size: var(--text-xs); color: var(--text-muted);
  font-weight: var(--weight-medium);
}

/* Time-of-day buckets */
.time-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.time-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-family: inherit; cursor: pointer;
  transition: all var(--duration) var(--easing);
}
.time-btn:hover { border-color: var(--primary); }
.time-btn.active { background: var(--primary-tint); border-color: var(--primary); }
.time-btn .t-label {
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text);
}
.time-btn .t-range {
  font-size: var(--text-xs); color: var(--text-muted);
  margin-top: 2px;
}
.time-btn.active .t-label { color: var(--primary); }

/* Price slider */
.price-display {
  display: flex; justify-content: space-between;
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text); margin-bottom: var(--space-3);
}
.price-slider-wrap { padding: 4px 0; }
.price-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; background: var(--border);
  border-radius: var(--radius-pill); outline: none;
}
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  background: var(--primary); border-radius: 50%;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform var(--duration);
}
.price-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.price-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--primary); border-radius: 50%;
  cursor: pointer; border: none;
}
.reset-filters-btn {
  width: 100%; margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text); cursor: pointer;
  transition: all var(--duration) var(--easing);
}
.reset-filters-btn:hover { background: var(--bg-hover); border-color: var(--primary); color: var(--primary); }

/* ══════════════════════════════════════════════════════════════════════════
   FLIGHT CARD — main one-way card (Trip.com style)
   ══════════════════════════════════════════════════════════════════════════ */
.results-list { display: block; }
.flight-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--duration) var(--easing), border-color var(--duration);
}
.flight-card + .flight-card { margin-top: var(--space-4); }
.flight-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--card-shadow-hover);
}
.fc-main {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  align-items: center;
  padding: var(--space-5);
  gap: var(--space-5);
}

/* Airline column */
.fc-airline {
  display: flex; flex-direction: column; gap: var(--space-1);
  min-width: 0;
}
.fc-airline-badge {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; font-size: var(--text-sm); font-weight: var(--weight-bold);
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.3px;
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow-xs);
}
/* Real airline logo tile; falls back to the coloured letter badge onerror. */
.fc-airline-logo {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border, #e6eaf0);
  display: grid; place-items: center;
  overflow: hidden;
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow-xs);
}
.fc-airline-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 5px; box-sizing: border-box;
}
.fc-airline-logo.is-fallback {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 0;
  color: #fff; font-size: var(--text-sm); font-weight: var(--weight-bold); letter-spacing: -0.3px;
}
.fc-airline-logo.is-fallback::after { content: attr(data-badge); }
.fc-airline-name {
  font-size: var(--text-base); font-weight: var(--weight-semi);
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fc-flight-num {
  font-size: var(--text-xs); color: var(--text-muted);
  font-weight: var(--weight-medium);
}
.fc-fare-family {
  display: inline-block;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 10px; font-weight: var(--weight-bold);
  padding: 2px 6px; border-radius: var(--radius-xs);
  text-transform: uppercase; letter-spacing: 0.3px;
  margin-top: 4px; align-self: flex-start;
}

/* Journey column */
.fc-journey {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.fc-point {
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
}
.fc-point:first-child { align-items: flex-start; text-align: left; }
.fc-point:last-child  { align-items: flex-end;   text-align: right; }
.fc-time {
  font-size: var(--text-2xl); font-weight: var(--weight-bold);
  color: var(--text); line-height: 1;
}
/* City name is PRIMARY (bigger + bold); airport code is secondary/muted below it. */
.fc-city-name {
  font-size: var(--text-base); font-weight: var(--weight-bold);
  color: var(--text);
  margin-top: var(--space-1);
  max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fc-airport-code {
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  color: var(--text-muted);
  margin-top: 1px;
  letter-spacing: 0.5px;
}
.fc-date-small {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.3px;
}

/* Middle journey line */
.fc-line {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 0 var(--space-2);
  min-width: 0;
}
.fc-duration {
  font-size: var(--text-xs); color: var(--text-secondary);
  font-weight: var(--weight-medium);
}
.fc-travel-line {
  display: flex; align-items: center;
  width: 100%; min-width: 80px;
  gap: 2px;
}
.fc-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.fc-dashes {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0, var(--border-strong) 3px, transparent 3px, transparent 6px);
}
.fc-plane-icon {
  font-size: 14px; color: var(--primary);
  flex-shrink: 0;
  transform: rotate(0deg);
}
/* Stops chip / button */
.fc-stops-label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); font-weight: var(--weight-semi);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.fc-stops-label.direct {
  background: var(--success-tint); color: var(--success);
}
.fc-stops-label.one-stop {
  background: var(--warning-tint); color: var(--warning);
}
.fc-stops-label.two-plus {
  background: var(--danger-tint); color: var(--danger);
}
button.fc-stops-toggle {
  background: var(--warning-tint); color: var(--warning);
  border: 1px solid transparent;
  cursor: pointer; font-family: inherit;
  transition: all var(--duration) var(--easing);
}
button.fc-stops-toggle.direct   { background: var(--success-tint); color: var(--success); }
button.fc-stops-toggle.one-stop { background: var(--warning-tint); color: var(--warning); }
button.fc-stops-toggle.two-plus { background: var(--danger-tint);  color: var(--danger); }
button.fc-stops-toggle:hover { border-color: currentColor; }
.fc-stops-chev { transition: transform var(--duration); font-size: 10px; }

/* Hover tooltip listing layover airports + wait (Kiwi-style peek) */
.has-tip { position: relative; }
.fc-stoptip {
  position: absolute; top: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #0f172a; color: #fff;
  border-radius: 10px; padding: 9px 11px;
  min-width: 168px; max-width: 250px; width: max-content;
  box-shadow: 0 10px 28px rgba(15,23,42,.28);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .15s, transform .15s; z-index: 40;
  text-align: left; white-space: normal;
}
.fc-stoptip::after {
  content: ''; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent; border-bottom-color: #0f172a;
}
.has-tip:hover .fc-stoptip {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.fc-stoptip-row { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; line-height: 1.35; color: #cbd5e1; }
.fc-stoptip-row + .fc-stoptip-row { margin-top: 6px; }
.fc-stoptip-dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; margin-top: 4px; flex-shrink: 0; }
.fc-stoptip-row b { color: #fff; font-weight: 700; }

/* Price column */
.fc-price-area {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center;
  gap: var(--space-2);
  padding-left: var(--space-4);
  border-left: 1px solid var(--border);
}
.fc-price {
  font-size: var(--text-2xl); font-weight: var(--weight-extra);
  color: var(--primary);
  line-height: 1;
}
.fc-price-note {
  font-size: var(--text-xs); color: var(--text-muted);
  font-weight: var(--weight-medium);
}
.fc-total-note {
  font-size: var(--text-xs); color: var(--text-secondary);
  text-align: right;
}
.fc-book-btn, .fc-select-btn {
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  cursor: pointer; font-family: inherit;
  letter-spacing: 0.2px;
  transition: background var(--duration) var(--easing), transform var(--duration);
  box-shadow: var(--shadow-xs);
}
.fc-book-btn:hover, .fc-select-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.fc-book-btn-disabled, .fc-book-btn[disabled] {
  background: var(--border-strong) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  box-shadow: none !important;
  transform: none !important;
}
.fc-select-btn--chosen {
  background: var(--success);
}
.fc-select-btn--chosen:hover { background: #047857; }
.fc-is-selected {
  border-color: var(--success);
  background: var(--success-tint);
}

/* Card footer chips */
.fc-footer {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}
.fc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); font-weight: var(--weight-semi);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.fc-tag.green  { background: var(--success-tint); color: var(--success); }
.fc-tag.orange { background: var(--warning-tint); color: var(--warning); }
.fc-tag.blue   { background: var(--info-tint);    color: var(--info); }
.fc-tag.red    { background: var(--danger-tint);  color: var(--danger); }
.fc-tag svg { width: 13px; height: 13px; flex-shrink: 0; }
/* Fare-rules pill button */
.fc-policy-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: var(--weight-semi);
  color: var(--text-muted);
  background: var(--bg-subtle, #f4f6fa);
  border: 1px solid var(--border, #e6eaf0);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.fc-policy-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.fc-policy-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--info-tint, #eef4ff);
}

/* ══════════════════════════════════════════════════════════════════════════
   ROUNDTRIP COMBO CARDS (one card holds Ketish + Qaytish)
   ══════════════════════════════════════════════════════════════════════════ */
.rt-combo-card { padding: 0; }
.rt-combo-main {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
}
.rt-combo-legs {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.rt-leg-wrap {
  padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.rt-leg-label {
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.rt-leg-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-4);
  align-items: center;
}
.rt-leg-airline {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.rt-leg-airline .fc-airline-badge,
.rt-leg-airline .fc-airline-logo { margin-bottom: var(--space-2); }
.rt-leg-airline .fc-airline-name {
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text);
}
.rt-leg-airline .fc-flight-num { font-size: var(--text-xs); color: var(--text-muted); }
.rt-sep {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0, var(--border-strong) 4px, transparent 4px, transparent 9px);
  margin: 0 var(--space-5);
}
.rt-combo-card .fc-price-area {
  padding: var(--space-5);
  border-left: 1px solid var(--border);
  align-items: stretch;
  justify-content: center;
  gap: var(--space-3);
}
.rt-combo-card .fc-price-area .fc-price { text-align: right; }
.rt-combo-card .fc-price-area .fc-price-note { text-align: right; }
.rt-combo-card .fc-price-area .fc-total-note { text-align: right; }

.rt-leg-missing { opacity: 0.7; }
.rt-missing-note {
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  color: var(--warning);
  background: var(--warning-tint);
  border-left: 3px solid var(--warning);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

/* Segment-section header (multi-city) */
.seg-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--primary-tint);
  border-radius: var(--radius-sm);
  margin: var(--space-5) 0 var(--space-3);
}
.seg-hdr-label {
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  color: var(--primary);
}
.seg-hdr-sel { font-size: var(--text-xs); color: var(--success); font-weight: var(--weight-semi); }
.seg-hdr-empty { font-size: var(--text-xs); color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   EXPANDABLE SEGMENT TIMELINE (when user clicks stops chip)
   ══════════════════════════════════════════════════════════════════════════ */
.fc-detail-panel {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: var(--space-5);
}
.fcs-wrap { display: flex; flex-direction: column; gap: var(--space-3); }
.fcs-seg {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.fcs-seg-head {
  display: flex; align-items: center; gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--border);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.fcs-seg-num {
  width: 22px; height: 22px;
  background: var(--primary); color: white;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--weight-bold);
}
.fcs-seg-airline {
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text);
}
.fcs-seg-flightnum {
  font-size: var(--text-xs); color: var(--text-muted);
  padding: 2px 6px; background: var(--bg-subtle); border-radius: var(--radius-xs);
}
.fcs-seg-dur {
  margin-left: auto;
  font-size: var(--text-xs); color: var(--text-secondary);
  font-weight: var(--weight-medium);
}
.fcs-seg-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}
.fcs-pt { min-width: 0; }
.fcs-pt:last-child { text-align: right; }
.fcs-pt-time {
  font-size: var(--text-xl); font-weight: var(--weight-bold);
  color: var(--text); line-height: 1;
}
.fcs-pt-code {
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--primary);
  margin-top: 4px;
}
.fcs-pt-city {
  font-size: var(--text-xs); color: var(--text-secondary);
  margin-top: 2px;
}
.fcs-pt-date {
  font-size: var(--text-xs); color: var(--text-muted);
  margin-top: 2px;
}
.fcs-pt-apname {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}
.fcs-pt-arrow {
  font-size: 18px; color: var(--text-muted);
}
.fcs-seg-meta {
  font-size: var(--text-xs); color: var(--text-secondary);
  margin-top: var(--space-3); padding-top: var(--space-3);
  border-top: 1px dashed var(--border);
}
.fcs-seg-amen {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: var(--space-2);
}
.fcs-amen {
  font-size: 11px; color: var(--text-secondary);
  background: var(--bg-subtle, #f1f5f9);
  border-radius: 999px; padding: 2px 9px;
  white-space: nowrap;
}
.fcs-amen.is-paid { color: var(--text-muted); }
.fcs-layover {
  display: flex; justify-content: center;
  padding: var(--space-2) 0;
}
.fcs-layover-badge {
  font-size: var(--text-xs); font-weight: var(--weight-semi);
  color: var(--warning);
  background: var(--warning-tint);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--warning);
}

/* ══════════════════════════════════════════════════════════════════════════
   LOADING SKELETON
   ══════════════════════════════════════════════════════════════════════════ */
.skeleton-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.sk-row {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: var(--space-5);
  align-items: center;
}
.sk-block {
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--bg-hover) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.sk-airline { height: 48px; }
.sk-journey { height: 60px; }
.sk-price   { height: 48px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══════════════════════════════════════════════════════════════════════════
   NO RESULTS
   ══════════════════════════════════════════════════════════════════════════ */
.no-results {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-6);
  text-align: center;
}
.no-results-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: var(--bg-subtle);
  border-radius: 50%;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.no-results-icon svg { width: 28px; height: 28px; }
.no-results-title {
  font-size: var(--text-xl); font-weight: var(--weight-bold);
  color: var(--text); margin-bottom: var(--space-2);
}
.no-results-sub {
  font-size: var(--text-sm); color: var(--text-secondary);
  margin-bottom: var(--space-5);
}
.cta-btn {
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  cursor: pointer; font-family: inherit;
}
.cta-btn:hover { background: var(--primary-dark); }

/* ══════════════════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: var(--z-overlay);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open,
.modal-overlay.is-open { display: flex; }
.airport-modal, .booking-modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 90%; max-width: 520px;
  max-height: 80vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.booking-modal { max-width: 560px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-lg); font-weight: var(--weight-bold);
}
.modal-close {
  background: var(--bg-subtle); border: none;
  border-radius: 50%; width: 32px; height: 32px;
  font-size: var(--text-md); color: var(--text-secondary);
  cursor: pointer;
}
.modal-search { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.modal-search input {
  width: 100%; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base); font-family: inherit;
  outline: none;
}
.modal-search input:focus { border-color: var(--primary); }
.modal-results { flex: 1; overflow-y: auto; padding: var(--space-2); }
.airport-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.airport-row:hover { background: var(--primary-tint); }
.airport-row .ar-code { font-weight: var(--weight-bold); color: var(--primary); min-width: 40px; }
.airport-row .ar-city { font-size: var(--text-base); font-weight: var(--weight-semi); color: var(--text); }
.airport-row .ar-country { font-size: var(--text-xs); color: var(--text-muted); }

/* Booking modal content */
.booking-content { padding: var(--space-5); overflow-y: auto; }
.booking-flight-info {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.booking-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--text-lg); font-weight: var(--weight-bold);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
}
.booking-note { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-4); }
.book-proceed-btn {
  width: 100%; padding: var(--space-4);
  background: var(--accent); color: white; border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-base); font-weight: var(--weight-bold);
  cursor: pointer;
}
.book-proceed-btn:hover { background: var(--accent-dark); }
.booking-divider {
  text-align: center; margin: var(--space-4) 0;
  color: var(--text-muted); font-size: var(--text-xs);
  position: relative;
}
.booking-divider::before, .booking-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 40%; height: 1px; background: var(--border);
}
.booking-divider::before { left: 0; }
.booking-divider::after  { right: 0; }
.booking-actions { display: flex; flex-direction: column; gap: var(--space-2); }
.book-contact-btn {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--weight-semi);
  color: var(--text); cursor: pointer;
}
.book-contact-btn:hover { background: var(--bg-hover); }
.book-contact-btn.whatsapp .bcb-icon { color: #25D366; width: 20px; height: 20px; }
.book-contact-btn.telegram .bcb-icon { color: #0088CC; width: 20px; height: 20px; }
.book-contact-btn.phone    .bcb-icon { color: var(--primary); width: 20px; height: 20px; }
.booking-trust {
  font-size: var(--text-xs); color: var(--text-muted);
  text-align: center; margin-top: var(--space-3);
}

/* ══════════════════════════════════════════════════════════════════════════
   RT/MC SUMMARY BAR (sticky bottom)
   ══════════════════════════════════════════════════════════════════════════ */
.rtmc-summary {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-5);
  display: flex; align-items: center; gap: var(--space-4);
  z-index: var(--z-nav);
}
.rtmc-legs { flex: 1; font-size: var(--text-sm); color: var(--text); }
.rtmc-price { font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--primary); }
.rtmc-book-btn {
  background: var(--accent); color: white; border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: var(--text-sm); font-weight: var(--weight-bold);
  cursor: pointer;
}
.rtmc-book-btn:disabled { background: var(--border-strong); cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   Breakpoints:  ≤1024 tablet  ·  ≤768 phone-landscape  ·  ≤480 phone-portrait
   Goal: 44px+ touch targets, no horizontal scroll, full-width CTAs, bottom-
   sheet modals, hamburger filter drawer, sticky bottom-bar with body padding.
   ══════════════════════════════════════════════════════════════════════════ */

/* Backdrop overlay shared between filter drawer & pax panel (mobile) */
.mobile-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: calc(var(--z-overlay) - 1);
  display: none;
  backdrop-filter: blur(2px);
}
.mobile-backdrop.open { display: block; }

/* ── ≤ 1024px (tablet & smaller) ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .results-page {
    grid-template-columns: 1fr;
    padding: var(--space-4);
  }
  .filters-sidebar {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(360px, 88vw);
    background: var(--bg-elevated);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--easing);
    z-index: var(--z-overlay);
    box-shadow: var(--shadow-lg);
    padding: var(--space-5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .filters-sidebar.open,
  .filters-sidebar.is-open { transform: translateX(0); }
  .filter-card { position: static; max-height: none; border: none; padding: 0; }
  .filters-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px;
  }
  /* Filter drawer header with close button (added on mobile only) */
  .filters-sidebar::before {
    content: '';
    display: block;
    height: var(--space-3);
  }
}

/* ── ≤ 768px (phone landscape) ────────────────────────────────────────── */
@media (max-width: 768px) {
  body { padding-top: 56px; }
  .navbar { height: 56px; }
  .navbar .currency-toggle { display: none; }   /* moved to a /more menu later */
  .navbar .btn-help        { display: none; }
  .navbar .btn-agent       { padding: 6px 10px; font-size: var(--text-xs); }

  .search-bar {
    top: 56px;
    padding: var(--space-2) 0;
  }
  .sb-inner { padding: 0 var(--space-3); }

  /* Mobile compact pill is the DEFAULT view; full fields hidden until tap. */
  .sb-compact-pill {
    display: flex;
    width: 100%;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    font-family: inherit;
    text-align: left;
    transition: border-color var(--duration);
  }
  .sb-compact-pill:hover { border-color: var(--primary-light); }
  .sb-compact-pill .sb-cp-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    gap: 2px;
  }
  .sb-compact-pill .sb-cp-route {
    font-size: var(--text-base); font-weight: var(--weight-bold);
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sb-compact-pill .sb-cp-meta {
    font-size: var(--text-xs); color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sb-compact-pill .sb-cp-edit {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: var(--radius-pill);
    background: var(--primary-tint);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
  }
  .sb-compact-pill .sb-cp-edit svg { width: 16px; height: 16px; }
  /* Hide the expanded form until user taps the pill. */
  .sb-fields { display: none; }

  /* When the user taps the pill, slide the expanded form down as an overlay
     beneath the navbar — fields stack and the search button anchors the
     bottom. The pill itself hides so the form gets full vertical room. */
  .search-bar.is-edit-mode {
    position: fixed;
    top: 56px; left: 0; right: 0; bottom: 0;
    height: auto;
    padding: var(--space-3);
    background: var(--bg-elevated);
    z-index: var(--z-modal);
    overflow-y: auto;
    border-bottom: none;
  }
  .search-bar.is-edit-mode .sb-compact-pill { display: none; }
  .search-bar.is-edit-mode .sb-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 6px;
    border-radius: var(--radius);
  }
  /* Close button only present in edit mode */
  .sb-edit-close {
    display: none;
    background: var(--bg-subtle); border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    color: var(--text); cursor: pointer;
    margin-bottom: var(--space-3);
  }
  .search-bar.is-edit-mode .sb-edit-close { display: inline-flex; }
  .sb-field {
    width: 100%;
    padding: 10px 12px;
    min-height: 56px;
    display: flex; flex-direction: column; justify-content: center;
  }
  .sb-field:first-child  { border-radius: 8px 8px 0 0; }
  .sb-field + .sb-field {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .sb-search-btn {
    width: 100%;
    border-radius: 0 0 8px 8px;
    padding: 14px;
    justify-content: center;
    min-height: 48px;
  }
  .sb-swap { display: none; }
  .sb-sep  { display: none; }

  /* Pax panel as bottom-sheet on mobile. Backdrop is rendered as a real
     sibling div (.mobile-backdrop) by results.js — pseudo-element backdrops
     escape their parent's stacking context and bleed the page through. */
  .sb-pax-panel {
    position: fixed !important;
    top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
    min-width: 0;
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(15,23,42,0.18);
    padding: var(--space-5);
    z-index: var(--z-modal);
    max-height: 80vh;
    overflow-y: auto;
    animation: sheetSlideUp var(--duration-slow) var(--easing);
  }
  .sb-pax-panel.open,
  .sb-pax-panel.is-open { display: block; }
  /* Drag handle for bottom-sheet ergonomics */
  .sb-pax-panel::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    border-radius: var(--radius-pill);
    background: var(--border-strong);
    margin: -8px auto var(--space-3);
  }
  @keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  /* Airport typeahead dropdown — full screen-width on mobile */
  .airport-dropdown {
    left: -1px; right: -1px;
    max-height: 60vh;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  /* Sort tabs row */
  .results-header {
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }
  .results-count {
    flex: 1 1 100%;
    font-size: var(--text-sm);
  }
  .sort-tabs {
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sort-tabs::-webkit-scrollbar { display: none; }
  .sort-tab {
    padding: 8px 14px;
    font-size: var(--text-xs);
    white-space: nowrap;
    min-height: 36px;
  }
  .filters-toggle {
    background: var(--primary); color: white;
    border-color: var(--primary);
    padding: 8px 14px;
  }

  /* Flight card — fully vertical stack */
  .fc-main {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-4);
  }
  .fc-airline {
    flex-direction: row; align-items: center;
    gap: var(--space-3);
  }
  .fc-airline-badge,
  .fc-airline-logo {
    margin-bottom: 0;
    width: 36px; height: 36px;
  }
  .fc-airline > div:nth-child(2) { flex: 1; min-width: 0; }
  .fc-fare-family { margin-top: 0; align-self: center; }

  .fc-journey {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-2);
  }
  .fc-time { font-size: var(--text-xl); }
  .fc-line { padding: 0; }
  .fc-city-name { max-width: 110px; font-size: var(--text-sm); font-weight: var(--weight-bold); }
  .fc-airport-code { font-size: 10px; }

  .fc-price-area {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: var(--space-3);
    align-items: stretch;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .fc-price-area .fc-price       { font-size: var(--text-2xl); }
  .fc-price-area .fc-price-note  { flex: 1; text-align: left; padding-left: var(--space-2); }
  .fc-book-btn, .fc-select-btn {
    width: 100%;
    flex: 1 1 100%;
    min-height: 44px;
    padding: 12px;
    font-size: var(--text-base);
  }

  /* Roundtrip combo card */
  .rt-combo-main { grid-template-columns: 1fr; }
  .rt-combo-legs { border-right: none; border-bottom: 1px solid var(--border); }
  .rt-combo-card .fc-price-area {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: var(--space-4);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .rt-combo-card .fc-price-area .fc-price,
  .rt-combo-card .fc-price-area .fc-price-note,
  .rt-combo-card .fc-price-area .fc-total-note { text-align: left; }
  .rt-combo-card .fc-price-area .fc-book-btn { flex: 1 1 100%; }

  .rt-leg-wrap { padding: var(--space-4); }
  .rt-leg-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .rt-leg-airline {
    flex-direction: row; align-items: center;
    gap: var(--space-3);
  }
  .rt-leg-airline .fc-airline-badge,
  .rt-leg-airline .fc-airline-logo {
    width: 32px; height: 32px;
    margin-bottom: 0; flex-shrink: 0;
  }
  .rt-sep { margin: 0 var(--space-4); }
  .rt-missing-note { font-size: var(--text-xs); padding: var(--space-3); }

  /* Card footer chips wrap nicely */
  .fc-footer { padding: var(--space-3) var(--space-4); gap: 6px; }
  .fc-tag { font-size: 10px; padding: 3px 8px; }

  /* Segment timeline (expanded layovers) */
  .fc-detail-panel { padding: var(--space-4); }
  .fcs-seg-body { grid-template-columns: 1fr; gap: var(--space-3); }
  .fcs-pt:last-child { text-align: left; }
  .fcs-pt-arrow { transform: rotate(90deg); display: block; text-align: center; }
  .fcs-seg-head { gap: var(--space-2); }
  .fcs-seg-dur { width: 100%; margin-left: 0; }

  /* Skeleton */
  .skeleton-card .sk-row { grid-template-columns: 1fr; gap: var(--space-3); }
  .sk-airline, .sk-price { height: 36px; }
  .sk-journey { height: 80px; }

  /* Modals → bottom sheet style */
  .modal-overlay { align-items: flex-end; }
  .airport-modal, .booking-modal {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .modal-header { padding: var(--space-4); }
  .booking-content { padding: var(--space-4); }
  .book-contact-btn { min-height: 48px; }

  /* RT/MC summary bar — make room for body content above it */
  .results-main { padding-bottom: 88px; }
  .rtmc-summary {
    padding: var(--space-3);
    gap: var(--space-2);
    flex-wrap: wrap;
  }
  .rtmc-legs { flex: 1 1 100%; font-size: var(--text-xs); }
  .rtmc-price { font-size: var(--text-sm); }
  .rtmc-book-btn { flex: 1; min-height: 44px; }

  /* No-results */
  .no-results { padding: var(--space-8) var(--space-4); }
  .no-results-title { font-size: var(--text-lg); }

  /* Filter drawer touch targets */
  .filter-check { padding: 10px 0; min-height: 40px; }
  .filter-check input[type="checkbox"] { width: 20px; height: 20px; }
  .time-btn { padding: 10px 12px; min-height: 48px; }
  .reset-filters-btn { min-height: 44px; }
}

/* ── ≤ 480px (phone portrait) ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .results-page { padding: var(--space-3); }
  .sb-inner     { padding: 0 var(--space-2); }
  .filter-card  { padding: 0; }

  .fc-main { padding: var(--space-3); }
  .fc-time { font-size: var(--text-lg); }
  .fc-airport-code { font-size: 11px; }
  .fc-airline-name { font-size: var(--text-sm); }
  .fc-flight-num { font-size: 10px; }
  .fc-line { gap: 2px; }
  .fc-travel-line { min-width: 50px; }
  .fc-stops-label { font-size: 10px; padding: 3px 8px; }

  .results-header { gap: var(--space-2); }
  .results-count { font-size: var(--text-xs); }

  .rt-leg-label { font-size: 10px; }
  .rt-combo-card .fc-price { font-size: var(--text-xl); }

  /* Hide secondary nav items entirely on very small screens */
  .navbar .nav-links { display: none !important; }

  /* Date fields more compact */
  .sb-field { padding: 8px 12px; min-height: 52px; }
  .sb-label { font-size: 10px; }
  .sb-value { font-size: var(--text-sm); }
}

/* Modal open utility (used by JS) */
.modal-overlay { transition: opacity var(--duration) var(--easing); }

/* Prevent iOS auto-zoom on inputs */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
  .sb-value, .sb-label { font-size: revert; }
}

/* Currency toggle on navbar */
.currency-toggle {
  display: flex; gap: 4px;
  background: var(--bg-subtle); border-radius: var(--radius-pill);
  padding: 3px;
}
.cur-btn {
  background: transparent; border: none;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  color: var(--text-secondary); cursor: pointer;
  font-family: inherit;
  transition: all var(--duration) var(--easing);
}
.cur-btn.active { background: var(--bg-elevated); color: var(--primary); box-shadow: var(--shadow-xs); }

/* ════════════════════════════════════════════════════════════════════════════
   NEARBY DATES STRIP  (#fareStrip — js/results.js)
   A row of the days around the searched date. The viewed date is the anchor and
   carries the live price from the search itself; a neighbour shows a price only
   when we have really priced it before, otherwise it reads "Ko'rish". Cheaper
   than the anchor → green, which is the whole point of the row.
   ════════════════════════════════════════════════════════════════════════════ */
/* The search bar above is white too, so the strip needs a hairline on BOTH
   edges — without the top rule the two blocks read as one tall white slab. */
.fare-strip { background: var(--bg-elevated); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); }
.fs-inner { max-width: 1340px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 18px; }
.fs-title { display: flex; align-items: center; gap: 9px; flex-shrink: 0;
  font-size: 13.5px; font-weight: 800; color: var(--text); }
.fs-title svg { width: 17px; height: 17px; color: var(--primary); }
.fs-cells { display: flex; align-items: stretch; gap: 2px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; }
.fs-cells::-webkit-scrollbar { display: none; }
.fs-cell { flex: 1 0 auto; min-width: 104px; display: flex; flex-direction: column; gap: 3px;
  align-items: center; justify-content: center; padding: 8px 12px; border: none; border-radius: 10px;
  background: transparent; cursor: pointer; font-family: inherit;
  transition: background .15s; position: relative; }
.fs-cell + .fs-cell::before { content: ''; position: absolute; left: -1px; top: 22%; bottom: 22%;
  width: 1px; background: var(--border); }
.fs-cell:hover:not(.on) { background: var(--primary-tint); }
/* The date being viewed: the only filled cell, so "you are here" needs no
   second accent colour anywhere else in the row. */
.fs-cell.on { background: var(--primary); cursor: default; }
.fs-cell.on::before, .fs-cell.on + .fs-cell::before { display: none; }
.fs-date { font-size: 12px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
.fs-price { font-size: 14px; font-weight: 800; color: var(--price); white-space: nowrap; letter-spacing: -.3px; }
.fs-cell .fs-price:not(:empty) { line-height: 1.15; }
/* Cheaper than the date you are on — the one thing this row exists to say. */
.fs-cell.cheap .fs-price { color: var(--success); }
.fs-cell.on .fs-date  { color: rgba(255,255,255,.82); }
.fs-cell.on .fs-price { color: #fff; }

@media (max-width: 900px) {
  .fs-inner { padding: 9px 16px; gap: 12px; flex-direction: column; align-items: stretch; }
  .fs-title { font-size: 12.5px; }
  .fs-cell { min-width: 92px; padding: 7px 10px; }
  .fs-price { font-size: 13px; }
}
