/* --- Dropdown Component - Minimal Style --- */
.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 8px; /* Extend hover area downward */
  margin-bottom: -8px; /* Compensate for padding */
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  z-index: var(--x0ne-z-dropdown);
  padding: 6px;
  padding-top: 10px; /* Visual spacing from trigger */
  border-radius: 6px;
  border: 1px solid rgba(74, 144, 217, 0.15);
  background: rgba(10, 10, 11, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: dropdownFade 0.15s ease-out;
}

/* Invisible bridge to maintain hover between trigger and menu */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

/* Hover-activated dropdowns (default, NOT in tables) */
.dropdown:not(.table-dropdown):hover .dropdown-menu {
  display: block;
}

/* Click-activated variant for tables */
.dropdown.table-dropdown.active .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-transform: lowercase;
}

.dropdown-menu a:hover {
  background: rgba(74, 144, 217, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

/* No separators - cleaner look */
.dropdown-menu a + a {
  margin-top: 2px;
}

.dropdown-arrow,
.menu-arrow {
  font-size: 0.6em;
  opacity: 0.5;
  transition: all 0.2s ease;
}

/* Arrow rotation */
.dropdown:not(.table-dropdown):hover .dropdown-arrow,
.dropdown:not(.table-dropdown):hover .menu-arrow {
  transform: rotate(180deg);
  opacity: 0.8;
}

.dropdown.table-dropdown.active .dropdown-arrow,
.dropdown.table-dropdown.active .menu-arrow {
  transform: rotate(180deg);
  opacity: 0.8;
}

/* Focus styles */
.dropdown-menu a:focus-visible {
  outline: 1px solid rgba(74, 144, 217, 0.4);
  outline-offset: 1px;
}

@keyframes dropdownFade {
  from { 
    opacity: 0; 
    transform: translateY(-4px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}
