/* First Class: waypoint ETAs on the moving map and the Flight plan page (Flight Information rotation).
   Colours follow a navigation display: white fixes, cyan times, magenta for the active (next) fix. */
:root {
  --airshow-wpt-active: #ff6ad5;
  --airshow-wpt-time: #9fe3ff;
  --airshow-wpt-halo:
    0 0 1px rgba(0, 0, 0, 0.95),
    0 0 1px rgba(0, 0, 0, 0.95),
    0 0 2px rgba(0, 0, 0, 0.75),
    0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ---- Map labels ---- */
.airshow-wpt-pane.is-hidden {
  display: none;
}
.airshow-wpt {
  position: absolute;
  pointer-events: none;
  user-select: none;
}
.airshow-wpt > * {
  position: relative;
}
.airshow-wpt .airshow-wpt-symbol {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 14px;
  height: 14px;
  fill: #ffffff;
  stroke: rgba(0, 0, 0, 0.8);
  stroke-width: 0.9;
  paint-order: stroke;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}
.airshow-wpt .airshow-wpt-name,
.airshow-wpt .airshow-wpt-eta {
  position: absolute;
  left: 11px;
  white-space: nowrap;
  font-family: var(--airshow-city-label-font-family, "Pretendard", "Segoe UI", Arial, sans-serif);
  line-height: 1;
  text-shadow: var(--airshow-wpt-halo);
}
.airshow-wpt .airshow-wpt-name {
  top: -14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
}
.airshow-wpt .airshow-wpt-eta {
  top: 1px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--airshow-wpt-time);
}
.airshow-wpt.is-next .airshow-wpt-symbol {
  fill: var(--airshow-wpt-active);
}
.airshow-wpt.is-next .airshow-wpt-name,
.airshow-wpt.is-next .airshow-wpt-eta {
  color: var(--airshow-wpt-active);
}
.airshow-wpt.is-passed {
  opacity: 0.5;
}
.airshow-wpt.is-passed .airshow-wpt-symbol {
  fill: rgba(205, 212, 226, 0.9);
}
.airshow-wpt.is-passed .airshow-wpt-name {
  top: -6px;
  font-weight: 600;
  color: rgba(225, 230, 240, 0.92);
}
.airshow-wpt .airshow-wpt-name,
.airshow-wpt .airshow-wpt-eta,
.airshow-wpt .airshow-wpt-symbol {
  transition: color 200ms ease, fill 200ms ease, opacity 200ms ease;
}

