/* ================================================================
   MenuDropdown Component Styles
   ================================================================
   Complete self-contained styles for the MenuDropdown component
   ================================================================ */

/* Menu Wrapper */
.menu-wrapper {
  position: relative;
  margin-right: 1rem;
}

/* Menu Toggle Button */
.menu-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.menu-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

.menu-toggle:hover::before {
  opacity: 1;
}

.menu-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-toggle:active {
  transform: scale(0.95);
}

.menu-toggle .material-symbols-outlined {
  position: relative;
  z-index: 1;
}

/* Menu Dropdown */
#menuDropdown {
  display: none !important;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 9999;
  background: linear-gradient(135deg, #1a1d2e 0%, #16192a 100%);
  color: #e6e9f2;
  min-width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(255, 255, 255, 0.1) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

#menuDropdown.open {
  display: flex !important;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Menu Dropdown Buttons */
#menuDropdown button {
  all: unset;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #e6e9f2;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  box-sizing: border-box;
}

#menuDropdown button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(101, 75, 222, 0.15),
    rgba(131, 111, 255, 0.15)
  );
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 12px;
}

#menuDropdown button:hover {
  background: rgba(101, 75, 222, 0.2);
  color: #ffffff;
  padding-left: 1.15rem;
  box-shadow: 0 4px 12px rgba(101, 75, 222, 0.2);
}

#menuDropdown button:hover::before {
  opacity: 1;
}

#menuDropdown button:active {
  transform: scale(0.98);
}

#menuDropdown button .material-symbols-outlined {
  font-size: 22px;
  transition: transform 0.2s;
}

#menuDropdown button:hover .material-symbols-outlined {
  transform: scale(1.1);
}

/* Separator between menu items */
#menuDropdown button:not(:last-child) {
  margin-bottom: 0.25rem;
}

#menuDropdown button + button {
  position: relative;
}

/* Subtle divider after first button */
#menuDropdown button:first-child::after {
  content: "";
  position: absolute;
  bottom: -0.125rem;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
}

/* Menu Divider */
.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

/* ================================================================
   DARK MODE
   ================================================================ */

body.dark-mode #menuDropdown {
  background: linear-gradient(135deg, #0f1419 0%, #0a0d11 100%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 1px rgba(255, 255, 255, 0.05) inset;
}

body.dark-mode #menuDropdown button {
  color: #e2e8f0;
}

body.dark-mode #menuDropdown button::before {
  background: linear-gradient(
    135deg,
    rgba(131, 111, 255, 0.2),
    rgba(101, 75, 222, 0.2)
  );
}

body.dark-mode #menuDropdown button:hover {
  background: rgba(131, 111, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(131, 111, 255, 0.3);
}

body.dark-mode .menu-toggle {
  color: #e2e8f0;
}

body.dark-mode .menu-toggle::before {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .menu-toggle:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* ================================================================
   SPECIAL BUTTON STYLES
   ================================================================ */

/* Danger buttons (e.g., logout) */
#menuDropdown button.danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

#menuDropdown button.danger:hover {
  background: #fee2e2;
}

body.dark-mode #menuDropdown button.danger {
  background: rgba(185, 28, 28, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(185, 28, 28, 0.3);
}

body.dark-mode #menuDropdown button.danger:hover {
  background: rgba(185, 28, 28, 0.3);
  color: #fecaca;
}
