/* Убираем outline при фокусе */
.select2-dropdown {
    z-index: 1500 !important;
}

.btn.btn-as-link:focus {
    outline: none;
}

/* select2 */
.select2-container ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.select2-container ul {
    list-style: none;
}

.select2-container ul,
.select2-container li {
    padding-left: 0;
    margin: 0;
}

.select2-container li::before {
    content: none;
}

.select2-container--bootstrap4 .select2-results__option--highlighted,
.select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected="true"] {
    color: var(--theme-b-link);
    background-color: #f0f0f0;
}

.select2-container--bootstrap4 .select2-selection__clear {
    margin-right: 1.4em;
}

.select2-container .select2-selection--single .select2-selection__clear {
    background-color: #afafaf;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    line-height: 1.5;
    color: #6c757d;
    font-weight: 400;
    font-size: 1rem;
}

/* Контейнер select2 не должен расширять родителя */
.select2-address__wrap .select2-container,
.select2-address__wrap .select2-container--bootstrap4 {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
}

/* Выпадающий список — в ширину поля */
.select2-address__wrap .select2-container--bootstrap4 .select2-dropdown {
    width: 100% !important;
    max-width: 100% !important;
}

/* Перенос текста в выбранном значении */
.select2-address__wrap .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    white-space: normal !important;
    word-break: break-word !important;
    padding-right: 40px;
}

/* Обёртка выбранного значения — просто даём высоту по контенту */
.select2-address__wrap .select2-container--bootstrap4 .select2-selection--single {
    height: auto !important; /* без display:flex */
    min-height: calc(1.5em + .75rem + 2px);
}

/* Перенос текста в списке опций */
.select2-address__wrap .select2-container--bootstrap4 .select2-results__option {
    white-space: normal !important;
    word-break: break-word !important;
}

/* .row в Bootstrap — flex, поэтому даём колонке возможность ужиматься */
.select2-address__wrap {
    min-width: 0;
}

/* Корневой контейнер попапа */
.popup-window.confirmation-popup {
    max-width: 600px;
    width: 100% !important; /* чтобы ужимался, а не рос бесконечно */
    box-sizing: border-box;
}

/* Контент попапа не должен раздувать контейнер */
.popup-window.confirmation-popup .popup-window-content {
    max-width: 100%;
    overflow-wrap: break-word; /* на всякий случай, если попадётся длинная строка без пробелов */
}

/* Центруем плейсхолдер/значение по высоте поля */
.select2-address__wrap .select2-container--bootstrap4 .select2-selection--single {
    height: auto !important; /* как и было */
    min-height: calc(1.5em + .75rem + 2px);
    padding-top: .375rem;
    padding-bottom: .375rem;
    box-sizing: border-box;
}

/* Сам текст внутри */
.select2-address__wrap .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
}

/* Крестик очистки — по центру по вертикали */
.select2-address__wrap .select2-container--bootstrap4 .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
}
/* end select2 */

.no-address {
    text-decoration: none;
}
