/* First Class airport card tab: Traffic (busyness dial, arrival waves, departure queue). */

.airport-traffic-pane {
  --atp-green: #5ad98a;
  --atp-amber: #f3ac3c;
  --atp-red: #ef5a5f;
  flex: 0 0 304px;
  box-sizing: border-box;
  padding: 10px 12px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(2, 6, 13, 0.78), rgba(4, 9, 18, 0.56));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #eef3fa;
  font-variant-numeric: tabular-nums;
}
.atp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Engraved cockpit placard. */
.atp-placard {
  padding: 2px 7px 1px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #232b38, #151b25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 0 rgba(0, 0, 0, 0.5);
  color: rgba(232, 238, 247, 0.86);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.atp-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(200, 214, 230, 0.7);
}
.atp-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--atp-green);
  box-shadow: 0 0 6px rgba(90, 217, 138, 0.8);
  animation: atp-blink 2s ease-in-out infinite;
}
@keyframes atp-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.atp-flow {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px -4px 0;
  padding: 4px;
  border-radius: 8px;
}
.atp-flow.is-changed {
  animation: atp-flash 900ms ease-out 1;
}
@keyframes atp-flash {
  0% { background: rgba(255, 255, 255, 0.14); }
  100% { background: rgba(255, 255, 255, 0); }
}
.atp-gauge {
  width: 100px;
  height: 56px;
  overflow: visible;
}
.atp-arc {
  fill: none;
  stroke-width: 4.5;
}
.atp-arc-green { stroke: var(--atp-green); }
.atp-arc-amber { stroke: var(--atp-amber); }
.atp-arc-red { stroke: var(--atp-red); }
.atp-ticks line {
  stroke: rgba(236, 242, 250, 0.62);
  stroke-width: 1.3;
}
.atp-needle {
  transform-box: view-box;
  transform-origin: 50px 50px;
  transform: rotate(-90deg);
  transition: transform 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.atp-needle path {
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
}
.atp-needle circle {
  fill: #dfe6ef;
  stroke: #0b1018;
  stroke-width: 1.5;
}
.atp-word {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--atp-green);
}
.atp-flow[data-band="busy"] .atp-word { color: var(--atp-amber); }
.atp-flow[data-band="jam"] .atp-word { color: var(--atp-red); }
.atp-note {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(204, 216, 231, 0.8);
}

.atp-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 8px 0 0;
  padding: 7px 0 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.atp-counts div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  padding-left: 10px;
}
.atp-counts dt,
.atp-sub {
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(178, 194, 214, 0.78);
}
.atp-counts dd {
  margin: 1px 0 0;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.1;
}

