/* Mobile navigation drawer for the LEGACY pages' embedded sidebar chrome.
 * Below the 1280px breakpoint their inline standalone CSS hides .gs-sidebar
 * outright; this sheet (linked AFTER that inline block by
 * scripts/add_mobile_drawer.py) turns it into a slide-in drawer with a
 * hamburger in the banner — same look and behavior as the templated pages
 * (src/css/site.css + src/js/site.js). Shared file: fix drawer behavior here
 * once, every legacy page picks it up. */

.gs-menu-btn {
  display: none;
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
}
.gs-menu-btn:hover { background: rgba(255, 255, 255, 0.08); }

@media (max-width: 1279px) {
  body.standalone .gs-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* The inline block says display:none!important at this width — this file
     loads later in the document, so an equal-importance rule here wins. */
  body.standalone .gs-sidebar {
    display: block !important;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 2px 0 18px rgba(0, 0, 0, 0.6);
    z-index: 1250;
  }
  body.standalone.nav-open .gs-sidebar { transform: translateX(0); }
  body.standalone .gs-scrim {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1240;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  body.standalone.nav-open .gs-scrim {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (min-width: 1280px) {
  .gs-scrim { display: none; }
}

/* Small-phone banner is 48px in the legacy chrome; keep the drawer and scrim
   below it and make room for the hamburger next to the centered banner text. */
@media (max-width: 600px) {
  body.standalone .gs-sidebar { top: 48px; }
  body.standalone .gs-scrim { top: 48px; }
  body.standalone .gs-banner { padding-left: 48px; }
}
