/* ============================================
   POETRYTUBE — sidebar.css
   ============================================ */

/* ── Sidebar ────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 80;
  transition: transform var(--transition-slow), width var(--transition-slow);
  padding-bottom: 24px;
}

/* ── Sidebar sections ───────────────────────── */
.sidebar-section {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child { border-bottom: none; }

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 20px 6px;
}

/* ── Sidebar nav items ──────────────────────── */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
  cursor: pointer;
  min-height: 44px;
  text-decoration: none;
}
.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.sidebar-item.active {
  background: rgba(74, 14, 42, 0.5);
  color: var(--gold);
  border-right: 3px solid var(--gold);
}
.sidebar-item.active svg { color: var(--gold); }

.sidebar-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.sidebar-icon .icon-fill {
  fill: currentColor;
  stroke: none;
}

.sidebar-label {
  font-size: 0.875rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Mood category pills in sidebar ────────── */
.sidebar-mood-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  min-height: 36px;
}
.sidebar-mood-item:hover { color: var(--text); }

.mood-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--mood-color, var(--gold));
}

/* ── Mobile sidebar (drawer) ────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    top: 0;
    height: 100vh;
    z-index: 95;
    width: min(280px, 85vw);
    padding-top: calc(var(--header-height) + 8px);
    box-shadow: var(--shadow-md);
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

/* ── Collapsed state on tablet ───────────────── */
@media (min-width: 769px) and (max-width: 1100px) {
  .sidebar {
    width: var(--sidebar-collapsed);
  }
  .sidebar-label,
  .sidebar-section-title,
  .sidebar-mood-item .sidebar-label {
    display: none;
  }
  .sidebar-item {
    justify-content: center;
    padding: 10px;
    gap: 0;
  }
  .sidebar-section-title {
    padding: 8px 0;
  }
  .content-area {
    margin-left: var(--sidebar-collapsed);
  }
  .site-footer {
    margin-left: var(--sidebar-collapsed);
  }
}