.form-label
{
    color: var(--tblr-muted);
    margin-bottom: 0;
}

.form-control,
.form-select,
select.form-control,
select,
.input-group-text,
.form-check-input
{
    box-shadow: none;
    border: 1px solid var(--tblr-bg-forms);
    background-color: var(--tblr-bg-forms);
}

/* Select2 - align visible "input" with the rest of the form controls */
.select2-container--bootstrap .select2-selection,
.select2-container--default .select2-selection,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple
{
    box-shadow: none !important;
    border: 1px solid var(--tblr-bg-forms) !important;
    background-color: var(--tblr-bg-forms) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--bootstrap.select2-container--focus .select2-selection
{
    border-color: var(--tblr-bg-forms) !important;
    background-color: var(--tblr-bg-forms) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--bootstrap .select2-selection--multiple .select2-selection__choice
{
    background-color: var(--tblr-bg-button);
    color: var(--tblr-text-button);
    border-color: var(--tblr-border-color);
}

.select2-container--default .select2-search--inline .select2-search__field,
.select2-container--bootstrap .select2-search--inline .select2-search__field
{
    background-color: transparent !important;
}

/*
-----
Modification Cursor Agent
-----
Full-width Select2 search when open or empty; restore compact layout when closed with tags.
-----
##AGENT_CODE
*/
.select2-container--open.select2-container--default .select2-selection--multiple .select2-search--inline,
.select2-container--open.select2-container--bootstrap .select2-selection--multiple .select2-search--inline,
.select2-container--default .select2-selection--multiple .select2-selection__rendered:not(:has(.select2-selection__choice)) .select2-search--inline,
.select2-container--bootstrap .select2-selection--multiple .select2-selection__rendered:not(:has(.select2-selection__choice)) .select2-search--inline
{
    float: none;
    width: 100%;
}

.select2-container--open.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field,
.select2-container--open.select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field,
.select2-container--default .select2-selection--multiple .select2-selection__rendered:not(:has(.select2-selection__choice)) .select2-search--inline .select2-search__field,
.select2-container--bootstrap .select2-selection--multiple .select2-selection__rendered:not(:has(.select2-selection__choice)) .select2-search--inline .select2-search__field
{
    width: 100% !important;
}

/* Closed with selections: let Select2 keep tags visible (do not force full-width search) */
.select2-container:not(.select2-container--open).select2-container--default .select2-selection--multiple .select2-selection__rendered:has(.select2-selection__choice) .select2-search--inline,
.select2-container:not(.select2-container--open).select2-container--bootstrap .select2-selection--multiple .select2-selection__rendered:has(.select2-selection__choice) .select2-search--inline
{
    float: left;
    width: auto;
}

.select2-container:not(.select2-container--open).select2-container--default .select2-selection--multiple .select2-selection__rendered:has(.select2-selection__choice) .select2-search--inline .select2-search__field,
.select2-container:not(.select2-container--open).select2-container--bootstrap .select2-selection--multiple .select2-selection__rendered:has(.select2-selection__choice) .select2-search--inline .select2-search__field
{
    width: 0.75em !important;
    min-width: 0;
}
/*
##AGENT_CODE
*/

/* Select2 dropdown panel (opens when clicking the field) */
.select2-container--default .select2-dropdown,
.select2-container--bootstrap .select2-dropdown,
.select2-dropdown
{
    background-color: var(--tblr-bg-forms) !important;
    border: 1px solid var(--tblr-bg-forms) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
.select2-container--default .select2-results__option,
.select2-container--bootstrap .select2-results__option
{
    background-color: var(--tblr-bg-forms) !important;
    color: var(--tblr-body-color) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--bootstrap .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap .select2-results__option--highlighted.select2-results__option--selectable
{
    background-color: var(--tblr-highlight-color) !important;
    color: var(--tblr-over-highlight-color) !important;
}

.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--bootstrap .select2-results__option[aria-selected=true]
{
    background-color: var(--tblr-bg-button) !important;
    color: var(--tblr-text-button) !important;
}