/* ========================================
   COMPONENTE DRAWER MENU LATERAL
   ======================================== */

/* Overlay de fundo */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: calc(var(--z-header) - 1);
}

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

/* Container do drawer */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  z-index: var(--z-header);
  padding-top: var(--header-height);
  overflow-y: auto;
}

.drawer.active {
  transform: translateX(0);
}

/* Cabeçalho do drawer */
.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-base);
  border-bottom: 1px solid var(--border-color);
}

.drawer__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0;
}

.drawer__close-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  cursor: pointer;
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.drawer__close-btn:hover {
  color: var(--accent-yellow);
}

/* Conteúdo do drawer */
.drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-base) 0;
}

/* Seção */
.drawer__section {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.drawer__section:last-of-type {
  border-bottom: none;
}

.drawer__section-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 var(--space-base);
  margin: 0 0 var(--space-sm) 0;
}

/* Lista de menu */
.drawer__menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.drawer__menu-link {
  display: flex;
  align-items: center;
  gap: var(--space-base);
  padding: var(--space-base) var(--space-base);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
}

.drawer__menu-link:hover {
  background-color: rgba(255, 255, 0, 0.1);
  color: var(--accent-yellow);
  border-left-color: var(--accent-yellow);
  padding-left: calc(var(--space-base) - 2px);
}

.drawer__menu-link i {
  font-size: var(--font-size-base);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.drawer__menu-link span {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  word-break: break-word;
}

/* Rodapé do drawer */
.drawer__footer {
  padding: var(--space-base);
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.3);
}

.drawer__version {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.7;
}

/* Responsividade */
@media (max-width: 480px) {
  .drawer {
    width: 100%;
    max-width: 280px;
  }

  .drawer__header {
    padding: var(--space-md) var(--space-sm);
  }

  .drawer__title {
    font-size: var(--font-size-base);
  }

  .drawer__section-title {
    font-size: 9px;
    padding: 0 var(--space-sm);
    letter-spacing: 0.08em;
  }

  .drawer__menu-link {
    padding: var(--space-sm) var(--space-sm);
    gap: var(--space-sm);
  }

  .drawer__menu-link span {
    font-size: 13px;
  }

  .drawer__menu-link i {
    font-size: 14px;
    width: 18px;
  }

  .drawer__section {
    padding: var(--space-sm) 0;
  }
}

/* Remove scrollbar visível */
.drawer::-webkit-scrollbar {
  width: 4px;
}

.drawer::-webkit-scrollbar-track {
  background: transparent;
}

.drawer::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

.drawer::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
