/* ==========================================================================
   Travel Rajasthan Now — Flights module (loaded on flight pages only)
   ========================================================================== */

/* Test-mode banner */
.test-banner { background: repeating-linear-gradient(135deg, #3a2a0c 0 14px, #2e2109 14px 28px); color: #F7E3A6; font-size: .82rem; }
.test-banner .container { display: flex; align-items: center; gap: 10px; padding-top: 9px; padding-bottom: 9px; }
.test-banner strong { color: #FFD66B; letter-spacing: .08em; }
.test-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #FFF1C2; color: #7A5410; border: 1px dashed #C8932C; }
[data-theme="dark"] .test-chip { background: #3A2C10; color: #FFD66B; }

/* Hero with search */
.flight-hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; background: #140e08; padding: calc(var(--header-h) + 90px) 0 70px; }
.flight-hero > img, .flight-hero > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: heroZoom 24s ease-out both; }
.flight-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 6, 2, .55), rgba(10, 6, 2, .35) 45%, rgba(10, 6, 2, .85)); }
.flight-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.8vw, 3.8rem); max-width: 820px; }
.flight-hero h1 em { color: var(--gold-300); }
.flight-hero .lead { color: rgba(255, 255, 255, .86); font-weight: 300; margin-bottom: 34px; }
.flight-hero-compact { padding: calc(var(--header-h) + 50px) 0 30px; }
.flight-hero-compact h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 6px; }
@media (max-width: 767px) { .flight-hero { padding-top: calc(var(--header-h) + 40px); } }

/* Search card */
.fsearch { background: var(--surface); color: var(--text); border-radius: var(--radius-xl); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .55); border: 1px solid var(--border); padding: clamp(18px, 2.6vw, 28px); position: relative; }
.fsearch-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; margin-bottom: 18px; border: 1px solid var(--border); }
.fsearch-tabs label { position: relative; cursor: pointer; }
.fsearch-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.fsearch-tabs span { display: block; padding: 8px 18px; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--text-muted); transition: all .25s var(--ease); }
.fsearch-tabs input:checked + span { background: var(--grad-gold); color: #1E1812; box-shadow: var(--shadow-gold); }
.fsearch-tabs input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.fsearch-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.1fr) auto; gap: 10px; align-items: stretch; }
.fbox { position: relative; border: 1.5px solid var(--border); border-radius: 16px; padding: 10px 14px 8px; background: var(--surface); transition: border-color .2s, box-shadow .2s; min-width: 0; }
.fbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.fbox > label, .fbox .fbox-label { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); font-weight: 600; margin-bottom: 2px; }
.fbox input, .fbox select { width: 100%; border: 0; background: transparent; padding: 2px 0; font-size: 1.02rem; font-weight: 600; color: var(--heading); font-family: var(--font-body); min-height: 30px; }
.fbox input:focus, .fbox select:focus { outline: none; }
.fbox small { display: block; font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbox.is-invalid { border-color: var(--danger); }
.fbox .field-error { font-size: .72rem; }
.fswap { position: absolute; right: -19px; top: 50%; transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--primary-strong); display: grid; place-items: center; transition: transform .35s var(--ease), background .2s; }
.fswap:hover { transform: translateY(-50%) rotate(180deg); background: var(--primary-soft); }
.fsearch .btn-search { height: 100%; min-height: 64px; border-radius: 16px; padding-inline: 26px; font-size: 1rem; }
.fbox.is-disabled { opacity: .5; }
.fsearch-foot { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 14px; font-size: .82rem; color: var(--text-muted); }
@media (max-width: 1100px) {
  .fsearch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fsearch-grid .fbox-pax { grid-column: span 2; }
  .fsearch-grid .btn-search { grid-column: span 2; }
  .fswap { right: -19px; }
}
@media (max-width: 600px) {
  .fsearch-grid { grid-template-columns: minmax(0, 1fr); }
  .fsearch-grid .fbox-pax, .fsearch-grid .btn-search { grid-column: span 1; }
  .fswap { right: 14px; top: auto; bottom: -19px; transform: rotate(90deg); }
  .fswap:hover { transform: rotate(270deg); }
  .fsearch-tabs { display: flex; width: 100%; }
  .fsearch-tabs label { flex: 1; text-align: center; }
  .fsearch-tabs span { padding: 8px 6px; }
}

