/* Dropdown component (Tailwind-based) */

.dropdown-menu {
  @apply hidden absolute z-50 min-w-[10rem] py-1 mt-2 bg-white border border-gray-200 rounded-md shadow-lg focus:outline-none;
  @apply text-sm; /* sizing */
  list-style: none;
}

.dropdown-menu.show {
  @apply block;
}

.dropdown-menu a,
.dropdown-menu button,
.dropdown-menu .dropdown-item { /* allow semantic elements */
  @apply block w-full text-left px-4 py-2 text-gray-700 hover:bg-gray-50 hover:text-gray-900 cursor-pointer transition-colors;
  text-decoration: none;
}

.dropdown-menu .dropdown-item--danger {
  @apply text-red-600 hover:bg-red-50 hover:text-red-700;
}

/* Right-aligned variant (e.g. for user menu) */
.dropdown-menu.align-right {
  right: 0;
  left: auto;
}

/* Stimulus visibility control */
[data-controller="dropdown"] [data-dropdown-target="menu"].hidden { @apply hidden; }
[data-controller="dropdown"] [data-dropdown-target="menu"]:not(.hidden) { @apply block; }
