/* ============================================================================
   Airbus A320 Navigation Display (ND) & EFIS Control Panel Styling
   Ultra-realistic CRT Bezel, Rotaries & Glass Reflection
   ============================================================================ */

.nd-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.25s ease;
}

.nd-pane.hidden {
  display: none !important;
}

/* EFIS Control Panel (Cockpit Panel Above ND) */
.efis-control-panel {
  width: 480px;
  background: linear-gradient(175deg, #748c9e 0%, #637b8d 35%, #4e6375 100%);
  border: 2px solid #3b4b57;
  border-radius: 12px 12px 4px 4px;
  padding: 10px 14px 8px;
  margin-bottom: 8px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.efis-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.efis-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #e2ecf5;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.efis-btn-row {
  display: flex;
  gap: 4px;
}

.efis-btn {
  background: linear-gradient(180deg, #2a2e38 0%, #161920 100%);
  border: 1px solid #363c48;
  border-bottom: 2px solid #0b0d11;
  border-radius: 4px;
  color: #cbd5e1;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 7px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0,0,0,0.6);
  transition: all 0.08s ease;
}

.efis-btn:hover {
  background: linear-gradient(180deg, #383e4c 0%, #20242e 100%);
  color: #ffffff;
}

.efis-btn.active {
  background: #0f766e;
  border-color: #14b8a6;
  color: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 6px rgba(20, 184, 166, 0.5);
}

.efis-select {
  background: #14171d;
  border: 1px solid #333a46;
  border-radius: 4px;
  color: #00ffff;
  font-family: 'HoneywellMCDU', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  cursor: pointer;
  outline: none;
}

.efis-select:focus {
  border-color: #00e5ff;
}

/* ND Screen Bezel & Chassis */
.nd-chassis {
  width: 480px;
  background: linear-gradient(175deg, #748c9e 0%, #637b8d 25%, #566e80 65%, #495e70 100%);
  border-radius: 14px;
  padding: 12px;
  border: 3px solid #3b4b57;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 0 rgba(0, 0, 0, 0.6);
  position: relative;
  user-select: none;
}

.nd-screen-frame {
  width: 100%;
  height: 480px;
  background: #030405;
  border-radius: 8px;
  border: 3px solid #07090b;
  box-shadow:
    inset 0 0 50px rgba(0, 255, 65, 0.03),
    inset 0 0 16px rgba(0, 0, 0, 0.95),
    0 0 0 1px #161b22;
  position: relative;
  overflow: hidden;
}

/* Glass scanline & curved CRT vignette */
.nd-screen-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 95% 85% at 50% 45%, transparent 65%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 5;
}

.nd-screen-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.12) 2px, rgba(0, 0, 0, 0.12) 4px);
  pointer-events: none;
  z-index: 6;
}

#ndCanvas {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 2;
}

/* ============================================================================
   MOBILE RESPONSIVE RULES FOR NAVIGATION DISPLAY (PHONE VIEWPORTS <= 520px)
   ============================================================================ */
@media (max-width: 520px) {
  .nd-pane {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    padding: 0;
  }

  .efis-control-panel {
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    padding: 6px 8px 6px;
    border-radius: 8px;
    margin-bottom: 6px;
  }

  .efis-label {
    font-size: 8.5px;
    letter-spacing: 0.4px;
  }

  .efis-btn {
    font-size: 9px;
    padding: 3px 5px;
  }

  .efis-select {
    font-size: 10px;
    padding: 2px 4px;
  }

  .nd-chassis {
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 10px;
    border-width: 2px;
  }

  .nd-screen-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    border-width: 2px;
  }
}

