/* Estilos para o dropdown do usuário */
.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  background-color: #ffffff; /* Cor de fundo explícita para modo claro */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease-in-out;
}

body.dark .user-dropdown {
  background-color: #2d2d2d; /* Cor de fundo para modo escuro */
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-content {
  padding: 16px;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.user-dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
}

.user-dropdown-info {
  display: flex;
  flex-direction: column;
}

.user-dropdown-name {
  font-weight: 600;
  font-size: 16px;
  color: #333333; /* Cor de texto explícita para modo claro */
}

body.dark .user-dropdown-name {
  color: #f0f0f0; /* Cor de texto para modo escuro */
}

.user-dropdown-email {
  font-size: 14px;
  color: #666666; /* Cor de texto secundária para modo claro */
}

body.dark .user-dropdown-email {
  color: #b0b0b0; /* Cor de texto secundária para modo escuro */
}

.user-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  border-radius: 6px;
  color: #333333; /* Cor de texto explícita para modo claro */
  text-decoration: none;
  transition: background-color 0.2s;
}

body.dark .user-dropdown-item {
  color: #f0f0f0; /* Cor de texto para modo escuro */
}

.user-dropdown-item:hover {
  background-color: #f5f5f5; /* Cor de fundo hover para modo claro */
}

body.dark .user-dropdown-item:hover {
  background-color: #3d3d3d; /* Cor de fundo hover para modo escuro */
}

.user-dropdown-item svg {
  margin-right: 12px;
  color: #666666; /* Cor de ícone para modo claro */
}

body.dark .user-dropdown-item svg {
  color: #b0b0b0; /* Cor de ícone para modo escuro */
}

.user-dropdown-divider {
  height: 1px;
  background-color: #e0e0e0; /* Cor da linha divisória para modo claro */
  margin: 8px 0;
}

body.dark .user-dropdown-divider {
  background-color: #444444; /* Cor da linha divisória para modo escuro */
}

/* Posicionamento específico para desktop */
@media (min-width: 769px) {
  .user-menu-container {
    position: relative;
  }

  .user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
  }
}

/* Estilos para o modal em dispositivos móveis */
@media (max-width: 768px) {
  .user-dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 320px;
    border-radius: 12px;
    z-index: 1001;
  }

  .user-dropdown.active {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Adicionar um overlay para fechar o dropdown ao clicar fora */
.dropdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: none;
}

.dropdown-overlay.active {
  display: block;
}
