/* Shared control chrome for native, searchable and multiple-choice dropdowns.
   The chevron uses the same geometry as core/icon.html. Listboxes keep their
   native scrolling/selection behavior and therefore have no dropdown arrow. */
:root {
  --dropdown-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
body :is(select:not([multiple]):not([size]), select:not([multiple])[size="1"], .search-choice > input):not(.choice-native) {
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--dropdown-chevron);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
  padding-inline: var(--space-2) 36px;
  border: 1px solid var(--dropdown-border, var(--color-border));
  border-radius:var(--radius-control);
  background-color: var(--dropdown-background, var(--color-surface));
  color: var(--dropdown-text, var(--color-text));
  min-width: 0;
  max-width: 100%;
}
body select:not([multiple]):not([size]), body select:not([multiple])[size="1"] {
  cursor: var(--dropdown-cursor, pointer);
}
body select:hover:not(:disabled), body .search-choice > input:hover:not(:disabled) {
  --dropdown-border: var(--color-muted);
}
body select:focus-visible, body .search-choice > input:focus-visible {
  --dropdown-border: var(--color-focus);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
body select:disabled, body .search-choice > input:disabled {
  --dropdown-background: var(--color-surface-subtle);
  --dropdown-text: var(--color-muted);
  --dropdown-cursor: not-allowed;
  cursor: not-allowed;
  opacity: 1;
}
/* Native and searchable selected values remain available in full on hover;
   opened option lists wrap long labels independently of the control width. */
body .choice-chip { max-width: 100%; overflow-wrap: anywhere; }
@media (forced-colors: active) {
  body :is(select:not([multiple]):not([size]), select:not([multiple])[size="1"]):not(.choice-native) {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
  }
}