/* Multi-city rows */
.fmulti { display: grid; gap: 10px; }
.fmulti-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) 40px; gap: 10px; align-items: center; }
.fmulti-row .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); font-weight: 700; font-size: .8rem; }
.fmulti-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-top: 10px; }
.fmulti-actions .fbox { flex: 1 1 260px; }
@media (max-width: 700px) { .fmulti-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .fmulti-row .num { display: none; } .fmulti-row .fbox:nth-of-type(3) { grid-column: span 1; } }
[data-trip="multi_city"] .fsingle { display: none; }
[data-trip="one_way"] .fmulti-wrap, [data-trip="round_trip"] .fmulti-wrap { display: none; }

/* Airport dropdown */
.ac-list { position: absolute; left: -2px; right: -2px; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; min-width: 260px; }
.ac-list li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--surface-2); }
.ac-list .code { font-weight: 700; color: var(--primary-strong); width: 42px; flex: none; font-size: .9rem; }
.ac-list .city { display: block; font-weight: 600; color: var(--heading); font-size: .9rem; }
.ac-list .name { display: block; font-size: .74rem; color: var(--text-muted); }

/* Passenger popover */
.pax-toggle { width: 100%; text-align: left; background: none; border: 0; padding: 2px 0; font-size: 1.02rem; font-weight: 600; color: var(--heading); min-height: 30px; }
.pax-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(320px, 90vw); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; display: none; }
.pax-pop.is-open { display: block; }
.pax-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.pax-row strong { display: block; color: var(--heading); font-size: .92rem; }
.pax-row small { color: var(--text-muted); font-size: .74rem; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--heading); font-size: 1.1rem; line-height: 1; display: grid; place-items: center; }
.stepper button:hover:not([disabled]) { border-color: var(--primary); color: var(--primary-strong); }
.stepper button[disabled] { opacity: .35; }
.stepper input { width: 34px; text-align: center; border: 0; background: transparent; font-weight: 700; font-size: 1rem; color: var(--heading); }
.pax-pop .select { margin-top: 12px; min-height: 42px; font-size: .9rem; }

/* Steps */
.fsteps { display: flex; gap: 6px; list-style: none; margin: 18px 0 0; padding: 0; flex-wrap: wrap; counter-reset: fs; }
.fsteps li { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: rgba(255, 255, 255, .6); padding-right: 10px; }
.fsteps li::before { counter-increment: fs; content: counter(fs); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); font-size: .7rem; font-weight: 700; }
.fsteps li:not(:last-child)::after { content: ""; width: 22px; height: 1px; background: rgba(255, 255, 255, .3); margin-left: 4px; }
.fsteps li.done { color: rgba(255, 255, 255, .85); }
.fsteps li.done::before { content: "✓"; background: rgba(230, 192, 106, .25); border-color: var(--gold-300); color: var(--gold-200); }
.fsteps li.active { color: #fff; font-weight: 600; }
.fsteps li.active::before { background: var(--grad-gold); color: #1E1812; border-color: transparent; }
@media (max-width: 700px) { .fsteps li:not(.active) span { display: none; } }

/* Results layout */
.results-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 1023px) { .results-layout { grid-template-columns: minmax(0, 1fr); } }
.filters-panel { position: sticky; top: calc(var(--header-h) + 20px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
@media (max-width: 1023px) { .filters-panel { position: static; } .filters-panel:not([open]) .filters-body { display: none; } }
.filters-panel summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--heading); }
.filters-panel summary::-webkit-details-marker { display: none; }
.filter-group { padding: 14px 0; border-top: 1px solid var(--border); }
.filter-group:first-of-type { margin-top: 12px; }
.filter-group h3 { font-family: var(--font-body); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 10px; }
.filter-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .88rem; cursor: pointer; }
.filter-opt input { width: 17px; height: 17px; accent-color: var(--primary); }
.filter-opt .muted { margin-left: auto; font-size: .78rem; }
.time-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.time-grid label { cursor: pointer; }
.time-grid input { position: absolute; opacity: 0; }
.time-grid span { display: block; text-align: center; padding: 9px 6px; border-radius: 12px; border: 1.5px solid var(--border); font-size: .74rem; font-weight: 500; transition: all .2s; }
.time-grid input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-strong); }
.time-grid input:focus-visible + span { outline: 2px solid var(--focus); }

