/*
 * layout.css — page shell. Header (sticky) + sidebar (sticky on desktop,
 * drawer on mobile) + main content. Mirrors the Next.js DocsLayout shape:
 * two-column tringify-docs layout, drawer triggered from the header below
 * the lg breakpoint.
 */

.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-body {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

.layout-sidebar {
  display: none;
}

.layout-main {
  flex: 1 1 auto;
  min-width: 0;
}

/* Desktop sidebar — sticky just below the header, scrolls independently. */
@media (min-width: 1024px) {
  .layout-sidebar {
    display: block;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: var(--sidebar-width);
    flex-shrink: 0;
    overflow-y: auto;
    padding: 0 var(--space-5);
    border-right: 1px solid hsl(var(--border));
  }
}

/* Mobile drawer — full-height overlay slid in from the left when toggled. */
.layout-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.layout-drawer.is-open {
  display: block;
}
.layout-drawer-panel {
  position: absolute;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-drawer-width);
  max-width: 88vw;
  background: hsl(var(--background));
  border-right: 1px solid hsl(var(--border));
  overflow-y: auto;
  padding: 0 var(--space-7);
}
@media (min-width: 1024px) {
  .layout-drawer { display: none !important; }
}
