/* Shared public-facing sidebar (frontend/shared/public_nav.js) — injected
   into standalone public pages that had no navigation at all. Mirrors
   admin/sidebar.css's approach (body becomes a flex row of sidebar + main). */
/* flex-direction/align-items explicitly forced here (not just display) --
   a page whose own body{} rule sets flex-direction:column + align-items:center
   (the common "center a single card" pattern several of these standalone
   pages used before getting a sidebar) would otherwise leak those two
   properties through, since body{} and this class-scoped rule cascade
   per-property, not per-rule -- a less specific but property-present rule
   still wins for any property this rule doesn't itself set. Real bug hit on
   b2b-signup.html (2026-08-11): sidebar + main stacked in a centered column
   instead of sitting side by side, and the sidebar's position:sticky then
   visually overlapped page content while scrolling. */
body.public-has-sidebar { display: flex; flex-direction: row; align-items: stretch; min-height: 100vh; margin: 0; padding: 0 !important; }

.public-sidebar {
  width: 180px; min-width: 180px; background: var(--panel, #11151D);
  border-right: 1px solid var(--border, #232838); padding: 14px 10px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; flex-shrink: 0; transition: width .15s ease, min-width .15s ease, padding .15s ease;
}
.public-sidebar.collapsed { width: 34px; min-width: 34px; padding: 14px 4px; align-items: center; }
.public-sidebar.collapsed .nav-item,
.public-sidebar.collapsed .public-sidebar-brand { display: none; }

.public-sidebar-toggle {
  align-self: flex-end; background: none; border: none; color: var(--ink-dim, #8B93A7);
  cursor: pointer; font-size: 14px; padding: 4px 8px; margin-bottom: 8px; border-radius: 6px;
  font-family: system-ui, sans-serif;
}
.public-sidebar.collapsed .public-sidebar-toggle { align-self: center; }
.public-sidebar-toggle:hover { background: var(--panel-2, #161B25); color: var(--ink, #E7EAF0); }

.public-sidebar-brand {
  font-family: system-ui, sans-serif; font-weight: 800; font-size: 14px; color: var(--ink, #E7EAF0);
  padding: 2px 6px 12px; border-bottom: 1px solid var(--border, #232838); margin-bottom: 8px;
}
.public-sidebar .nav-item {
  display: block; padding: 7px 8px; border-radius: 7px; color: var(--ink-dim, #8B93A7);
  text-decoration: none; font-size: 12px; font-weight: 500; margin-bottom: 2px;
  font-family: system-ui, sans-serif; white-space: nowrap;
}
.public-sidebar .nav-item:hover { background: var(--panel-2, #161B25); color: var(--ink, #E7EAF0); }
.public-sidebar .nav-item.active { background: rgba(63,169,245,.16); color: var(--ink, #E7EAF0); font-weight: 700; }

.public-main { flex: 1; min-width: 0; overflow-x: auto; }

@media (prefers-reduced-motion: reduce) { .public-sidebar { transition: none; } }