.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sort-tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px; }
.sort-tabs a { padding: 8px 14px; border-radius: 10px; font-size: .84rem; font-weight: 500; color: var(--text-muted); }
.sort-tabs a.is-active { background: var(--heading); color: var(--bg); }

.route-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 20px; margin-bottom: 20px; font-size: .9rem; }
.route-summary strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--heading); }
.route-summary .sep { color: var(--text-soft); }

/* Offer card */
.offer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 14px; overflow: hidden; transition: box-shadow .3s, border-color .3s, transform .3s var(--ease); }
.offer:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.offer-main { display: grid; grid-template-columns: minmax(0, 1fr) 220px; }
.offer-legs { padding: 18px 20px; display: grid; gap: 14px; }
.offer-leg { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; }
.offer-leg + .offer-leg { padding-top: 14px; border-top: 1px dashed var(--border); }
.airline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.airline-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .82rem; letter-spacing: .04em; flex: none; }
.airline strong { display: block; font-size: .86rem; color: var(--heading); line-height: 1.25; }
.airline small { display: block; font-size: .74rem; color: var(--text-muted); }
.leg-times { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.leg-times .t { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; color: var(--heading); line-height: 1.1; }
.leg-times .c { font-size: .78rem; color: var(--text-muted); }
.leg-times .end { text-align: right; }
.leg-times .plus { font-size: .68rem; color: var(--accent-strong); font-weight: 700; vertical-align: super; }
.leg-line { text-align: center; font-size: .74rem; color: var(--text-muted); }
.leg-line .bar { position: relative; height: 2px; background: var(--border-strong); margin: 6px 0; }
.leg-line .bar::before, .leg-line .bar::after { content: ""; position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.leg-line .bar::before { left: 0; } .leg-line .bar::after { right: 0; }
.leg-line .bar i { position: absolute; top: -3px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.leg-line .stops-0 { color: var(--success); font-weight: 600; }
.offer-price { padding: 18px 20px; border-left: 1px dashed var(--border-strong); display: flex; flex-direction: column; justify-content: center; gap: 4px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.offer-price .total { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--heading); line-height: 1.1; }
.offer-price .per { font-size: .74rem; color: var(--text-muted); }
.offer-price .btn { margin-top: 10px; }
.offer-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 20px; border-top: 1px solid var(--border); font-size: .76rem; color: var(--text-muted); align-items: center; }
.offer-meta span { display: inline-flex; align-items: center; gap: 6px; }
.offer-meta .icon { color: var(--primary); }
.offer details summary { cursor: pointer; color: var(--primary-strong); font-weight: 500; list-style: none; }
.offer details summary::-webkit-details-marker { display: none; }
.offer-details { padding: 0 20px 18px; }
.fare-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.fare-table td { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.fare-table td:last-child { text-align: right; font-weight: 600; color: var(--heading); }
.fare-table tr.total td { border-bottom: 0; font-size: 1rem; padding-top: 10px; }
.scenario { background: #FFF5D6; color: #6B4A0B; border: 1px dashed #C8932C; border-radius: 10px; padding: 6px 10px; font-size: .74rem; }
[data-theme="dark"] .scenario { background: #2E2410; color: #F0CF7C; }
@media (max-width: 800px) {
  .offer-main { grid-template-columns: minmax(0, 1fr); }
  .offer-price { border-left: 0; border-top: 1px dashed var(--border-strong); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .offer-price .btn { margin-top: 0; }
  .offer-leg { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* Itinerary block (select, review, confirmation) */
.itin { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.itin-leg { padding: 18px 20px; }
.itin-leg + .itin-leg { border-top: 1px solid var(--border); }
.itin-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.itin-head h3 { font-size: 1.1rem; margin: 0; }
.itin-seg { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 12px 0; }
.itin-seg + .itin-seg { border-top: 1px dashed var(--border); }
.layover { margin: 4px 0 4px 186px; font-size: .76rem; color: var(--accent-strong); background: var(--accent-soft); display: inline-block; padding: 4px 10px; border-radius: 999px; }
@media (max-width: 700px) { .itin-seg { grid-template-columns: minmax(0, 1fr); } .layover { margin-left: 0; } }

.price-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 22px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.price-box::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--grad-gold); }
.price-box h3 { font-size: 1.2rem; }
.price-box .grand { font-family: var(--font-display); font-size: 2rem; color: var(--heading); font-weight: 600; }

.fare-change { border-radius: var(--radius-lg); padding: 22px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.fare-change h2 { font-size: 1.4rem; color: var(--heading); }
.fare-change .old { text-decoration: line-through; color: var(--text-muted); }
.fare-change .new { font-family: var(--font-display); font-size: 1.8rem; color: var(--accent-strong); font-weight: 600; }

/* Passenger form */
.pax-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.pax-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 14px; }
.pax-card h3 .badge { font-family: var(--font-body); }
.pax-grid { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 14px; }
.pax-grid-2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
@media (max-width: 900px) { .pax-grid, .pax-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pax-grid, .pax-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Confirmation */
.confirm-hero { text-align: center; padding: 34px 20px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); margin-bottom: 24px; }
.confirm-hero .ok { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.confirm-hero .warn { background: var(--accent-soft); color: var(--accent-strong); }
.confirm-hero .fail { background: var(--danger-soft); color: var(--danger); }
.ref-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 16px; }
.ref-box { padding: 12px 20px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border-strong); min-width: 160px; }
.ref-box small { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.ref-box strong { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.3rem; color: var(--heading); letter-spacing: .06em; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-confirmed { background: var(--success-soft); color: var(--success); }
.tone-in_progress { background: var(--primary-soft); color: var(--primary-strong); }
.tone-new { background: var(--accent-soft); color: var(--accent-strong); }
.tone-cancelled { background: var(--danger-soft); color: var(--danger); }
.tone-closed, .tone-draft { background: var(--surface-3); color: var(--text-muted); }

.mock-pay { border: 2px dashed #C8932C; border-radius: var(--radius-lg); padding: 22px; background: color-mix(in srgb, var(--primary-soft) 70%, transparent); }

.popular-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .popular-routes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .popular-routes { grid-template-columns: minmax(0, 1fr); } }
.route-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: all .3s var(--ease); }
.route-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.route-card strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--heading); display: block; }
.route-card small { color: var(--text-muted); font-size: .78rem; }
.route-card .icon-plane { color: var(--primary); }

.loading-overlay { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(4px); }
.loading-overlay.is-on { display: grid; }
.loading-overlay .plane { width: 70px; height: 70px; color: var(--primary); animation: fly 1.6s ease-in-out infinite; }
@keyframes fly { 0%, 100% { transform: translate(-10px, 4px) rotate(-8deg); } 50% { transform: translate(10px, -6px) rotate(4deg); } }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
