.select2-container {
    --s2-accent: var(--primary, #0d6efd);
    --s2-ink: #20324b;
    --s2-muted: #596b82;
    --s2-border: #d7e0ea;
    --s2-height: 36px;
    font-family: inherit;
}

span.select2.select2-container { width: 100% !important; }
.select-0 { width: 0; height: 0; padding: 0; border: 0; }
.select-on-mobile .select2-container { --s2-height: 30px; }
.tr-filter .select2-container { --s2-height: 32px; z-index: 1; }
.app-pagination .select2-container { --s2-height: 31px; }
.tr-filter .mb-2 { margin-bottom: 0 !important; }

.select2-container--default .select2-selection {
    position: relative;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--s2-border);
    border-radius: 9px;
    background: #fff;
    color: var(--s2-ink);
}
.select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    height: var(--s2-height);
    min-height: 0;
    padding: 0;
    font-size: 14px;
    cursor: pointer;
}
.select2-container--default:not(.select2-container--disabled) .select2-selection:hover { border-color: #a7b7ca; }
.select2-container--default.select2-container--open .select2-selection:is(.select2-selection--single, .select2-selection--multiple),
.select2-container--default.select2-container--focus .select2-selection,
.select2-container--default .select2-selection:focus-visible {
    border-color: var(--s2-accent);
    border-radius: 9px;
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--s2-accent) 13%, transparent);
}
.select2-container--default.select2-container--disabled .select2-selection {
    background: #f3f6fa;
    color: var(--s2-muted);
    cursor: not-allowed;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding: 0 28px 0 10px;
    color: inherit;
    line-height: 1.4;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--s2-muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow {
    inset: 0 4px 0 auto;
    display: grid;
    width: 22px;
    height: auto;
    place-items: center;
    color: var(--s2-muted);
}
.select2-selection__arrow b { display: none; }
.select2-selection__arrow::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.select2-container--open .select2-selection__arrow::after { margin-top: 3px; transform: rotate(225deg); }
.select2-container--default .select2-selection--single.select2-selection--clearable .select2-selection__rendered { padding-right: 51px; }
.select2-container--default .select2-selection .select2-selection__clear {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    float: none;
    width: 20px;
    min-width: 0;
    height: 20px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--s2-muted);
    font-size: 17px;
    line-height: 1;
}
.select2-container--default .select2-selection--single .select2-selection__clear { top: 50%; right: 27px; transform: translateY(-50%); }
.select2-container--default .select2-selection--multiple .select2-selection__clear { top: 7px; right: 7px; }
.select2-container--default .select2-selection .select2-selection__clear:hover { background: #e9eff6; }

.select2-container--default .select2-selection--multiple { display: block; min-height: 36px; height: auto; padding: 3px 7px 3px 3px; }
.select2-container--default .select2-selection--multiple.select2-selection--clearable { padding-right: 28px; }
.select2-container--default .select2-selection--multiple .select2-selection__rendered { margin: 0; padding: 0; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    max-width: calc(100% - 4px);
    margin: 2px 4px 2px 0;
    border: 1px solid var(--s2-border);
    border-radius: 6px;
    background: color-mix(in srgb, var(--s2-accent) 8%, #fff);
    color: var(--s2-ink);
    font-size: 13px;
    line-height: 24px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    width: 21px;
    min-width: 0;
    height: 100%;
    min-height: 0;
    padding: 0;
    border-right: 1px solid var(--s2-border);
    color: var(--s2-muted);
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { color: var(--s2-ink); }
.select2-container--default .select2-selection--multiple .select2-selection__choice__display { padding: 0 7px; }
.select2-container--default .select2-search--inline .select2-search__field {
    max-width: calc(100% - 4px);
    height: 24px;
    margin: 2px 0 0 4px;
    font: inherit;
    line-height: 24px;
}

.select2-container--open .select2-dropdown {
    overflow: hidden;
    border: 1px solid var(--s2-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgb(32 50 75 / 15%);
}
.select2-container--open .select2-dropdown--below { transform: translateY(4px); }
.select2-container--open .select2-dropdown--above { transform: translateY(-4px); }
.select2-search--dropdown {
    position: relative;
    padding: 7px;
    border-bottom: 1px solid #e3e9f0;
    background: #f7f9fc;
}
.select2-search--dropdown::before,
.select2-search--dropdown::after { content: ''; position: absolute; color: var(--s2-muted); pointer-events: none; }
.select2-search--dropdown::before { top: 18px; left: 17px; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; }
.select2-search--dropdown::after { top: 27px; left: 24px; width: 5px; height: 1.5px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 36px;
    min-width: 0;
    padding: 0 8px 0 28px;
    border: 1px solid var(--s2-border);
    border-radius: 7px;
    background: #fff;
    color: var(--s2-ink);
    font-size: 14px;
}
.select2-search__field::placeholder { color: var(--s2-muted); text-overflow: ellipsis; }
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--s2-accent); outline: none; }

.select2-container--default .select2-results > .select2-results__options {
    max-height: min(232px, 35dvh);
    padding: 5px;
    overscroll-behavior: contain;
}
.select2-container--default .select2-results__option {
    position: relative;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--s2-ink);
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.select2-container--default .select2-results__option[aria-disabled=true],
.select2-container--default .select2-results__message,
.select2-container--default .loading-results { color: var(--s2-muted); }
.select2-container--default .select2-results__message,
.select2-container--default .loading-results { font-size: 12px; }
.select2-container--default .select2-results__option--selected { padding-right: 28px; background: #edf2f8; font-weight: 600; }
.select2-container--default .select2-results__option--selected::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 6px;
    height: 10px;
    border: solid var(--s2-accent);
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-60%) rotate(45deg);
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: color-mix(in srgb, var(--s2-accent) 9%, #fff);
    color: var(--s2-ink);
    box-shadow: inset 2px 0 var(--s2-accent);
}

@media (max-width: 575.98px) {
    .select2-container--default .select2-search--dropdown .select2-search__field,
    .select2-container--default .select2-search--inline .select2-search__field { font-size: 16px; }
}
