/* The flight search (searchpage.py, search.js): a calm departure board. One accent: coral on Search, Watch and the
   cheapest trip; everything else ink and greys, mono uppercase headers, tabular times, hairlines. */
.search-page { --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; }  /* legal.css loads the face */
.search-page [hidden] { display: none !important; }  /* the panels and fields below set their own display */
.search-page .badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.search-page .badges span { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--muted); }

/* the form: one slim bar */
.sbar { position: relative; display: grid; gap: 10px; margin: 0 0 22px; }
.sbar-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.sbar-stops { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.sbar .lbl { display: block; font: 400 10px/14px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sbar-stops .lbl { margin-right: 6px; }
.seg { min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.seg.on { background: var(--raised-2); color: var(--ink); }
.seg:hover { color: var(--ink); }
/* a flex row, so that a field the trip type hides (the return) leaves no gap: each field grows by its share */
.sbar-row { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--raised); }
.sbar-row > * { min-width: 0; }
.field.place { flex: 1.15 1 0; }
.field.date { flex: 1.1 1 0; min-width: 128px; }  /* "12 / 15 / 2026" fits */
.field.who { flex: 1.55 1 0; }
.field.bags { flex: 0 0 auto; }
.sbar .go { flex: none; }
.field { display: grid; align-content: center; gap: 4px; padding: 12px 14px; border-right: 1px solid var(--line); }
.field .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swap + .field { padding-left: 28px; }  /* clear of the swap button that sits on the line between From and To */
.field input, .who-btn { width: 100%; min-height: 26px; padding: 0; border: 0; background: none; color: var(--ink); font: 500 15px/1.4 var(--sans); }
.field input::placeholder { color: var(--muted); font-weight: 400; }
.field input:focus { outline: none; }
.field:focus-within { background: rgba(255, 255, 255, .03); }
.field input[type="date"] { color-scheme: dark; font-variant-numeric: tabular-nums; padding-right: 6px; }
.field input[type="date"] { cursor: pointer; }
.field input[type="date"]::-webkit-calendar-picker-indicator { display: none; }  /* the whole field opens the calendar (search.js) */
.field input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.who-btn { text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swap { align-self: center; width: 32px; height: 32px; margin: 0 -16px; z-index: 1; border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--raised-2); color: var(--ink); font-size: 14px; cursor: pointer; }
.swap:hover { border-color: var(--muted); }
.chips { display: flex; gap: 6px; }
.chip { min-height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip.on { border-color: var(--ink); color: var(--ink); }
.chip.on::before { content: "✓ "; }
.sbar .go { align-self: center; margin: 6px; min-height: 48px; padding: 0 22px; }
.ac, .who-panel { position: absolute; z-index: 20; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--raised-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.ac li { display: flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ac li span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ac li code { font-family: var(--mono); color: var(--muted); }
.ac li[aria-selected="true"], .ac li:hover { background: rgba(255, 255, 255, .06); }
.who-panel { width: 300px; display: grid; gap: 12px; padding: 14px; }
.step { display: grid; grid-template-columns: 1fr 36px 28px 36px; align-items: center; gap: 6px; }
.step span { display: grid; } .step small { color: var(--muted); font-size: 12px; }
.step button { height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.step button:disabled { opacity: .35; cursor: default; }
.step output { text-align: center; font-family: var(--mono); }
.cabins { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cabins .seg { min-height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.2; }
.cabins .seg.on { border-color: var(--ink); background: var(--raised); }
.who-panel .done { justify-self: end; }

/* the answer */
.searching { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.searching i { width: 8px; height: 8px; background: var(--coral); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.skeleton { display: grid; gap: 1px; }
.sk { height: 74px; background: linear-gradient(90deg, var(--raised) 30%, var(--raised-2) 50%, var(--raised) 70%); background-size: 300% 100%; animation: sheen 1.4s linear infinite; }
@keyframes sheen { to { background-position: -150% 0; } }
.empty, .person { padding: 22px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); }
.person { display: grid; gap: 12px; justify-items: start; }

.watchbar { position: sticky; top: 84px; z-index: 10; display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 8px 8px 8px 18px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(22, 22, 24, .92); backdrop-filter: blur(10px); }
.wb-text { flex: 1; font-size: 14px; color: var(--muted); } .wb-text b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.wb-free { font: 400 10px/14px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 -1px; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; overflow: hidden; }
.tab { display: grid; gap: 2px; justify-items: start; padding: 12px 18px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.tab:last-child { border-right: 0; }
.tab span { font: 400 11px/14px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tab b { font: 500 18px/1.2 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.tab small { font-size: 12px; }
.tab.on { background: var(--raised-2); box-shadow: inset 0 -2px 0 var(--ink); }
.board { border: 1px solid var(--line); border-radius: 0 0 14px 14px; background: var(--raised); overflow: hidden; }
.board.skeleton { border-radius: 14px; }
.board-head, .row .open { display: grid; grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr) minmax(130px, 1fr) 18px; gap: 16px; align-items: center; }
.board-head { padding: 10px 18px; border-bottom: 1px solid var(--line); font: 400 10px/14px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.board-head span:nth-child(2), .board-head span:nth-child(3) { display: none; }
.board-head span:last-child { grid-column: 3; text-align: right; }
.rows { margin: 0; padding: 0; list-style: none; }
.row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .open { width: 100%; padding: 14px 0 14px 18px; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.row:hover { background: rgba(255, 255, 255, .02); }
.row.cheapest { box-shadow: inset 0 -1px 0 var(--coral); }
.row.ticket { background: rgba(255, 255, 255, .025); }
.legs { display: grid; gap: 8px; }
.leg { display: grid; grid-template-columns: 42px minmax(120px, .9fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.leg .side { font: 400 10px/14px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.row.one .leg .side { display: none; }
.row.one .leg { grid-template-columns: minmax(120px, .9fr) minmax(0, 1fr) minmax(0, 1fr); }
.leg .times { font: 500 17px/1.3 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.leg sup { font-size: 10px; color: var(--muted); }
.leg .air { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg .air code { font: 12px var(--mono); color: var(--muted); }
.leg .dur { font: 500 14px var(--mono); white-space: nowrap; } .leg .dur small { font: 13px var(--sans); color: var(--muted); }
.marks { display: grid; gap: 4px; font: 400 10px/14px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.row.cheapest .marks span:first-child { color: var(--ink); }
.price { display: grid; justify-items: end; gap: 1px; }
.price b { font: 500 22px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.row.cheapest .price b { color: var(--coral); }
.price small { font-size: 12px; color: var(--muted); }
.bagnote { font-size: 12px; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.chev { width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.open[aria-expanded="true"] .chev { transform: rotate(-135deg); }
.row .watch { margin: 0 18px 0 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: none; color: var(--ink); font-size: 14px; font-weight: 550; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.row .watch::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--coral); }
.row .watch:hover { border-color: var(--coral); }
.more-info { grid-column: 1 / -1; padding: 0 18px 18px; }
.detail { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.d-note { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.d-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.d-grid > div { display: grid; align-content: start; gap: 6px; padding: 14px 16px; border-right: 1px solid var(--line); }
.d-grid > div:last-child { border-right: 0; }
.d-h { margin: 0; font: 400 10px/14px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.d-t, .d-s, .d-b { margin: 0; font-size: 14px; } .d-s, .d-b { color: var(--muted); font-size: 13px; }
.d-row { display: flex; justify-content: space-between; font-size: 14px; color: #D9D4D2; }
.d-row.total { padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.btn.ghost { justify-self: start; margin-top: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.more-btn { display: block; width: 100%; min-height: 48px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); font: inherit; cursor: pointer; }
.more-btn:hover { color: var(--ink); }
.search-page .fine { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.fees .incl { color: var(--ink); } .fees .none { color: var(--muted); }
.fees .tag { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 6px; font: 400 10px/14px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* narrower screens: the bar wraps into three rows, then a stack */
@media (max-width: 1280px) {
  /* rows: From ⇄ To / the days and the travellers / the bags and Search. The bags' basis keeps them off the second
     row also when a one-way trip hides the return. */
  .sbar-row { flex-wrap: wrap; }
  .field.place { flex: 1 1 40%; }
  .field.date { flex: 1 1 22%; }
  .field.who { flex: 1 1 30%; }
  .field.bags { flex: 1 1 55%; }
  .field.place, .field.date, .field.who { border-bottom: 1px solid var(--line); }
  .swap + .field, .field.who { border-right: 0; }
  .sbar .go { flex: 1 1 auto; }
}
@media (max-width: 760px) {
  .sbar-stops { margin-left: 0; }
  .sbar-row { position: relative; }
  .field { border-right: 0; border-bottom: 1px solid var(--line); }
  .field.place { flex: 1 1 100%; }
  .swap + .field { padding-left: 14px; }
  .swap { position: absolute; right: 16px; top: 46px; margin: 0; }
  .field.date { flex: 1 1 50%; }
  .field.date + .field.date { border-left: 1px solid var(--line); }
  .field.who, .field.bags { flex: 1 1 100%; border-top: 0; }
  .sbar .go { flex: 1 1 100%; margin: 8px; }
  .watchbar { position: fixed; top: auto; bottom: 10px; left: 10px; right: 10px; margin: 0; }
  .wb-free { display: none; }
  .board-head { display: none; }
  .row { grid-template-columns: 1fr; }
  .row .open { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px 6px; gap: 10px; }
  .marks { grid-column: 1 / -1; grid-row: 1; display: flex; gap: 10px; }
  .marks:empty { display: none; }
  .chev { display: none; }
  .leg { grid-template-columns: 34px minmax(0, 1fr); gap: 2px 8px; }
  .leg .air, .leg .dur { grid-column: 2; font-size: 13px; }
  .row.one .leg { grid-template-columns: minmax(0, 1fr); }
  .row .watch { justify-self: start; margin: 0 16px 14px; }
  .d-grid { grid-template-columns: 1fr; } .d-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .tab { padding: 10px 12px; } .tab b { font-size: 16px; }
  .search-page { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) { .searching i, .sk { animation: none; } }

/* the bag fees: folded, its heading opens it; compact rows */
.fees-box > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.fees-box > summary::-webkit-details-marker { display: none; }
.fees-box > summary h2 { margin: 0; }
.fees-box > summary .count { padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font: 400 12px/18px var(--mono); color: var(--muted); }
.fees-box > summary .chev { display: block; flex: none; margin: -4px 0 0 4px; }  /* shown on phones too (the rows hide theirs) */
.fees-box[open] > summary .chev { transform: rotate(-135deg); margin-top: 4px; }
.fees-box[open] > summary { margin-bottom: 14px; }
.fees th, .fees td { padding: 8px 16px; font-size: 14px; }
.fees-block { margin-bottom: 40px; }
@media (max-width: 760px) {
  .fees th, .fees td { padding: 8px 10px; font-size: 13px; }
}
