/*
 * The results page, 2026-11-18 (the owner's five points on the flight results, and the live-map waiting card;
 * docs/RESULTS_PAGE.md). Loaded by search.php after its own styles and before tailwind.css.
 *
 *   1. The compact search bar   (layout_cro_results_bar): the dark band becomes one light bar, every field editable,
 *      its label inside the box. The form's markup is the one it always was; these rules restyle it by its classes.
 *   2. The live card            (layout_cro_live_map): the waiting card as a map (assets/js/route-map.js).
 */

/* ── 1. The compact search bar ─────────────────────────────────────────── */
.rs-compact { background: #fff; border-bottom: 1px solid rgb(var(--c-neutral-200)); color: rgb(var(--c-neutral-900)); }
.dark .rs-compact { background: rgb(var(--c-neutral-900)); border-color: rgb(var(--c-neutral-800)); color: rgb(var(--c-neutral-100)); }

/* The kind of search (Flights, Hotels, Holidays) as one small switch; the trip's kind beside it. */
.rs-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rs-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgb(var(--c-neutral-100)); }
.dark .rs-seg { background: rgb(var(--c-neutral-800)); }
.rs-seg a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: rgb(var(--c-neutral-600)); transition: background-color .15s, color .15s; }
.rs-seg a:hover { color: rgb(var(--c-neutral-900)); }
.rs-seg a[aria-current="page"] { background: #fff; color: rgb(var(--c-neutral-900)); box-shadow: 0 1px 2px rgb(15 23 42 / .12); }
.dark .rs-seg a { color: rgb(var(--c-neutral-300)); }
.dark .rs-seg a[aria-current="page"] { background: rgb(var(--c-neutral-950, 2 6 23)); color: rgb(var(--c-neutral-50)); }
.rs-sep { width: 4px; height: 4px; border-radius: 999px; background: rgb(var(--c-neutral-300)); }
.rs-compact .rs-trip button { border: 1px solid rgb(var(--c-neutral-200)); }
.rs-compact .rs-trip button[class~="bg-white/10"] { background: #fff; color: rgb(var(--c-neutral-700)); }
.dark .rs-compact .rs-trip button[class~="bg-white/10"] { background: rgb(var(--c-neutral-900)); color: rgb(var(--c-neutral-200)); border-color: rgb(var(--c-neutral-700)); }
.rs-compact .rs-trip button[class~="bg-amber-400"] { border-color: rgb(var(--c-amber-500, 245 158 11)); }

/* The boxes: light, the label inside, top left. */
.rs-compact form { margin-top: 12px; }
.rs-compact [data-rs-cell] { position: relative; }
.rs-compact [data-rs-cell] > label { position: absolute; z-index: 2; left: 13px; top: 7px; margin: 0; pointer-events: none;
  font-size: 10px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: rgb(var(--c-neutral-500)); }
/* !important only because voyager.css keeps these boxes in the dark band's look with !important ("Opt-out: translucent
   inputs"); inside the light bar they are light. */
.rs-compact :is(input, select, button)[class~="bg-white/10"] { background-color: #fff !important; border-color: rgb(var(--c-neutral-300)) !important; color: rgb(var(--c-neutral-900)) !important; }
.rs-compact :is(input, select, button)[class~="bg-white/10"]:focus { border-color: rgb(var(--brand-1-rgb)) !important; }
.dark .rs-compact :is(input, select, button)[class~="bg-white/10"] { background-color: rgb(var(--c-neutral-900)) !important; border-color: rgb(var(--c-neutral-700)) !important; color: rgb(var(--c-neutral-100)) !important; }
.rs-compact input::placeholder { color: rgb(var(--c-neutral-400)); }
.rs-compact [data-rs-cell] :is(input, select, button)[class~="py-2.5"] { padding-top: 23px; padding-bottom: 7px; border-radius: 10px; font-weight: 600; }
.rs-compact [data-rs-cell] select option { color: rgb(var(--c-neutral-900)); }
/* The Search button fills the boxes' height; the empty stand-in label above it goes. */
.rs-compact [data-rs-go] > span[aria-hidden="true"] { display: none; }
.rs-compact [data-rs-go] { align-self: stretch; }
.rs-compact [data-rs-go] > button { height: 100%; min-height: 50px; border-radius: 10px; font-size: 15px; }
/* Words written for the dark band, made readable on the light bar. */
.rs-compact :is([class~="text-white/55"], [class~="text-white/70"], [class~="text-white/80"], [class~="text-white/85"]) { color: rgb(var(--c-neutral-500)); }
.rs-compact button[class~="text-white/85"] { color: rgb(var(--c-neutral-700)); border-color: rgb(var(--c-neutral-200)); }
.rs-compact [class~="text-amber-300"] { color: rgb(180 83 9); }
.rs-compact [class~="text-amber-200"] { color: rgb(146 64 14); }
.dark .rs-compact [class~="text-amber-300"] { color: rgb(252 211 77); }
/* From ⇄ To: the swap sits on the line between the two boxes. */
.rs-swap { position: absolute; z-index: 3; right: -19px; top: 13px; width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgb(var(--c-neutral-300)); background: #fff; color: rgb(var(--c-neutral-700)); font-size: 15px; line-height: 1; transition: border-color .15s, color .15s; }
.rs-swap:hover { border-color: rgb(var(--brand-1-rgb)); color: rgb(var(--c-neutral-900)); }
.dark .rs-swap { background: rgb(var(--c-neutral-900)); border-color: rgb(var(--c-neutral-700)); color: rgb(var(--c-neutral-200)); }
@media (max-width: 767px) {
  .rs-compact [data-rs-go] { grid-column: span 2 / span 2; }
  .rs-compact [data-rs-go] > button { min-height: 46px; }
}

/* ── 2. The live card ──────────────────────────────────────────────────── */
.lv { background: #fff; border: 1px solid rgb(var(--c-neutral-200)); border-radius: 1.125rem; overflow: hidden; }
.lv-map { position: relative; height: 200px; background: linear-gradient(180deg, rgb(238 244 251) 0%, rgb(246 249 252) 100%); }
.lv-map .rm-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lv-live { position: absolute; z-index: 1; top: 12px; left: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  background: rgb(255 255 255 / .92); border: 1px solid rgb(var(--c-neutral-200)); font-size: 12.5px; font-weight: 600; color: rgb(var(--c-neutral-800)); }
.lv-dot { width: 8px; height: 8px; border-radius: 999px; background: rgb(239 68 68); animation: lv-pulse 1.2s ease-out infinite; }
@keyframes lv-pulse { 0% { box-shadow: 0 0 0 0 rgb(239 68 68 / .55); } 100% { box-shadow: 0 0 0 8px rgb(239 68 68 / 0); } }
.lv-facts { position: absolute; z-index: 1; top: 12px; right: 14px; display: flex; gap: 8px; }
.lv-facts span { padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .92); border: 1px solid rgb(var(--c-neutral-200)); font-size: 12px; color: rgb(var(--c-neutral-700)); }
.lv-body { padding: 16px 20px 18px; }
.lv-route { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.lv-route h3 { font-size: 20px; font-weight: 700; color: rgb(var(--c-neutral-900)); }
.lv-code { font-size: 13px; font-weight: 600; color: rgb(var(--c-neutral-500)); }
.lv-when { font-size: 13px; color: rgb(var(--c-neutral-500)); }
.lv-air { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: rgb(var(--c-neutral-600)); }
.lv-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; border: 1px solid rgb(var(--c-neutral-200)); border-radius: 10px; background: #fff; }
.lv-badge em { font-style: normal; color: rgb(var(--c-neutral-800)); }
.lv-mark { width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
  border: 1px solid rgb(var(--c-neutral-200)); font-size: 10px; font-weight: 700; color: rgb(var(--c-neutral-600)); background: #fff; }
.lv-mark img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.lv-facts-line { display: none; margin-top: 8px; font-size: 13px; color: rgb(var(--c-neutral-500)); }
.lv-msg { margin-top: 10px; font-size: 13.5px; color: rgb(var(--c-neutral-700)); transition: opacity .3s; }
.lv-seen { margin-top: 4px; font-size: 12.5px; color: rgb(var(--c-neutral-500)); }
.lv-seen b { color: rgb(21 128 61); }
.lv-bar { margin-top: 12px; height: 6px; border-radius: 9px; background: rgb(var(--c-neutral-100)); overflow: hidden; }
.lv-bar > div { height: 100%; border-radius: 9px; transition: width .5s linear; }
.lv-wait { margin-top: 10px; font-size: 12px; color: rgb(var(--c-neutral-500)); }
.lv-skel { position: relative; overflow: hidden; display: grid; grid-template-columns: 40px 1fr 120px; gap: 14px; align-items: center; padding: 16px 18px;
  background: #fff; border: 1px solid rgb(var(--c-neutral-200)); border-radius: 14px; }
.lv-skel .s { height: 12px; border-radius: 6px; background: rgb(var(--c-neutral-100)); }
.lv-skel .lv-skel-logo { height: 36px; border-radius: 10px; } .lv-skel .lv-skel-a { width: 55%; } .lv-skel .lv-skel-b { width: 35%; margin-top: 8px; }
.lv-skel .lv-skel-c { height: 18px; } .lv-skel .lv-skel-d { width: 70%; margin: 8px 0 0 auto; }
.lv-skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / .75) 50%, transparent 100%); animation: lv-shine 1.6s ease-in-out infinite; }
@keyframes lv-shine { to { transform: translateX(100%); } }
/* The map's own parts (route-map.js). */
.rm-land circle { fill: rgb(148 163 184 / .55); }
.rm-route { fill: none; stroke: rgb(148 163 184 / .75); stroke-width: 1.5; stroke-dasharray: 4 5; }
.rm-flown { fill: none; stroke: rgb(var(--brand-1-rgb)); stroke-width: 2.5; stroke-linecap: round; }
.rm-halo { fill: rgb(var(--brand-1-rgb) / .18); }
.rm-end { fill: rgb(var(--brand-1-rgb)); stroke: #fff; stroke-width: 1.5; }
.rm-pulse { fill: rgb(var(--brand-1-rgb) / .25); transform-box: fill-box; transform-origin: center; animation: rm-pulse 1.8s ease-out infinite; }
@keyframes rm-pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.rm-label { font-size: 12px; font-weight: 700; fill: rgb(51 65 85); paint-order: stroke; stroke: rgb(246 249 252 / .9); stroke-width: 3px; }
.rm-plane circle { fill: #fff; stroke: rgb(var(--brand-1-rgb)); stroke-width: 1.5; }
.rm-plane svg { color: rgb(var(--c-neutral-800)); }
@media (max-width: 639px) {
  .lv-map { height: 180px; }
  .lv-facts { display: none; }
  .lv-facts-line { display: block; }
  .lv-badge { padding: 3px; }
  .lv-badge em { display: none; }
  .lv-live { top: 10px; left: 10px; font-size: 12px; padding: 4px 10px; }
  .lv-body { padding: 14px 16px 16px; }
  .lv-route h3 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .lv-dot, .rm-pulse, .lv-skel::after { animation: none; }
  .lv-bar > div { transition: none; }
}
/* Dark */
.dark .lv, .dark .lv-skel, .dark .lv-badge { background: rgb(var(--c-neutral-900)); border-color: rgb(var(--c-neutral-700)); }
.dark .lv-map { background: linear-gradient(180deg, rgb(15 27 45) 0%, rgb(17 28 46) 100%); }
.dark .lv-live, .dark .lv-facts span { background: rgb(15 23 42 / .88); border-color: rgb(var(--c-neutral-700)); color: rgb(var(--c-neutral-200)); }
.dark .lv-route h3, .dark .lv-badge em { color: rgb(var(--c-neutral-50)); }
.dark .lv-msg, .dark .lv-air { color: rgb(var(--c-neutral-300)); }
.dark .lv-bar, .dark .lv-skel .s { background: rgb(var(--c-neutral-800)); }
.dark .lv-seen b { color: rgb(74 222 128); }
.dark .lv-skel::after { background: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / .06) 50%, transparent 100%); }
.dark .rm-land circle { fill: rgb(100 116 139 / .45); }
.dark .rm-label { fill: rgb(226 232 240); stroke: rgb(15 27 45 / .9); }
.dark .rm-plane circle { fill: rgb(15 23 42); }
.dark .rm-plane svg { color: rgb(var(--c-neutral-100)); }
.dark .rm-end { stroke: rgb(15 23 42); }
