/* Theme bridge for Select2 widgets in Django admin light/dark modes. */
.select2-container {
    max-width: 100%;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: var(--body-bg, #fff) !important;
    border-color: var(--border-color, #ccc) !important;
    color: var(--body-fg, #333) !important;
}

.select2-container--default .select2-selection--single {
    min-height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--body-fg, #333) !important;
    line-height: 34px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: var(--body-quiet-color, #666) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--darkened-bg, #f8f8f8) !important;
    border-color: var(--border-color, #ccc) !important;
    color: var(--body-fg, #333) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--body-quiet-color, #666) !important;
}

.select2-dropdown {
    background: var(--body-bg, #fff) !important;
    border-color: var(--border-color, #ccc) !important;
    color: var(--body-fg, #333) !important;
}

.select2-search--dropdown {
    background: var(--body-bg, #fff) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--darkened-bg, #fff) !important;
    border-color: var(--border-color, #ccc) !important;
    color: var(--body-fg, #333) !important;
}

.select2-results {
    background: var(--body-bg, #fff) !important;
}

.select2-container--default .select2-results__option {
    background: var(--body-bg, #fff) !important;
    color: var(--body-fg, #333) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: var(--selected-bg, #e4e4e4) !important;
    color: var(--body-fg, #333) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--primary, #79aec8) !important;
    color: var(--primary-fg, #fff) !important;
}

.select2-container--default .select2-results__option[aria-disabled=true] {
    color: var(--body-quiet-color, #666) !important;
}
