/* ─────────────────────────────────────────────────────────────────────────────
   drawer.css — Thanzi Side Drawer
   CSS vars: --text-1, --text-3, --bg-surface, --bg-page, --bg-inset,
             --border, --accent, --danger  (matches style.css)
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Hamburger button — fixed top-right, left of theme toggle ────────────── */
.hamburger-btn {
  position: fixed;
  top: 14px;
  right: 60px;           /* sits just left of the theme toggle at right:14px */
  z-index: 500;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  display: none;         /* hidden by default; shown via JS on dashboard only */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: border-color .15s, background .15s;
}
.hamburger-btn:hover  { border-color: var(--accent); }
.hamburger-btn:active { transform: scale(0.92); }

.hamburger-btn span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-1);
  transition: transform .25s, opacity .2s;
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  opacity: 0;
  transition: opacity .25s;
}
.drawer-overlay.open {
  display: block;
  opacity: 1;
}

/* ── Drawer panel ────────────────────────────────────────────────────────── */
.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 78vw;
  max-width: 300px;
  background: var(--bg-page);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
  overflow-x: hidden;
}
.side-drawer.open {
  transform: translateX(0);
  box-shadow: 4px 0 24px rgba(0,0,0,.35);
}

/* ── User header ─────────────────────────────────────────────────────────── */
.drawer-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 36px 20px 20px;
}

.drawer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), .18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.drawer-user-name {
  font-weight: 700;
  font-size: .97rem;
  color: var(--text-1);
  line-height: 1.3;
}
.drawer-user-sub {
  font-size: .8rem;
  color: var(--text-3);
  margin-top: 2px;
}

/* ── Nav list ────────────────────────────────────────────────────────────── */
.drawer-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  background: var(--bg-surface);
  color: var(--text-1);
  font-size: .91rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background .15s, color .15s;
}
.drawer-nav-item:active {
  background: rgba(var(--accent-rgb), .12);
}
.drawer-nav-item.active {
  background: var(--accent);
  color: var(--on-accent);
}
.drawer-nav-item svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--text-3);
  transition: color .15s;
}
.drawer-nav-item.active svg { color: var(--on-accent); }

/* ── Logout ──────────────────────────────────────────────────────────────── */
.drawer-logout {
  margin: 4px 12px 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  background: var(--bg-surface);
  color: var(--danger);
  font-size: .91rem;
  font-weight: 600;
  cursor: pointer;
  width: calc(100% - 24px);
  text-align: left;
  transition: background .15s;
}
.drawer-logout:active {
  background: rgba(231, 76, 60, .1);
}
.drawer-logout svg {
  color: var(--danger);
  width: 19px;
  height: 19px;
}
