/* One select system for filters, forms and blue presentation surfaces. */
.ui-select,
.ui-select-popover {
  --select-bg: #fff;
  --select-ink: #304b68;
  --select-muted: #60768e;
  --select-border: #c5d3e2;
  --select-hover-border: #7298be;
  --select-hover: #f0f5fb;
  --select-active: #e5effb;
  --select-selected: #edf4fc;
  --select-accent: #285fa4;
  --select-focus: #3677bf;
  --select-separator: #e0e9f3;
  --select-shadow: 0 12px 32px #19395524, 0 3px 8px #1939550f;
  color: var(--select-ink);
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
[data-select-theme="dark"] {
  --select-bg: #294b6b;
  --select-ink: #f0f6ff;
  --select-muted: #c1d6eb;
  --select-border: #7895b2;
  --select-hover-border: #c2d8ee;
  --select-hover: #365c7e;
  --select-active: #426b90;
  --select-selected: #355d7e;
  --select-accent: #acf0d6;
  --select-focus: #c4e7ff;
  --select-separator: #56748f;
  --select-shadow: 0 14px 36px #0a203e4d, 0 3px 10px #0a203e29;
  color-scheme: dark;
}
.ui-select {
  display: inline-flex;
  position: relative;
  vertical-align: middle;
  width: 180px;
  max-width: 100%;
  min-width: 0;
  flex-shrink: 1;
}
.ui-select > select[hidden] { display: none !important; }
.ui-select .ui-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--select-border);
  border-radius: 6px;
  background: var(--select-bg);
  color: var(--select-ink);
  font: inherit;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.ui-select .ui-select-trigger:hover:not(:disabled) { border-color: var(--select-hover-border); background: var(--select-hover); }
.ui-select.is-open .ui-select-trigger { border-color: var(--select-hover-border); background: var(--select-hover); }
.ui-select .ui-select-trigger:focus-visible { outline: 2px solid var(--select-focus); outline-offset: 3px; }
.ui-select .ui-select-trigger[aria-invalid="true"] { border-color: #bc493c; }
.ui-select .ui-select-trigger:disabled { opacity: .55; cursor: not-allowed; }
.ui-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-select-chevron { display: flex; flex: 0 0 16px; color: var(--select-muted); transition: transform 140ms ease; }
.ui-select.is-open .ui-select-chevron { transform: rotate(180deg); }
.ui-select svg,
.ui-select-popover svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ui-select-popover {
  position: fixed;
  z-index: 120;
  display: flex;
  flex-direction: column;
  padding: 5px;
  margin: 0;
  border: 1px solid var(--select-border);
  border-radius: 9px;
  background: var(--select-bg);
  box-shadow: var(--select-shadow);
  overflow: hidden;
  text-align: left;
}
.ui-select-options { overflow: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--select-border) transparent; scroll-padding: 4px; }
.ui-select-options::-webkit-scrollbar { width: 6px; }
.ui-select-options::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--select-border); }
.ui-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding: 9px 10px;
  margin: 2px 0;
  border-radius: 5px;
  color: var(--select-ink);
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.ui-select-option[aria-selected="true"] { background: var(--select-selected); color: var(--select-accent); font-weight: 600; }
.ui-select-option.is-active { background: var(--select-active); }
.ui-select-option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.ui-select-check { display: flex; flex: 0 0 18px; visibility: hidden; color: var(--select-accent); }
.ui-select-option[aria-selected="true"] .ui-select-check { visibility: visible; }
.ui-select-search { display: flex; gap: 8px; align-items: center; flex-shrink: 0; margin: 0 4px 5px; padding: 5px 3px 9px; border-bottom: 1px solid var(--select-separator); color: var(--select-muted); }
.ui-select-search > svg { flex-shrink: 0; }
.ui-select-popover .ui-select-search input {
  width: 100%; min-width: 0; height: 32px; margin: 0; padding: 4px 3px;
  background: transparent; border: 0; border-radius: 3px; outline: none;
  color: var(--select-ink); caret-color: var(--select-accent); font: inherit; line-height: 24px;
}
.ui-select-popover .ui-select-search input::placeholder { color: var(--select-muted); opacity: 1; }
.ui-select-popover .ui-select-search input:focus-visible { outline: 2px solid var(--select-focus); outline-offset: 0; }
.ui-select-popover .ui-select-search input::-webkit-search-cancel-button { cursor: pointer; }
.ui-select-empty { padding: 22px 12px; color: var(--select-muted); font-size: 12px; line-height: 1.7; text-align: center; }
.ui-select-empty[hidden] { display: none; }
.ui-select-group { padding: 10px 10px 5px; color: var(--select-muted); font-size: 11px; }
.ui-select-popover ::selection { background: var(--select-active); color: var(--select-ink); }
.heading-actions > .ui-select,
.hero-toolbar > .ui-select { width: 208px; }
.filterbar > .ui-select { width: 142px; }
.category-filter > .ui-select { width: 190px; }
.form-field > .ui-select { display: flex; width: 100%; margin: 0; }
.form-field .ui-select-trigger { min-height: 42px; }
.mobile-region-toolbar .ui-select { width: 172px; }
.mobile-region-toolbar .ui-select-trigger { min-height: 34px; padding: 6px 10px; }
@media (max-width: 760px) {
  .hero-toolbar > .ui-select { flex: 1; width: 180px; }
  .ui-select .ui-select-trigger { min-height: 40px; }
  .ui-select-option { min-height: 44px; }
}
@media (max-width: 430px) {
  .mobile-region-toolbar .ui-select { width: 160px; }
  .heading-actions > .ui-select { width: 190px; }
  .ui-select-popover .ui-select-search input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ui-select .ui-select-trigger, .ui-select-chevron { transition: none; }
}
@media print { .ui-select-popover { display: none; } }
