/* Global Dropdown Styling Fixes */

/* Ensure all select elements have consistent dark styling */
select,
.form-select,
.form-control select,
select.form-control {
    background-color: #212529 !important;
    color: #ffffff !important;
    border: 1px solid #495057 !important;
    border-radius: 0.375rem;
}

/* Select option styling */
select option,
.form-select option {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Focus states for selects */
select:focus,
.form-select:focus {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #00bf63 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 191, 99, 0.25) !important;
}

/* Bootstrap dropdown menu styling */
.dropdown-menu {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
}

.dropdown-item {
    color: #ffffff !important;
    background-color: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Select2 plugin styling (if used) */
.select2-container--default .select2-selection--single {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
    color: #ffffff !important;
}

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

.select2-dropdown {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
}

.select2-results__option {
    background-color: #212529 !important;
    color: #ffffff !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Chosen plugin styling (if used) */
.chosen-container-single .chosen-single {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
    color: #ffffff !important;
}

.chosen-container .chosen-drop {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
}

.chosen-container .chosen-results li {
    color: #ffffff !important;
}

.chosen-container .chosen-results li.highlighted {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Input group addon styling */
.input-group-text {
    background-color: #495057 !important;
    border-color: #495057 !important;
    color: #ffffff !important;
}

/* Specific fixes for search forms */
.search-form select,
.filter-form select,
.program-filters select,
.university-filters select {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Portal specific dropdown fixes */
.portal-filters .form-select,
.portal-search .form-select {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Geography dropdown fixes */
.geography-select,
#country-select,
#region-select,
#city-select {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Advanced search dropdown fixes */
.advanced-search select,
.search-filters select {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Program portal specific fixes */
.degree-filter,
.country-filter,
.continent-filter,
.city-filter {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Ensure text inputs also follow dark theme */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
.form-control {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
.form-control:focus {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #00bf63 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 191, 99, 0.25) !important;
}

/* Placeholder text styling */
::placeholder {
    color: #adb5bd !important;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #adb5bd !important;
}

::-ms-input-placeholder {
    color: #adb5bd !important;
}

/* Datalist styling */
datalist {
    background-color: #212529 !important;
}

datalist option {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Custom select arrow for better visibility */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
}

/* Multiple select styling */
select[multiple] {
    height: auto !important;
    min-height: 120px;
}

select[multiple] option:checked {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Range input styling */
input[type="range"] {
    background-color: #495057 !important;
}

input[type="range"]::-webkit-slider-thumb {
    background-color: #00bf63 !important;
}

input[type="range"]::-moz-range-thumb {
    background-color: #00bf63 !important;
    border: none;
}

/* Checkbox and radio styling */
.form-check-input {
    background-color: #212529 !important;
    border-color: #495057 !important;
}

.form-check-input:checked {
    background-color: #00bf63 !important;
    border-color: #00bf63 !important;
}

.form-check-input:focus {
    border-color: #00bf63 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 191, 99, 0.25) !important;
}