/* public/assets/css/s2.css - Select2-specific styling */

/* Wider dropdown for product selector (SKU + name) while keeping cell compact */
.select2-container--bootstrap-5 .s2-prod-dropdown {
  min-width: min(420px, calc(100vw - 2rem)); /* never wider than a phone screen */
}

.select2-container--bootstrap-5 .s2-prod-option-name {
  font-size: .8rem;
  color: inherit; /* same colour as main line, not muted */
}

.select2-container--bootstrap-5 .s2-prod-option-meta {
  font-size: .75rem;
  color: inherit;
}

/* Customer Select2 dropdown width (filters & forms) */
.select2-container--bootstrap-5 .s2-cust-dropdown {
  min-width: min(420px, calc(100vw - 2rem)); /* never wider than a phone screen */
}

.select2-container--bootstrap-5 .s2-cust-option-secondary {
  font-size: .8rem;
  color: inherit;
}

/* Wider visible customer Select2 input (can be reused across pages) */
.s2-cust-input-wide {
  min-width: 260px;
}

/* Brand colour instead of the theme's built-in Bootstrap blue (2.19.4): the box's focus border and
   glow, the open list's border, the search box inside it and the selected option. */
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection,
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus {
  border-color: color-mix(in oklab, var(--brand-primary, #660708), #fff 50%);
  box-shadow: 0 0 0 .25rem rgba(var(--brand-primary-rgb, 102, 7, 8), .25);
}
.select2-container--bootstrap-5 .select2-dropdown {
  border-color: color-mix(in oklab, var(--brand-primary, #660708), #fff 50%);
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true]:not(.select2-results__option--highlighted) {
  color: #fff;
  background-color: var(--brand-primary, #660708);
}