/* Fix unreadable form controls in dark Jazzmin theme */

select,
select option,
.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
textarea,
.vTextField,
.vIntegerField,
.vURLField {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

select:focus,
.form-control:focus,
input[type="text"]:focus,
input[type="search"]:focus,
textarea:focus {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
    border-color: #6c757d !important;
    box-shadow: 0 0 0 0.2rem rgba(55, 90, 127, 0.25) !important;
}

select option {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
}

select option:checked,
select option:hover {
    background-color: #375a7f !important;
    color: #fff !important;
}

/* Action bar select + filter selects */
#changelist .actions select,
#changelist-filter select,
#toolbar #searchbar,
.changelist-filter-clear a {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

/* Django Select2 / autocomplete widgets */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

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

.select2-dropdown {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

.select2-results__option {
    color: #dee2e6 !important;
}

.select2-results__option--highlighted {
    background-color: #375a7f !important;
    color: #fff !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: #343a40 !important;
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

/* Date hierarchy links */
.xfull a, .xfull select {
    color: #dee2e6 !important;
}

/* Action checkboxes area */
#changelist .actions label,
#changelist .actions span {
    color: #dee2e6 !important;
}

/* Filter sidebar */
#changelist-filter h2,
#changelist-filter h3 {
    color: #dee2e6 !important;
}

#changelist-filter li a {
    color: #adb5bd !important;
}

#changelist-filter li.selected a {
    color: #fff !important;
    font-weight: 600;
}

/* Pagination */
.paginator a, .paginator span {
    color: #dee2e6 !important;
}

/* Make sure action dropdown text visible */
#action-toggle + label,
.action-select {
    color: #dee2e6 !important;
}

/* AdminLTE / Jazzmin specific overrides */
.content-wrapper select,
.content-wrapper input,
.content-wrapper textarea {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
    border-color: #495057 !important;
}
