/*@import url('variables_v1.1.css');*/

.select2-dropdown {
    color: var(--light-white);
}

.select2-container {
    min-width: 20em;
    width: 45em!important;
    max-width: 100%;
}

ul li.select2-selection__choice,
ul li.select2-search {
    /* Cancel out django's style */
    list-style-type: none;
}

.errors .select2-selection {
    /* Highlight select box with error */
    border-color: #ba2121;
}

.select2-container--default {
    --select2-highlighted-bg: var(--place-grey)!important;
    --select2-highlighted-fg: var(--light-white)!important;
}

@media (prefers-color-scheme: dark) {
    .select2-container--default {
        --select2-highlighted-bg: var(--place-grey)!important;
        --select2-highlighted-fg: var(--light-white)!important;
    }
}

.select2-container--default .select2-dropdown {
    background-color: var(--light-grey)!important;
    border-color: var(--bor-grey)!important;
    max-width: 100%;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.select2-container--default .select2-selection {
    background-color: var(--light-grey)!important;
    border-color: var(--bor-grey)!important;
    min-height: 40px;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection .select2-selection__rendered {
    color: var(--light-white)!important;
    background-color: var(--light-grey)!important;
    font-size: 16px;
    padding: 8px;
    white-space: normal;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--selected-bg, #ddd);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--light-white)!important;
    border-color: var(--bor-grey)!important;
    color: var(--black)!important;
   width: 100% !important;  /* или любая другая ширина */
    min-width: 200px;       /* например, задать минимальную ширину */
    max-width: none;        /* чтобы ширина не изменялась автоматически */
    min-height: 40px;
    font-size: 16px;
    padding: 10px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--dark-green)!important;
    color: var(--white)!important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--light-grey)!important;
    border-color: var(--bor-grey)!important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    color: var(--light-white)!important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--bor-grey)!important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--light-white);
    background-color: var(--light-grey);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bor-grey);
    border-radius: var(--bs-border-radius);
}

.select2-container--default .select2-selection--single {
    border: none!important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .select2-container {
        width: 100%!important;
        min-width: auto;
    }

    .select2-container--default .select2-selection {
        font-size: 18px;
        min-height: 45px;
        padding: 12px;
    }

    .select2-container--default .select2-dropdown {
        max-height: 250px;
    }

    .select2-container--default .select2-results__option {
        font-size: 18px;
        padding: 12px;
    }
}

/*.select2-container--default .select2-selection--single .select2-selection__placeholder {*/
/*    font-style: italic;*/
/*    font-size: small;*/
/*}*/

