/* css/lanes/avionics.css — owned by the AVIONICS lane.
   Radio stack + teaching highlight rings. Matte, no glow (fleet design rules);
   --intl-orange is the CHECKLIST lane's teaching token, #FF4F00 fallback. */

/* ------------------------------------------------------------ radio stack */
/* Compact 2-column grid: the whole stack must not exceed the six-pack row's
   height, or the flex layout crushes the #scene viewport to zero height
   (observed: sim viewport collapsed, canvas unreadable — fixed here). */
#avionics-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 158px));
  gap: 4px;
  align-content: start;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
#avionics-stack .av-unit {
  background: #0c0e11;
  border: 1px solid #1b2027;
  border-radius: 5px;
  padding: 3px 5px;
  min-width: 0;
}
#avionics-stack .av-unit[data-hl="audio"] { grid-column: 1 / -1; }
#avionics-stack .av-tag {
  display: block;
  font-size: 7.5px;
  letter-spacing: 0.07em;
  color: #7c8894;
  margin-bottom: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#avionics-stack .av-row { display: flex; align-items: center; gap: 4px; }
#avionics-stack .av-knobs { margin-top: 2px; flex-wrap: wrap; row-gap: 2px; }
#avionics-stack .av-freq {
  font-size: 11px;
  font-weight: 600;
  color: #ffb020; /* gas-discharge amber, like the KX 155A display */
  min-width: 44px;
}
#avionics-stack .av-freq.av-stby { color: #7c8894; }
#avionics-stack .av-btn {
  background: #171c22;
  border: 1px solid #262d35;
  border-radius: 3px;
  color: #c3cad2;
  font: 600 8px "JetBrains Mono", monospace;
  padding: 1px 4px;
  cursor: pointer;
}
#avionics-stack .av-btn:hover { background: #1f252d; }
#avionics-stack .av-btn:active { background: #262d35; }
#avionics-stack .av-tgl.on { color: #3ddc84; border-color: #3ddc84; }
#avionics-stack .av-code { font-size: 12px; font-weight: 700; color: #ffb020; }
#avionics-stack .av-mode { font-size: 9px; font-weight: 600; color: #3ddc84; }
#avionics-stack .av-obs, #avionics-stack .av-dme {
  display: block; font-size: 8.5px; color: #e8edf2; white-space: nowrap;
}
#avionics-stack .av-cdi { flex: none; }
#avionics-stack .av-cdi-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* --------------------------------------------------- teaching highlight rings */
.av-hl-ring {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  display: none;
  border: 3px solid var(--intl-orange, #FF4F00);
  opacity: 0.95;
}
.av-hl-ring[data-mode="awaiting-action"] {
  animation: av-hl-pulse 1.1s ease-in-out infinite;
}
.av-hl-ring[data-mode="correct"] { border-color: #3ddc84; }
.av-hl-ring[data-mode="wrong"] { border-color: #ff4d4d; }
/* pulse: opacity/ring-width only — no glow, no transform */
@keyframes av-hl-pulse {
  0%, 100% { opacity: 0.95; border-width: 3px; }
  50% { opacity: 0.45; border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .av-hl-ring[data-mode="awaiting-action"] { animation: none; }
}
