/* Superblok V4.2.2 — fixed mobile header hotfix.
   Scope: mobile header positioning only. Existing authentication, RBAC,
   Base64 image rendering, drawer navigation and server-side modules are untouched. */
@media (max-width: 780px) {
  :root {
    --superblok-mobile-header-height: 66px;
  }

  html {
    scroll-padding-top: calc(var(--superblok-mobile-header-height) + 12px) !important;
  }

  /* Reserve the exact header height so fixed positioning never covers content. */
  body {
    padding-top: var(--superblok-mobile-header-height) !important;
  }

  /* Keep the public header visible while the page scrolls. */
  .site-header {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-height: var(--superblok-mobile-header-height) !important;
    margin: 0 !important;
    z-index: 1200 !important;
    isolation: isolate;
  }

  .site-header .nav-wrap {
    width: 100% !important;
    min-height: var(--superblok-mobile-header-height) !important;
    height: var(--superblok-mobile-header-height) !important;
  }

  /* Drawer and scrim remain above the fixed header and cover the viewport. */
  .site-header .main-nav,
  .site-header .main-nav:not(.open) {
    z-index: 1230 !important;
  }

  .site-header .nav-scrim,
  .site-header .nav-scrim:not(.visible) {
    z-index: 1220 !important;
  }

  /* Avoid an invisible legacy sticky offset when the browser restores a page. */
  body:not(.mobile-nav-open) .site-header {
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Admin mobile toolbar stays directly below the fixed public header. */
  .admin-mobile-bar {
    top: calc(var(--superblok-mobile-header-height) + 8px) !important;
  }
}
