/**
 * Global Dropdown Styling Fix
 * Ensures proper contrast for all dropdown menus and select elements
 */

/* Fix Bootstrap dropdown menus */
.dropdown-menu {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
}

.dropdown-item {
    color: #e0e0e0 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: rgba(0, 212, 255, 0.2) !important;
    color: #00d4ff !important;
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fix form select elements */
.form-select {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e0e0e0 !important;
    background-image: none !important;
}

.form-select:focus {
    background-color: #222 !important;
    border-color: #00d4ff !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 212, 255, 0.25) !important;
}

.form-select option {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.form-select option:hover,
.form-select option:checked {
    background-color: #00d4ff !important;
    color: #000 !important;
}

/* Fix select2 dropdowns if used */
.select2-container--default .select2-selection--single {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e0e0e0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e0e0e0 !important;
}

.select2-dropdown {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
}

.select2-container--default .select2-results__option {
    color: #e0e0e0 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
}

/* Fix Bootstrap dark theme overrides */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1a1a1a !important;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
}

[data-bs-theme="dark"] .form-select {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Specific fixes for AI analysis page */
#content_type,
#content_id,
#analysis_type,
#custom_analysis_type {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Fix for disabled select elements */
.form-select:disabled {
    background-color: #0f0f0f !important;
    color: #666 !important;
    opacity: 0.8;
}

/* Additional navbar dropdown fixes */
.navbar .dropdown-menu {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
}

.navbar .dropdown-item {
    color: #e0e0e0 !important;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
}

/* Fix input group dropdowns */
.input-group .dropdown-menu {
    background-color: #1a1a1a !important;
}

.input-group .dropdown-item {
    color: #e0e0e0 !important;
}

/* Fix modal dropdowns */
.modal .dropdown-menu,
.modal .form-select {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Admin panel specific fixes */
.admin-panel .form-select,
.admin-panel .dropdown-menu {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}