/* vLoganair flight information boards (fids.php, kiosk and page modes) */
.fids {
  --f-bg: #060b14;
  --f-panel: #0b1322;
  --f-row: #0c1627;
  --f-row2: #09111f;
  --f-line: rgba(255, 255, 255, .07);
  --f-ink: #f2f5fa;
  --f-soft: #93a0b6;
  --f-faint: #5c6982;
  --f-accent: var(--v2-accent, #e0282f);
  --f-amber: #ffb22e;
  --f-green: #35d07f;
  --f-cyan: #5cc8ff;
  --f-red: #ff5357;
  --f-font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-rows: 8;
  --f-row-h: 66px;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--f-bg);
  color: var(--f-ink);
  font-family: var(--f-font);
  font-size: 16px;
  overflow: hidden;
  color-scheme: dark;
}
.fids *, .fids *::before, .fids *::after { box-sizing: border-box; }

/* Header */
.fids-top { display: flex; align-items: center; gap: 1.5em; padding: 1.1em 1.6em; background: var(--f-panel); }
.fids-brand { display: flex; align-items: center; gap: 1em; min-width: 0; flex: 1; }
.fids-brand img { width: 2.9em; height: 2.9em; flex-shrink: 0; }
.fids-eyebrow { display: block; font: 500 .72em/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--f-soft); }
.fids-title { display: flex; align-items: center; gap: .4em; margin: .22em 0 0; font-size: 2.3em; font-weight: 850; font-stretch: 118%; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.fids-title svg { width: .9em; height: .9em; color: var(--f-accent); flex-shrink: 0; }
.fids-title small { font-size: .42em; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--f-soft); margin-left: .35em; }

