/* Global Select2 + Bootstrap 5 compatibility for Zaika Hub */
.select2-container {
    width: 100% !important;
    max-width: 100%;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 48px;
    border: 1px solid #dbe3ef;
    border-radius: 13px;
    background-color: #fff;
    display: flex;
    align-items: center;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #93c5fd;
    box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .12);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
    padding-left: .85rem;
    padding-right: 2.25rem;
    color: #0f172a;
    font-weight: 500;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
    color: #94a3b8;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    right: .55rem;
}

.select2-container--default .select2-selection--multiple {
    padding: .28rem .45rem;
    align-items: flex-start;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: 0;
    margin: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    border-radius: 999px;
    padding: .24rem .62rem .24rem 1.65rem;
    font-weight: 700;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    border-right: 0;
    color: #4338ca;
    left: .45rem;
    padding-right: .2rem;
}

.select2-dropdown {
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .12);
    z-index: 1080;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    padding: .58rem .75rem;
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 .18rem rgba(37, 99, 235, .10);
}

.select2-results__option {
    padding: .72rem .85rem;
    font-weight: 600;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
}

.select2-container--default .select2-results__option--selected {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    height: 46px;
    margin-right: 1.75rem;
    color: #64748b;
}

.form-select-lg + .select2-container--default .select2-selection--single,
.form-select-lg + .select2-container--default .select2-selection--multiple {
    min-height: 52px;
    border-radius: 16px;
}

.form-select-lg + .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 50px;
    font-size: 1.02rem;
}

.form-select-sm + .select2-container--default .select2-selection--single,
.form-select-sm + .select2-container--default .select2-selection--multiple {
    min-height: 38px;
    border-radius: 10px;
}

.form-select-sm + .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    font-size: .875rem;
}

.was-validated select:invalid + .select2-container--default .select2-selection,
select.is-invalid + .select2-container--default .select2-selection {
    border-color: #dc3545;
}

.was-validated select:valid + .select2-container--default .select2-selection,
select.is-valid + .select2-container--default .select2-selection {
    border-color: #198754;
}
