/* nb-fix.css — Applied to all entangledphy notebooks
   Fixes EPH nav / sidebar / share-bar layout conflicts
   and unifies dark/light accent colors site-wide.
*/

/* ── EPH Nav: make full-width fixed (not offset by body padding-left) ── */
#eph-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 2000 !important;
}

/* ── Body: add top padding so content clears the fixed nav (~52px) ── */
body {
  padding-top: 52px !important;
}

/* ── Sidebar: push down to start below the fixed EPH nav ── */
#nb-sidebar {
  top: 52px !important;
  height: calc(100vh - 52px) !important;
  bottom: auto !important;
}

/* ── Notebook's own progress bar: nudge below nav ── */
#nb-progress {
  top: 52px !important;
  z-index: 1999 !important;
}

/* ── EPH injected progress bar: hide — notebooks have their own ── */
#eph-prog { display: none !important; }

/* ── Share bar: move to right edge of sidebar instead of left:0 ── */
#share-bar {
  left: var(--sidebar-w, 272px) !important;
}

/* ── Sidebar toggle button (mobile): clear nav height ── */
#sidebar-toggle,
.sidebar-toggle-btn,
[id*="sidebar"][id*="btn"],
[id*="sidebar"][id*="toggle"] {
  top: 60px !important;
}

/* ── Unified accent color (dark mode = site green) ── */
html.dark {
  --accent:        #4ade80 !important;
  --accent-2:      #22d3ee !important;
  --accent-border: #166534 !important;
  --sidebar-accent:#4ade80 !important;
}
html:not(.dark) {
  --accent:        #16a34a !important;
  --accent-2:      #0891b2 !important;
  --accent-border: #bbf7d0 !important;
  --sidebar-accent:#16a34a !important;
}

/* ── Dark mode sidebar background — match site dark palette ── */
html.dark #nb-sidebar {
  background: #0f172a !important;
  border-right-color: #1e293b !important;
}

/* ── Mobile: full-width share bar, restore body layout ── */
@media (max-width: 768px) {
  #share-bar { left: 0 !important; display: none !important; }
  body { padding-top: 52px !important; }
  #nb-sidebar { top: 52px !important; }
}

/* ── Light mode nav ── */
html:not(.dark) #nb-sidebar {
  background: #ffffff !important;
  border-right-color: #e2e8f0 !important;
}
