/* LabMu UI adapter (opt-in) · select2 4.1 in the LabMu look (theme "labmu", set by adapters/select2.js): the box is a
   .field input, the list a .ui-menu. Load after select2.min.css (structure) and labmu-ui.css (tokens). */
.select2-container--labmu { font-size: .875rem; }
.select2-container--labmu .select2-selection--single { height: var(--h-md); border: 1px solid var(--input-line); border-radius: var(--r-input); background: var(--input-bg); color: var(--ink); outline: none; transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast); }
.select2-container--labmu .select2-selection--single .select2-selection__rendered { padding: 0 36px 0 12px; line-height: calc(var(--h-md) - 2px); color: var(--ink); }
.select2-container--labmu .select2-selection__placeholder { color: #8A97AB; }
.select2-container--labmu .select2-selection__arrow { position: absolute; top: 0; right: 12px; bottom: 0; width: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / 16px; transition: transform var(--dur-fast); }
.select2-container--labmu .select2-selection__arrow b { display: none; }
.select2-container--labmu.select2-container--open .select2-selection__arrow { transform: rotate(180deg); }
.select2-container--labmu .select2-selection--single:hover { border-color: var(--input-hover); }
.select2-container--labmu.select2-container--focus .select2-selection--single,
.select2-container--labmu.select2-container--open .select2-selection--single { border-color: var(--primary); background-color: var(--paper); }
.select2-container--labmu .select2-selection--single:focus-visible { box-shadow: 0 0 0 3px var(--primary-light); }
.select2-container--labmu.select2-container--disabled .select2-selection--single { background-color: var(--neutral-light); border-color: var(--line); cursor: not-allowed; }
.select2-container--labmu.select2-container--disabled .select2-selection__rendered { color: #A6B1C2; }
/* the original select marked invalid (labmu-ui.js form[data-check], LabmuUI.fieldError): the box shows it */
select[aria-invalid=true] + .select2-container--labmu .select2-selection--single { border-color: var(--danger); background-color: var(--paper); }
/* inside a skeleton (labmu-ui.css [data-skeleton]) the chosen text and the placeholder go like a native select's: only
   the box shows; data-skeleton-text on the select (its .select2 is the next sibling) or an ancestor keeps them */
[data-skeleton] .select2-container--labmu :is(.select2-selection__rendered, .select2-selection__placeholder):not([data-skeleton-text], [data-skeleton-text] *, [data-skeleton-text] + .select2 *) { -webkit-text-fill-color: transparent; }

/* the list: a .ui-menu a few px under (or over) the box */
.select2-container--labmu .select2-dropdown { border: 1px solid var(--line); border-radius: var(--r-input); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.select2-container--labmu .select2-dropdown--below { margin-top: 4px; }
.select2-container--labmu .select2-dropdown--above { margin-top: -4px; }
.select2-container--labmu .select2-search--dropdown { padding: 8px 8px 0; }
.select2-container--labmu .select2-search--dropdown .select2-search__field { height: 36px; padding: 0 10px; border: 1px solid var(--input-line); border-radius: var(--r-input); background: var(--input-bg); color: var(--ink); font: inherit; outline: none; }
.select2-container--labmu .select2-search--dropdown .select2-search__field:focus { border-color: var(--primary); background: var(--paper); }
.select2-container--labmu .select2-results > .select2-results__options { max-height: 264px; overflow-y: auto; padding: 6px; }
.select2-container--labmu .select2-results__option { padding: 9px 10px; border-radius: 8px; color: var(--ink); }
.select2-container--labmu .select2-results__option--selected { background: var(--primary-light); color: var(--primary-pressed); font-weight: 600; }
.select2-container--labmu .select2-results__option--highlighted.select2-results__option--selectable { background: var(--hover); color: var(--primary); }
.select2-container--labmu .select2-results__option--disabled { color: #A6B1C2; }
.select2-container--labmu .select2-results__message { color: var(--muted); }
/* a select2 opened in a modal dialog hangs its list in the dialog (top layer): let it overflow the dialog's edge */
dialog.modal:has(> .select2-container--open) { overflow: visible; }
