.select2-container--bootstrap-5 {
    min-width: 0;
}

select.form-select-sm + .select2-container--bootstrap-5 .select2-selection--single {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-size: 0.875rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    max-height: 6.25rem;
    overflow-y: auto;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
    padding: 0.15rem 0.45rem !important;
    line-height: 1.2;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    margin: 0;
    padding: 0.15rem 0.45rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__placeholder,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__choice__display {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    color: #fff !important;
    background-color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"],
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__choice {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-secondary-bg) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__choice__remove {
    color: var(--bs-secondary-color) !important;
}

.input-group > .select2-container--bootstrap-5,
.quick-customer-group > .select2-container--bootstrap-5 {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}

.select2-hidden-accessible.is-invalid + .select2-container--bootstrap-5 .select2-selection {
    border-color: var(--bs-form-invalid-border-color);
}

.select2-hidden-accessible.is-valid + .select2-container--bootstrap-5 .select2-selection {
    border-color: var(--bs-form-valid-border-color);
}
.select2-container .select2-selection--multiple .select2-search--inline .select2-search__field {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
}