.atp-block {
  margin-top: 9px;
}
.atp-sub {
  display: flex;
  justify-content: space-between;
}
.atp-sub span:last-child {
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  color: rgba(178, 194, 214, 0.6);
}
.atp-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 70px;
  padding-top: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.atp-col {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
}
.atp-count {
  text-align: center;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  color: rgba(226, 234, 244, 0.72);
}
.atp-bar {
  display: block;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(240, 245, 252, 0.92), rgba(240, 245, 252, 0.5));
  transition: height 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.atp-col:first-child .atp-bar {
  background: linear-gradient(180deg, rgba(240, 245, 252, 1), rgba(240, 245, 252, 0.7));
}
.atp-col.is-mine .atp-bar {
  background: var(--airport-popup-accent, #ffd23a);
}
.atp-col.is-mine .atp-count {
  color: var(--airport-popup-accent, #ffd23a);
}
.atp-mine {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  transition: left 250ms ease;
}
.atp-mine[data-edge="end"] { transform: translateX(-100%); }
.atp-mine[data-edge="start"] { transform: none; }
.atp-mine-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--airport-popup-accent, #ffd23a);
  color: var(--airport-popup-accent-text, #10151f);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.atp-axis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 3px;
  font-size: 10px;
  color: rgba(190, 204, 222, 0.72);
}

/* Departure queue: a small black departures board; each wait time sits on a split-flap tile. */
.atp-board {
  list-style: none;
  margin: 5px 0 0;
  padding: 3px 6px;
  border-radius: 6px;
  background: #04070c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 6px 14px rgba(0, 0, 0, 0.6);
}
.atp-dep {
  display: grid;
  grid-template-columns: 1fr 42px 48px;
  align-items: center;
  gap: 6px;
  height: 23px;
  font-size: 12px;
  transform-origin: 50% 0;
}
.atp-dep + .atp-dep {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.atp-cs {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 650;
  color: #f4f7fb;
}
.atp-ac {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(186, 200, 218, 0.72);
}
.atp-wait {
  justify-self: end;
  min-width: 40px;
  padding: 1px 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #232a35 0 calc(50% - 0.5px), #06090e calc(50% - 0.5px) calc(50% + 0.5px), #1a202a calc(50% + 0.5px) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #f4f7fb;
}
.atp-dep.is-empty .atp-wait { background: transparent; }
.atp-dep.is-long .atp-wait { color: var(--atp-amber); }
.atp-dep.is-entering {
  animation: atp-flip-in 240ms cubic-bezier(0.22, 0.61, 0.36, 1) 1;
}
.atp-dep.is-leaving {
  animation: atp-fold-out 240ms ease-in 1 forwards;
}
@keyframes atp-flip-in {
  from { transform: perspective(300px) rotateX(-80deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes atp-fold-out {
  from { opacity: 1; height: 23px; }
  to { opacity: 0; height: 0; }
}

html.airshow-mobile-runtime .airport-traffic-pane {
  display: grid;
  grid-template-columns: 116px 1fr;
  column-gap: 12px;
  padding: 6px 10px 6px;
}
html.airshow-mobile-runtime .atp-head { display: none; }
html.airshow-mobile-runtime .atp-flow { grid-column: 1; grid-row: 1; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0; justify-items: start; }
html.airshow-mobile-runtime .atp-gauge { width: 84px; height: 46px; }
html.airshow-mobile-runtime .atp-word { font-size: 15px; }
html.airshow-mobile-runtime .atp-note { display: none; }
html.airshow-mobile-runtime .atp-counts { grid-column: 1; grid-row: 2; grid-template-columns: 1fr; gap: 1px; margin-top: 4px; padding: 4px 0 0; border-bottom: 0; }
html.airshow-mobile-runtime .atp-counts div { display: flex; justify-content: space-between; align-items: baseline; }
html.airshow-mobile-runtime .atp-counts div + div { border-left: 0; padding-left: 0; }
html.airshow-mobile-runtime .atp-counts dd { font-size: 13px; }
html.airshow-mobile-runtime .atp-arrivals { grid-column: 2; grid-row: 1; margin-top: 0; }
html.airshow-mobile-runtime .atp-departures { grid-column: 2; grid-row: 2; margin-top: 5px; }
html.airshow-mobile-runtime .atp-bars { height: 41px; padding-top: 14px; gap: 3px; }
html.airshow-mobile-runtime .atp-sub { white-space: nowrap; }
html.airshow-mobile-runtime .atp-sub span:last-child { display: none; }

html.airshow-mobile-runtime .atp-axis { font-size: 9.5px; }
html.airshow-mobile-runtime .atp-board { padding: 2px 5px; }
html.airshow-mobile-runtime .atp-dep { height: 18px; font-size: 11px; grid-template-columns: 1fr 34px 42px; gap: 4px; }
html.airshow-mobile-runtime .atp-dep:nth-child(n + 3) { display: none; }
html.airshow-mobile-runtime .atp-wait { min-width: 36px; font-size: 11px; padding: 0 3px; }

@media (prefers-reduced-motion: reduce) {
  .atp-live i,
  .atp-flow.is-changed,
  .atp-dep.is-entering,
  .atp-dep.is-leaving { animation: none; }
  .atp-needle,
  .atp-bar,
  .atp-mine { transition: none; }
}
