/**
 * Dropdown Menu Z-Index Fix
 * Ensures dropdown menus appear above ALL three-dot toggle buttons and cards
 */

/* ALL cards should have low or no z-index to allow dropdown to appear above */
.competition-card,
.folder-card,
.folder-card .folder-card-inner {
    z-index: auto !important;
}

/* ALL dropdown toggle buttons should have low z-index */
.dropdown-toggle,
.btn-group .dropdown-toggle,
.competition-card .dropdown-toggle,
.folder-card .dropdown-toggle,
.btn.dropdown-toggle,
.btn-circle.dropdown-toggle {
    position: relative;
    z-index: 1 !important;
}

/* Dropdown menus should have ultra-high z-index to appear above EVERYTHING including other cards */
.dropdown-menu {
    z-index: 99999 !important;
    position: absolute !important;
}

/* Ensure dropdown menu appears above ALL card content and toggle buttons */
.card .dropdown-menu,
.competition-card .dropdown-menu,
.folder-card .dropdown-menu {
    z-index: 99999 !important;
}

/* Make sure the dropdown menu shows above its parent and ALL other elements */
.dropdown-menu.show {
    z-index: 99999 !important;
}

/* When a dropdown is open, raise the btn-group but keep it below the menu */
.btn-group {
    position: relative;
    z-index: auto;
}

.btn-group.show {
    z-index: 100000 !important;
}

.btn-group.show .dropdown-menu {
    z-index: 100001 !important;
}

/* Glass background for navbar user dropdown (logout menu) */
.navbar .dropdown-menu {
    background: rgba(30, 30, 30, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
}
