/* Global Select Options Visibility Fix */

/* Base select styling */
.form-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 0.875rem 1rem !important;
    border-radius: 10px !important;
}

.form-select:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--primary-purple) !important;
    box-shadow: 0 0 0 0.2rem rgba(142, 76, 235, 0.25) !important;
    color: white !important;
}

/* Options styling for different browsers */
.form-select option {
    background: #1a1a2e !important;
    color: white !important;
    padding: 0.75rem !important;
    font-size: 1rem !important;
    border: none !important;
}

.form-select option:hover {
    background: #16213e !important;
    color: white !important;
}

.form-select option:checked {
    background: var(--primary-purple) !important;
    color: white !important;
}

.form-select option:focus {
    background: #16213e !important;
    color: white !important;
}

/* Multiple select specific styling */
.form-select[multiple] {
    min-height: 120px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.form-select[multiple] option {
    background: #1a1a2e !important;
    color: white !important;
    padding: 0.5rem !important;
    margin: 0.25rem 0 !important;
    border-radius: 5px !important;
}

.form-select[multiple] option:checked {
    background: var(--primary-purple) !important;
    color: white !important;
    font-weight: 600 !important;
}

.form-select[multiple] option:hover {
    background: #16213e !important;
    color: white !important;
}

/* Modal specific fixes */
.modal .form-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.modal .form-select option {
    background: #1a1a2e !important;
    color: white !important;
    padding: 0.75rem !important;
}

.modal .form-select:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--primary-purple) !important;
    box-shadow: 0 0 0 0.2rem rgba(142, 76, 235, 0.25) !important;
}

/* Webkit browsers (Chrome, Safari, Edge) specific fixes */
.form-select::-webkit-scrollbar {
    width: 8px;
}

.form-select::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.form-select::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

.form-select::-webkit-scrollbar-thumb:hover {
    background: var(--primary-violet);
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .form-select option {
        background: #1a1a2e !important;
        color: white !important;
        padding: 0.75rem !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-select {
        border: 2px solid white !important;
        background: black !important;
        color: white !important;
    }
    
    .form-select option {
        background: black !important;
        color: white !important;
        border: 1px solid white !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .form-select {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }
    
    .form-select option {
        background: #1a1a2e !important;
        color: white !important;
    }
}
