/* =============================================================================
 * css/flight2d.css  ·  the 2D side-scroll flight replay overlay (Reboot Phase 23)
 * Pairs with js/render/FlightScene2D.js + #f2-overlay in index.html
 * ===========================================================================*/

.f2-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #05060c;
  overflow: hidden;
  font-family: 'Sarabun', system-ui, sans-serif;
  color: #eef4ff;
  user-select: none;
}
.f2-overlay[hidden] { display: none !important; }

#f2-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- HUD (top-left glass) ------------------------------------------------ */
.f2-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 10px 14px 12px;
  border-radius: 14px;
  background: rgba(10, 16, 30, 0.55);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border: 1px solid rgba(120, 150, 200, 0.22);
  min-width: 190px;
  pointer-events: none;
}
.f2-phase {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 13px;
  color: #9fd0ff;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.f2-readout { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; }
.f2-readout > div { display: contents; }
.f2-readout span {
  font-size: 11px;
  color: #9db4d8;
}
.f2-readout b {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}
.f2-throttle {
  margin-top: 8px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.f2-throttle-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffb63a, #ff7a2f);
  transition: width 0.12s linear;
}

/* ---- event toast ------------------------------------------------------- */
.f2-toast {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  animation: f2-toast-in 0.3s ease;
}
.f2-toast[hidden] { display: none; }
@keyframes f2-toast-in {
  from { opacity: 0; transform: translateX(-50%) scale(0.8) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

.f2-hint {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(200, 214, 240, 0.5);
  text-align: center;
  pointer-events: none;
}

/* ---- transport bar --------------------------------------------------- */
.f2-bar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  width: min(760px, 94vw);
  border-radius: 16px;
  background: rgba(10, 16, 30, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(120, 150, 200, 0.22);
}
.f2-ic {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(150, 175, 220, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #eef4ff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.f2-ic:hover { background: rgba(255, 255, 255, 0.14); }
.f2-ic.f2-txt { width: auto; padding: 0 10px; font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.f2-timeline { position: relative; flex: 1; height: 36px; display: flex; align-items: center; }
.f2-marks { position: absolute; inset: 0; pointer-events: none; }
.f2-marks span {
  position: absolute;
  top: 8px;
  width: 2px;
  height: 20px;
  border-radius: 1px;
  transform: translateX(-1px);
  opacity: 0.85;
}
.f2-scrub {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}
.f2-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #5fe0a8;
  border: 2px solid #05060c;
}
.f2-scrub::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #5fe0a8;
  border: 2px solid #05060c;
}

/* ---- autopsy card -------------------------------------------------- */
.f2-autopsy {
  position: absolute;
  right: 14px;
  top: 14px;
  width: min(360px, 92vw);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: rgba(9, 13, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(120, 150, 200, 0.28);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.f2-autopsy[hidden] { display: none; }
.f2-ap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.f2-ap-head h2 { font-size: 15px; margin: 0; letter-spacing: 0.03em; }
.f2-ap-x {
  background: none;
  border: none;
  color: #9db4d8;
  font-size: 16px;
  cursor: pointer;
}
.f2-ap-verdict {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}
.f2-ap-verdict.pass { background: rgba(95, 224, 168, 0.16); color: #7ff0be; }
.f2-ap-verdict.fail { background: rgba(255, 90, 90, 0.16); color: #ff9a9a; }
.f2-ap-verdict[hidden] { display: none; }
.f2-ap-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.f2-ap-cell {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 8px 10px;
}
.f2-ap-cell span { display: block; font-size: 10px; color: #9db4d8; }
.f2-ap-cell b { font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.f2-ap-diag { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.f2-ap-diag li { display: flex; gap: 8px; font-size: 12px; align-items: flex-start; }
.f2-chip {
  flex: none;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}
.f2-chip.OK { background: rgba(95, 224, 168, 0.2); color: #7ff0be; }
.f2-chip.WARN { background: rgba(255, 206, 64, 0.2); color: #ffd970; }
.f2-chip.FAIL { background: rgba(255, 90, 90, 0.2); color: #ff9a9a; }
.f2-ap-actions { display: flex; gap: 8px; }
.f2-ap-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  border: 1px solid rgba(150, 175, 220, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #eef4ff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.f2-ap-btn.primary { background: #2f8f6b; border-color: #3fbf8f; }
.f2-ap-btn:hover { filter: brightness(1.12); }