/* ---- Flight plan page ---- */
.topbar-flightinfo-plan-page {
  grid-row: 2;
  grid-column: 1;
  align-self: center;
  width: min(1080px, calc(100vw - 160px));
  margin: 0 auto;
  display: none;
  opacity: 0;
  translate: 0 8px;
  color: #ffffff;
  transition: opacity 200ms ease, translate 220ms cubic-bezier(0.2, 0.7, 0.2, 1), display 200ms allow-discrete;
}
.topbar-flightinfo-plan-page.visible {
  display: block;
  opacity: 1;
  translate: 0 0;
}
@starting-style {
  .topbar-flightinfo-plan-page.visible {
    opacity: 0;
    translate: 0 8px;
  }
}
.fi-plan-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 4px 14px;
}
.fi-plan-heading {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 18px;
  row-gap: 4px;
}
.fi-plan-kicker {
  grid-column: 1 / -1;
  font-size: calc(15px * var(--airshow-ui-font-size-scale, 1));
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--airshow-info-page-accent);
}
.fi-plan-route {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: calc(36px * var(--airshow-ui-font-size-scale, 1));
  font-weight: 700;
  letter-spacing: 0.02em;
}
.fi-plan-route svg {
  width: 30px;
  height: 15px;
  fill: none;
  stroke: var(--airshow-info-page-label-color);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fi-plan-meta {
  font-size: calc(18px * var(--airshow-ui-font-size-scale, 1));
  font-weight: 500;
  color: var(--airshow-info-page-label-color);
  font-variant-numeric: tabular-nums;
}
.fi-plan-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: calc(15px * var(--airshow-ui-font-size-scale, 1));
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease-out;
}
.fi-plan-copy:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
}
.fi-plan-copy:active {
  transform: translateY(1px);
}
.fi-plan-copy:focus-visible {
  outline: 2px solid var(--airshow-info-page-accent);
  outline-offset: 2px;
}
.fi-plan-copy svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fi-plan-copied-icon,
.fi-plan-copy.is-copied .fi-plan-copy-icon {
  display: none;
}
.fi-plan-copy.is-copied .fi-plan-copied-icon {
  display: block;
  color: #7ee2a8;
}
.fi-plan-copy.is-copied {
  border-color: rgba(126, 226, 168, 0.55);
}
/* The legs list reads like a cockpit display unit: dark inset glass, fixed columns. */
.fi-plan-screen {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(4, 7, 16, 0.78), rgba(6, 10, 22, 0.86));
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 14px 30px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.fi-plan-cols,
.fi-plan-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 0 28px 0 18px;
}
.fi-plan-cols {
  height: 38px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: calc(13px * var(--airshow-ui-font-size-scale, 1));
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(159, 227, 255, 0.7);
}
.fi-plan-cols span:nth-child(n + 3),
.fi-plan-row > span:nth-child(n + 3) {
  text-align: right;
}
.fi-plan-cols i {
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(159, 227, 255, 0.5);
}
.fi-plan-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: min(470px, calc(100vh - 470px));
  min-height: 220px;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.fi-plan-row {
  position: relative;
  height: 50px;
  font-size: calc(21px * var(--airshow-ui-font-size-scale, 1));
  font-variant-numeric: tabular-nums;
  transition: opacity 200ms ease, background-color 200ms ease;
}
.fi-plan-row + .fi-plan-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.fi-plan-fix {
  font-weight: 700;
  letter-spacing: 0.06em;
}
.fi-plan-trk,
.fi-plan-leg {
  font-weight: 500;
  color: rgba(159, 227, 255, 0.88);
}
.fi-plan-eta {
  font-weight: 600;
}
.fi-plan-state {
  display: inline-flex;
  align-items: center;
}
.fi-plan-state i {
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.fi-plan-state svg {
  width: 20px;
  height: 20px;
  margin-left: 1px;
  fill: none;
  stroke: rgba(205, 214, 230, 0.85);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fi-plan-state b {
  padding: 4px 7px 3px;
  border-radius: 4px;
  background: var(--airshow-wpt-active);
  color: #1a0516;
  font-size: calc(12px * var(--airshow-ui-font-size-scale, 1));
  font-weight: 800;
  letter-spacing: 0.1em;
}
.fi-plan-row.is-passed {
  opacity: 0.42;
}
.fi-plan-row.is-passed .fi-plan-trk,
.fi-plan-row.is-passed .fi-plan-leg {
  color: rgba(220, 226, 238, 0.9);
}
.fi-plan-row.is-next {
  background: linear-gradient(90deg, rgba(255, 106, 213, 0.16), rgba(255, 106, 213, 0.03) 70%);
  box-shadow: inset 3px 0 0 var(--airshow-wpt-active);
}
.fi-plan-row.is-next .fi-plan-fix,
.fi-plan-row.is-next .fi-plan-eta {
  color: var(--airshow-wpt-active);
}
.fi-plan-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Phone landscape and other short screens. */
@media (max-height: 520px) {
  .topbar-flightinfo-plan-page {
    width: calc(100vw - 40px);
    align-self: start;
    margin-top: 6px;
  }
  .fi-plan-head {
    margin: 0 2px 6px;
    gap: 12px;
  }
  .fi-plan-heading {
    column-gap: 10px;
    row-gap: 0;
  }
  .fi-plan-kicker {
    font-size: 10px;
  }
  .fi-plan-route {
    font-size: 17px;
    gap: 6px;
  }
  .fi-plan-route svg {
    width: 18px;
    height: 9px;
  }
  .fi-plan-meta {
    font-size: 11px;
  }
  .fi-plan-copy {
    height: 28px;
    padding: 0 10px 0 8px;
    font-size: 11px;
    gap: 5px;
    border-radius: 6px;
  }
  .fi-plan-copy svg {
    width: 14px;
    height: 14px;
  }
  .fi-plan-screen {
    border-radius: 8px;
  }
  .fi-plan-cols,
  .fi-plan-row {
    grid-template-columns: 52px minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 8px;
    padding: 0 14px 0 10px;
  }
  .fi-plan-cols {
    height: 22px;
    font-size: 9px;
  }
  .fi-plan-list {
    max-height: calc(100vh - 205px);
    min-height: 90px;
    padding: 2px 0;
  }
  .fi-plan-row {
    height: 28px;
    font-size: 13px;
  }
  .fi-plan-state b {
    padding: 2px 4px 1px;
    font-size: 8px;
    border-radius: 3px;
  }
  .fi-plan-state svg {
    width: 14px;
    height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar-flightinfo-plan-page,
  .fi-plan-row,
  .airshow-wpt .airshow-wpt-name,
  .airshow-wpt .airshow-wpt-eta,
  .airshow-wpt .airshow-wpt-symbol {
    transition: none !important;
    translate: none !important;
  }
  .fi-plan-list {
    scroll-behavior: auto;
  }
}
