/* Shared front controls use the active Pluna/Mercargo theme palette. */
html[data-bs-theme] {
  --oe-control-bg:var(--portal-input-bg-current,var(--bs-body-bg,#fff));
  --oe-control-text:var(--portal-input-text-current,var(--bs-body-color,#263441));
  --oe-control-muted:var(--portal-muted-current,var(--bs-secondary-color,#596675));
  --oe-control-border:var(--portal-border-current,var(--bs-border-color,#b6c1cc));
  --oe-control-chip:color-mix(in srgb,var(--oe-control-text) 12%,var(--oe-control-bg));
}
html[data-bs-theme=dark] { color-scheme:dark; }
html[data-bs-theme=light] { color-scheme:light; }
html[data-bs-theme] .select2-container { max-width:100%; min-width:0; }
html[data-bs-theme] .select2-container .select2-selection__choice,
html[data-bs-theme] .ts-control > .item { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
html[data-bs-theme] .select2-search--inline { max-width:100%; }
html[data-bs-theme] .select2-container :is(.select2-selection--multiple,.select2-selection--single),
html[data-bs-theme] .select2-dropdown,
html[data-bs-theme] :is(.ts-control,.ts-dropdown) {
  background:var(--oe-control-bg)!important; color:var(--oe-control-text)!important;
  border-color:var(--oe-control-border)!important;
}
html[data-bs-theme] .select2-container :is(.select2-selection__choice,.select2-selection__choice__display),
html[data-bs-theme] .ts-control > .item {
  background:var(--oe-control-chip)!important; color:var(--oe-control-text)!important;
  border-color:var(--oe-control-border)!important;
}
html[data-bs-theme] .select2-container .select2-selection__rendered { color:var(--oe-control-text)!important; }
html[data-bs-theme] .select2-container :is(.select2-selection__choice__remove,.select2-selection__clear),
html[data-bs-theme] .ts-control .item .remove {
  color:var(--oe-control-text)!important; background:transparent!important; opacity:1;
  border-color:var(--oe-control-border)!important;
}
html[data-bs-theme] .select2-container :is(.select2-selection__placeholder,.select2-results__message) { color:var(--oe-control-muted)!important; }
html[data-bs-theme] :is(.select2-container .select2-search__field,.ts-control input) {
  color:var(--oe-control-text)!important; background:var(--oe-control-bg)!important;
  caret-color:var(--oe-control-text); border-color:var(--oe-control-border)!important;
}
html[data-bs-theme] .select2-search--inline .select2-search__field { background:transparent!important; }
html[data-bs-theme] :is(.select2-search__field,.ts-control input)::placeholder { color:var(--oe-control-muted)!important; opacity:1; }
html[data-bs-theme] :is(.select2-results__option,.ts-dropdown .option) { color:var(--oe-control-text)!important; }
html[data-bs-theme] :is(.select2-results__option[aria-selected=true],.select2-results__option--selected,.ts-dropdown .selected) {
  color:var(--oe-control-text)!important; background:var(--oe-control-chip)!important;
}
html[data-bs-theme] :is(.select2-results__option--highlighted,.ts-dropdown .option.active) { background:#205c88!important; color:#fff!important; }
html[data-bs-theme] .select2-container :is(.select2-results__option[aria-disabled=true],.select2-results__option--disabled) { color:var(--oe-control-muted)!important; }
html[data-bs-theme] .select2-container--default .select2-selection__arrow b { border-top-color:var(--oe-control-muted)!important; }
html[data-bs-theme] .select2-container--open .select2-selection__arrow b { border-bottom-color:var(--oe-control-muted)!important; }
html[data-bs-theme=dark] :is(.form-control,.form-select)::placeholder { color:var(--oe-control-muted)!important; opacity:1; }
html[data-bs-theme=dark] .select2-container--disabled .select2-selection { background:var(--oe-control-chip)!important; color:var(--oe-control-muted)!important; }
