/* beredskaQet — APP-SKAL (2026-10-21)
   ------------------------------------------------------------------------
   Formål: hele siden føles som en app.
     • top-banneret sidder fast i toppen
     • footeren sidder fast i bunden
     • KUN indholdet i midten scroller

   VIGTIGT: denne fil rører IKKE farver, temaer eller baggrunden.
   #bq-bg (aurora/metal/breath) skal fortsat være position:fixed; z-index:-1
   og fylde hele skærmen — reglerne nedenfor sikrer netop det.
   ------------------------------------------------------------------------ */

html {
  height: 100%;
}

/* siden skal gå helt ud til kanterne (ingen browser-margin) */
html,
body {
  margin: 0;
  padding: 0;
}
body.bq-app {
  width: 100%;
  height: 100vh;
  height: 100dvh;          /* mobil: brug den synlige højde */
  min-height: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── baggrundslaget: fast og fylder hele skærmen ─────────────────────────
   z-index sættes bevidst IKKE her: baggrund.css (v20261021-3) sætter
   z-index:0 !important + indhold paa z-index:1, fordi html har en
   uigennemsigtig bundfarve. En -1 ville skjule auroraen helt. */
#bq-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── top-banner ─────────────────────────────────────────────────────────── */
body.bq-app > header.site,
body.bq-app > header.wheel-top {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 30;
}

/* ── midten: det eneste der scroller ────────────────────────────────────── */
body.bq-app > .bq-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  /* indholdet skal ligge OVER #bq-bg (som har z-index:0 i baggrund.css) */
  position: relative;
  z-index: 1;
}

body.bq-app > main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

/* ── bund ───────────────────────────────────────────────────────────────── */
body.bq-app > footer.site {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: 0;
  padding: 10px 0 12px;
}

/* footer indhold må ikke vokse */
body.bq-app > footer.site > .wrap {
  padding-top: 0;
  padding-bottom: 0;
}

/* ── React-portalen (#root) ─────────────────────────────────────────────── */
body.bq-app > #root {
  flex: 1 1 auto;
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
}

body.bq-app #root > .app-ydre {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto;
  display: flex;
  flex-direction: column;
}

body.bq-app #root > .app-ydre > .app-skal {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.bq-app #root .app-skal > header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 40;
}

body.bq-app #root .app-skal > .bq-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

body.bq-app #root .app-skal > footer {
  flex: 0 0 auto;
  margin-top: 0 !important;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* teaser-siden ligger direkte i #root (ingen header/footer) */
body.bq-app #root > main {
  flex: 1 1 auto;
  min-height: 0 !important;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── scrollbar (diskret, samme udtryk i hele appen) ─────────────────────── */
body.bq-app .bq-scroll,
body.bq-app > main,
body.bq-app #root > main {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
body.bq-app .bq-scroll::-webkit-scrollbar,
body.bq-app > main::-webkit-scrollbar,
body.bq-app #root > main::-webkit-scrollbar {
  width: 10px;
}
body.bq-app .bq-scroll::-webkit-scrollbar-thumb,
body.bq-app > main::-webkit-scrollbar-thumb,
body.bq-app #root > main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
  border-radius: 8px;
}
body.bq-app .bq-scroll::-webkit-scrollbar-track,
body.bq-app > main::-webkit-scrollbar-track,
body.bq-app #root > main::-webkit-scrollbar-track {
  background: transparent;
}

/* ── flydende elementer (Regnbue-hjælpen) skal ligge OVER footeren ────────
   --bq-footer-h maales og sættes af app-skal.js. */
body.bq-app #bq-help-btn {
  bottom: calc(var(--bq-footer-h, 0px) + 14px);
}
body.bq-app #bq-help-bubble {
  bottom: calc(var(--bq-footer-h, 0px) + 22px);
}
body.bq-app #bq-help-panel {
  bottom: calc(var(--bq-footer-h, 0px) + 88px);
}

/* ── smalle skærme: giv plads til indholdet ─────────────────────────────── */
@media (max-width: 760px) {
  body.bq-app > footer.site {
    padding: 8px 0 10px;
    font-size: 11.5px;
  }
}

/* Gradering genvej i topmenuen (2026-10-26) */
.bq-gradering-nav {
  display: inline-flex !important;
  align-items: center;
  padding: 6px 11px !important;
  margin-left: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe680, #d4a017);
  color: #15130a !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 210, 54, .25);
}
.bq-gradering-nav:hover { filter: brightness(1.04); }
