/* The flight booking showcase (js/flights.js): the time-lapse's board and row geometry (css/timelapse.css .tl-rows),
   drawn as Colorado to Texas fares ranked cheapest first. A row is a route tile, the city with its pill over the
   flight's time, a fare bar with the target's mark through it, and the fare; the booked route's row flips over into
   its boarding pass. Its own classes (fl-), so the time-lapse's checks read only the time-lapse's rows. */
.fl-rows { --row-h: calc(var(--sp-64) + var(--sp-6)); --tile-h: calc(var(--row-h) - var(--sp-8) - 2 * var(--sp-6) - 2 * var(--hair)); position: relative; height: calc(var(--rows, 7) * var(--row-h)); }
.fl-row { position: absolute; inset: 0 0 auto; height: var(--row-h); perspective: calc(var(--page) * 0.75); transform: translateY(calc(var(--rank, 0) * var(--row-h))); transition: transform var(--d-slow) var(--spring); }
.fl-card { position: relative; height: calc(var(--row-h) - var(--sp-8)); transform-style: preserve-3d; }
.fl-face { position: absolute; inset: 0; display: grid; grid-template-columns: calc(var(--tile-h) * 16 / 9) minmax(0, 1.2fr) minmax(0, 0.8fr) var(--sp-64); align-items: center; gap: var(--sp-12); padding: var(--sp-6) var(--sp-12) var(--sp-6) var(--sp-6); background: var(--ground); border: var(--hair) solid transparent; border-radius: var(--r-ctl); backface-visibility: hidden; transition: background-color var(--d-slow) var(--ease-std), border-color var(--d-slow) var(--ease-std); }
/* the route: where it leaves from over where it lands, a stub's worth of type */
.fl-tile { display: grid; place-content: center; justify-items: center; gap: var(--sp-2); height: var(--tile-h); border-radius: var(--r-ctl); background: var(--surface); line-height: 1; }
.fl-tile small { font-size: var(--fs-tiny); font-weight: 600; color: var(--muted); }
.fl-tile b { font-size: var(--fs-h3); font-weight: 700; letter-spacing: var(--tr-h3); }
.fl-tile .fx { width: var(--ic-l); height: var(--ic-l); }
/* the city gives way (an ellipsis) before its pill does; the flight's day, time and stops under it */
.fl-name { display: grid; gap: var(--sp-2); min-width: 0; }
.fl-line { display: flex; align-items: center; gap: var(--sp-6); min-width: 0; font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; white-space: nowrap; }
.fl-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fl-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--muted); }
.fl-pill { flex: none; padding: var(--hair) var(--sp-6); border-radius: var(--r-pill); font-size: var(--fs-tiny); font-style: normal; font-weight: 600; }
.fl-pill:empty { display: none; }
/* the fare against the scale: shorter is cheaper, and the target's mark runs through every bar; the cheapest names it */
.fl-bar { position: relative; height: calc(var(--sp-8) + var(--sp-2)); }
.fl-track { display: block; height: 100%; border-radius: var(--r-pill); background: var(--sel); overflow: hidden; }
.fl-track i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: background-color var(--d-slow) var(--ease-std); }
.fl-bar::after { content: ""; position: absolute; top: calc(-1 * var(--sp-6)); bottom: calc(-1 * var(--sp-6)); left: calc(var(--target) * 100%); width: var(--sp-2); margin-left: calc(-1 * var(--hair)); border-radius: var(--r-pill); background: var(--muted); }
.fl-row.is-cheap .fl-bar::before { content: attr(data-target); position: absolute; bottom: calc(100% + var(--sp-8)); left: calc(var(--target) * 100%); transform: translateX(-50%); font-size: var(--fs-tiny); line-height: 1; font-weight: 600; color: var(--muted); }
.fl-price { font-size: var(--fs-body); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
/* the cheapest: lifted onto the card's white, its pill in ink */
.fl-row.is-cheap .fl-face { background: var(--surface); border-color: var(--sel); }
.fl-row.is-cheap .fl-tile { background: var(--ground); }
.fl-row.is-cheap .fl-pill { background: var(--ink); color: var(--surface); }
/* under the target: the win green, status only */
.fl-row.is-under .fl-face { border-color: color-mix(in srgb, var(--win) 45%, var(--sel)); }
.fl-row.is-under .fl-pill, .fl-pass .fl-pill { background: color-mix(in srgb, var(--win) 12%, var(--surface)); color: var(--win); }
.fl-row.is-under .fl-track i { background: var(--win); }
.fl-row.is-under .fl-price { color: var(--win); }
/* the boarding pass behind the booked row: the route, seat and confirmation, its fare torn off past a dashed edge */
.fl-pass { transform: rotateX(180deg); background: var(--surface); border-color: var(--win); }
.fl-card.is-xfade .fl-pass { transform: none; }
.fl-row .fl-pass .fl-tile { background: color-mix(in srgb, var(--win) 12%, var(--surface)); }
.fl-conf { display: grid; min-width: 0; font-size: var(--fs-tiny); line-height: var(--lh-meta); color: var(--muted); white-space: nowrap; }
.fl-conf b { overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-meta); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.fl-pass .fl-price { align-self: stretch; display: grid; place-items: center end; border-left: var(--sp-2) dashed var(--sel); color: var(--win); }

@media (max-width: 640px) {
  .fl-rows { --row-h: calc(var(--sp-48) + var(--sp-12)); }
  .fl-face { grid-template-columns: calc(var(--tile-h) * 16 / 9) minmax(0, 1fr) var(--sp-48); gap: var(--sp-8); }
  .fl-bar, .fl-conf { display: none; }
  .fl-tile b { font-size: var(--fs-body); letter-spacing: normal; }
  .fl-tile .fx { width: var(--ic-m); height: var(--ic-m); }
}
@media (prefers-reduced-motion: reduce) {
  .fl-row, .fl-face, .fl-track i { transition: none; }
}
