/**
 * Drawer Component Styles
 * Mobile drawer for additional navigation items
 */

/* ═══════════════════════════════════════════════════════════════════
   DRAWER OVERLAY
   ═══════════════════════════════════════════════════════════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-backdrop);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.drawer-overlay[hidden] {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   DRAWER
   ═══════════════════════════════════════════════════════════════════ */
.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: var(--dash-card);
  border-top-left-radius: var(--radius-2xl);
  border-top-right-radius: var(--radius-2xl);
  z-index: var(--z-modal);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.drawer.open {
  transform: translateY(0);
}

.drawer[hidden] {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   DRAWER HEADER
   ═══════════════════════════════════════════════════════════════════ */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--dash-border);
  flex-shrink: 0;
}

.drawer-header::before {
  content: '';
  position: absolute;
  top: var(--space-2);
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background: var(--dash-border);
  border-radius: var(--radius-full);
}

.drawer-header h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin: 0;
}

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.drawer-close:hover {
  background: var(--dash-surface);
  color: var(--color-text);
}

.drawer-close svg {
  width: 20px;
  height: 20px;
}

/* ═══════════════════════════════════════════════════════════════════
   DRAWER BODY
   ═══════════════════════════════════════════════════════════════════ */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-2);
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 52px;
}

.drawer-item:hover,
.drawer-item:focus {
  background: var(--dash-surface);
}

.drawer-item:active {
  background: var(--color-primary-light);
}

.drawer-item svg {
  width: 22px;
  height: 22px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.drawer-item:hover svg {
  color: var(--color-primary);
}

.drawer-divider {
  height: 1px;
  background: var(--dash-border);
  margin: var(--space-3) var(--space-4);
}

.drawer-logout {
  color: var(--color-danger);
}

.drawer-logout svg {
  color: var(--color-danger);
}

.drawer-logout:hover {
  background: var(--color-danger-light);
}

/* Only show drawer on mobile/tablet */
@media (min-width: 1025px) {
  .drawer,
  .drawer-overlay {
    display: none !important;
  }
}