.fids-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--f-line); }
.fids-tabs button { appearance: none; border: 0; cursor: pointer; padding: .55em 1.2em; border-radius: 999px; background: transparent; color: var(--f-soft); font: 600 .9em var(--f-font); display: inline-flex; align-items: center; gap: .45em; }
.fids-tabs button svg { width: 1.1em; height: 1.1em; }
.fids-tabs button[aria-selected="true"] { background: var(--f-accent); color: #fff; }
.fids-tabs button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.fids-clock { text-align: right; font-family: var(--f-mono); line-height: 1.15; flex-shrink: 0; }
.fids-clock b { display: block; font-size: 2.1em; font-weight: 500; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.fids-clock b small { font-size: .5em; color: var(--f-soft); margin-left: .1em; }
.fids-clock span { display: block; font-size: .74em; letter-spacing: .1em; text-transform: uppercase; color: var(--f-soft); }

.fids-band { height: .6em; min-height: 6px; flex-shrink: 0; }

/* Columns */
.fids-head, .fids-row {
  display: grid;
  grid-template-columns: 6.2em 7.6em minmax(0, 1.25fr) minmax(0, 1.25fr) 7.4em minmax(0, .9fr) 11.5em;
  align-items: center;
  column-gap: 1.2em;
  padding: 0 1.6em;
}
.fids[data-pilots="off"] .fids-head, .fids[data-pilots="off"] .fids-row { grid-template-columns: 6.2em 7.6em minmax(0, 1.3fr) minmax(0, 1.3fr) 8.4em 11.5em; }
.fids[data-pilots="off"] .c-crew { display: none; }
/* One airport: hide the column that is always that airport */
.fids[data-station][data-board="departures"] .c-from, .fids[data-station][data-board="arrivals"] .c-to { display: none; }
.fids[data-station] .fids-head, .fids[data-station] .fids-row { grid-template-columns: 6.2em 7.6em minmax(0, 1.6fr) 8em minmax(0, .9fr) 11.5em; }
.fids[data-station][data-pilots="off"] .fids-head, .fids[data-station][data-pilots="off"] .fids-row { grid-template-columns: 6.2em 7.6em minmax(0, 1.8fr) 8.4em 11.5em; }

.fids-head { padding-top: .9em; padding-bottom: .8em; border-bottom: 1px solid var(--f-line); background: var(--f-bg); }
.fids-head > div { white-space: nowrap; font: 500 .72em/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--f-soft); }
.fids-head .c-status, .fids-row .c-status { text-align: left; }

.fids-rows { display: grid; grid-template-rows: repeat(var(--f-rows), var(--f-row-h)); perspective: 1400px; position: relative; }
.fids-row { position: relative; height: 100%; border-bottom: 1px solid var(--f-line); background: var(--f-row2); transform-origin: 50% 0; }
.fids-row:nth-child(even) { background: var(--f-row); }
.fids-row.blank { background: transparent; }
.fids-row.blank:nth-child(even) { background: rgba(255, 255, 255, .012); }
.fids-row > div { min-width: 0; }
.fids-row b, .fids-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fids-row small { margin-top: .25em; font: 500 .78em/1.1 var(--f-mono); letter-spacing: .06em; color: var(--f-faint); }

.c-time b { font: 500 1.45em/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.c-time small { color: var(--f-soft); }
.c-time s { display: block; margin-top: .2em; font: 500 .8em var(--f-mono); color: var(--f-faint); }
.c-flight b { font-size: 1.2em; font-weight: 750; letter-spacing: .02em; }
.c-from b, .c-to b { font-size: 1.3em; font-weight: 700; font-stretch: 105%; letter-spacing: -.005em; }
.fids[data-board="departures"] .c-from b, .fids[data-board="arrivals"] .c-to b { color: #c8d1df; font-weight: 600; }
.c-ac b { font: 600 1.1em var(--f-mono); letter-spacing: .04em; }
.c-crew { font-size: .98em; color: #c8d1df; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-crew span { display: inline-flex; align-items: center; gap: .45em; }
.c-crew svg { width: 1em; height: 1em; color: var(--f-faint); flex-shrink: 0; }
.m-only { display: none !important; }

/* Status */
.st { display: inline-flex; align-items: center; gap: .55em; font-weight: 700; font-size: 1.04em; white-space: nowrap; color: var(--f-ink); }
.st i { width: .6em; height: .6em; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.st em { font: 500 .95em var(--f-mono); font-style: normal; letter-spacing: .02em; }
.st-scheduled { color: var(--f-soft); font-weight: 600; }
.st-scheduled i { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.st-ontime { color: var(--f-green); }
.st-boarding, .st-taxi { color: var(--f-amber); }
.st-boarding i, .st-taxi i, .st-approach i { animation: fidsBlink 1.2s steps(2, jump-none) infinite; }
.st-departed { color: var(--f-ink); }
.st-departed i { background: var(--f-faint); }
.st-expected { color: var(--f-green); }
.st-expected_late { color: var(--f-amber); }
.st-approach { color: var(--f-cyan); }
.st-landed { color: var(--f-green); }
.st-arrived { color: var(--f-soft); }
.st-arrived i { background: var(--f-faint); }
.st-delayed { color: var(--f-red); }
.fids-row[data-status="boarding"]::before, .fids-row[data-status="approach"]::before, .fids-row[data-status="taxi"]::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: currentColor;
}
.fids-row[data-status="boarding"]::before, .fids-row[data-status="taxi"]::before { color: var(--f-amber); }
.fids-row[data-status="approach"]::before { color: var(--f-cyan); }
@keyframes fidsBlink { 50% { opacity: .2; } }

/* Flip in on a new page, flash a cell that changed */
.fids-row.flip { animation: fidsFlip .55s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes fidsFlip { from { transform: rotateX(-88deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
.fids-row .chg { animation: fidsChg 1.6s ease-out; border-radius: 4px; }
@keyframes fidsChg { 0%, 30% { background: rgba(255, 178, 46, .22); } 100% { background: transparent; } }

.fids-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .8em; text-align: center; color: var(--f-soft); padding: 2em; }
.fids-empty svg { width: 2.6em; height: 2.6em; color: var(--f-faint); }
.fids-empty p { margin: 0; max-width: 32em; font-size: 1.05em; line-height: 1.5; }

/* Footer */
.fids-foot { display: flex; align-items: center; gap: 1.4em; padding: .8em 1.6em; background: var(--f-panel); border-top: 1px solid var(--f-line); font: 500 .8em var(--f-mono); letter-spacing: .06em; color: var(--f-soft); }
.fids-ticker { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.fids-ticker span { display: inline-block; animation: fidsTick var(--tick, 40s) linear infinite; }
.fids-ticker span i { font-style: normal; padding: 0 3em; color: var(--f-accent); }
@keyframes fidsTick { to { transform: translateX(-50%); } }
.fids-meta { display: flex; align-items: center; gap: 1.2em; flex-shrink: 0; text-transform: uppercase; }
.fids-live { display: inline-flex; align-items: center; gap: .5em; }
.fids-live i { width: .55em; height: .55em; border-radius: 50%; background: var(--f-green); box-shadow: 0 0 0 .25em rgba(53, 208, 127, .15); }
.fids-live.off i { background: var(--f-amber); box-shadow: none; }
.fids-pages { display: inline-flex; align-items: center; gap: .6em; color: var(--f-ink); }
.fids-dots { display: inline-flex; gap: .35em; }
.fids-dots i { width: 1.6em; height: .3em; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; position: relative; }
.fids-dots i.done { background: rgba(255, 255, 255, .5); }
.fids-dots i.on::after { content: ""; position: absolute; inset: 0; background: var(--f-accent); transform-origin: 0 50%; animation: fidsPage var(--page, 12s) linear forwards; }
@keyframes fidsPage { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Kiosk: fill the screen and scale with it */
.fids--kiosk { position: fixed; inset: 0; font-size: clamp(11px, 1.08vw, 40px); }
.fids--kiosk .fids-rows { flex: 1; grid-template-rows: repeat(var(--f-rows), 1fr); }
.fids--kiosk .fids-tabs { display: none; }

/* Page mode: a screen on the page */
.fids--page { border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }

@media (max-width: 1100px) {
  .fids-head, .fids-row { grid-template-columns: 5.4em 6.6em minmax(0, 1fr) minmax(0, 1fr) 6.4em 10.5em !important; column-gap: .9em; }
  .c-crew { display: none !important; }
  .fids[data-station] .fids-head, .fids[data-station] .fids-row { grid-template-columns: 5.4em 6.6em minmax(0, 1fr) 6.4em 10.5em !important; }
}
@media (max-width: 760px) {
  .fids { font-size: 14px; --f-row-h: 74px; }
  .fids-top { flex-wrap: wrap; gap: .8em 1em; padding: .9em 1em; }
  .fids-title { font-size: 1.8em; }
  .fids-eyebrow, .fids-clock span[data-date], .fids--page .fids-brand img { display: none; }
  .fids-tabs { order: 3; width: 100%; }
  .fids-tabs button { flex: 1; justify-content: center; }
  .fids-clock b { font-size: 1.6em; }
  .fids-head, .fids-row { grid-template-columns: 4.6em minmax(0, 1fr) 7.6em !important; padding: 0 1em; column-gap: .8em; }
  .fids-head .c-flight, .fids-head .c-ac, .fids-row .c-flight, .fids-row .c-ac, .c-crew { display: none !important; }
  .fids[data-board="departures"] .c-from, .fids[data-board="arrivals"] .c-to { display: none !important; }
  .m-only { display: block !important; }
  .st { font-size: .92em; }
  .fids-foot { padding: .7em 1em; }
  .fids-ticker { display: none; }
  .fids-meta { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .fids-row.flip, .fids-row .chg, .fids-ticker span, .st i { animation: none !important; }
}
