/* ==== Cockpit HUD — only active when body.has-cockpit ==== */

/* Kill global planet overlay so we don't double-stack */
body.has-cockpit::after { display:none !important; }

/* Hide site header/footer for immersive view */
body.has-cockpit header,
body.has-cockpit .site-header,
body.has-cockpit footer,
body.has-cockpit .site-footer {
  display:none !important;
}

/* Frame geometry variables */
:root {
  --cf-top-h: 30vh;
  --cf-bot-h: 18vh;
  --cf-side-w: 16vw;
}

/* Add breathing room so content isn’t covered */
body.has-cockpit .wp-site-blocks,
body.has-cockpit main,
body.has-cockpit .site-main {
  position:relative;
  z-index:2;
  padding-top:  calc(var(--cf-top-h) + 28px);
  padding-bottom: calc(var(--cf-bot-h) + 28px);
}

/* Optional max width for Observatory content */
body.has-cockpit #dossier-scope {
  width: min(1200px, 86vw);
  margin-inline: auto !important;
}

/* Cockpit frame container */
body.has-cockpit .cockpit-frame {
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  isolation:isolate;
}

/* Space layers */
body.has-cockpit .cockpit-frame .cf-layer {
  position:fixed;
  inset:-2vmax;
  background:center/cover no-repeat;
  pointer-events:none;
}
body.has-cockpit .cockpit-frame .cf-layer.stars  { filter:brightness(1.05) contrast(1.06); z-index:0; }
body.has-cockpit .cockpit-frame .cf-layer.nebula { opacity:.55; z-index:1; }
body.has-cockpit .cockpit-frame .cf-layer.grid   { opacity:.10; mix-blend-mode:screen; z-index:2; }

/* Readability vignette overlay */
body.has-cockpit .cockpit-frame::after {
  content:"";
  position:fixed;
  inset:0;
  z-index:3;
  pointer-events:none;
  background: radial-gradient(
    110% 80% at 50% 55%,
    rgba(0,0,0,.45) 0%,
    rgba(0,0,0,.28) 48%,
    rgba(0,0,0,.10) 100%
  );
}

/* Chrome pieces */
body.has-cockpit .cockpit-frame .cf-chrome {
  position:fixed;
  background:center/cover no-repeat;
  filter: drop-shadow(0 40px 80px rgba(0,0,0,.55))
          drop-shadow(0 0 22px rgba(0,0,0,.35));
  opacity:.97;
  z-index:4;
}
body.has-cockpit .cockpit-frame .cf-chrome.top    { left:0; right:0; top:0;    height:var(--cf-top-h); }
body.has-cockpit .cockpit-frame .cf-chrome.bottom { left:0; right:0; bottom:0; height:var(--cf-bot-h); }
body.has-cockpit .cockpit-frame .cf-chrome.left   { top:0; bottom:0; left:0;   width:var(--cf-side-w); background-position:left center; }
body.has-cockpit .cockpit-frame .cf-chrome.right  { top:0; bottom:0; right:0;  width:var(--cf-side-w); background-position:right center; }

/* Responsive scaling */
@media (max-width:1400px) {
  :root { --cf-side-w:18vw; }
}
@media (max-width:1100px) {
  :root { --cf-top-h:26vh; --cf-bot-h:15vh; --cf-side-w:20vw; }
}
@media (max-width:900px) {
  :root { --cf-top-h:22vh; --cf-bot-h:14vh; --cf-side-w:22vw; }
}
@media (max-width:700px) {
  :root { --cf-top-h:20vh; --cf-bot-h:12vh; --cf-side-w:18vw; }
  body.has-cockpit .cockpit-frame .cf-chrome { opacity:.94; }
}
