/* portal-nav.css — shared off-canvas drawer OVERLAY for the portal menu.
   Single source for the slide-in panel used by every interactive page via the
   components/portal-header partial. Only the overlay lives here (backdrop +
   drawer + drawer link list); each page's own stylesheet keeps its header-bar
   skin (.site-header / .brand / .nav-toggle), so the slate-themed portal pages
   and the dark-themed election pages each keep their look. The drawer background
   falls back to a dark slate when a page doesn't define --hl-dark. */

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 200;
}
.nav-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
body.drawer-open {
  overflow: hidden;
}

.portal-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(330px, 86vw);
  background: var(--hl-dark, #262b35);
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 210;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.35);
  -webkit-overflow-scrolling: touch;
}
.portal-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.drawer-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4c9d1;
}
.drawer-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s ease;
}
.drawer-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0.9rem 1.4rem;
}
.drawer-section-label {
  margin: 0.7rem 0.35rem 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b93a2;
}
.drawer-section-label:first-child {
  margin-top: 0;
}
.drawer-nav .nav-link {
  display: block;
  color: #fff;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 10px;
  white-space: normal;
}
.drawer-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.drawer-nav .nav-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
}
.drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0.7rem 0.35rem;
}
.drawer-nav .nav-link-home {
  border-color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
}
