/* Shared native dropdowns: keep keyboard/OS menus, with one inset chevron.
   Geometry and image longhands must survive legacy inline padding/backgrounds
   and the dark theme's background shorthand. Listboxes keep their native UI. */
:root {
  --app-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-app-theme="dark"] {
  --app-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23c3c9d2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html body select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box;
  min-height: var(--app-select-min-height, 40px);
  max-width: 100%;
  padding-block: var(--app-select-padding-block, 9px) !important;
  padding-inline: var(--app-select-padding-start, 12px) var(--app-select-padding-end, 42px) !important;
  border: 1px solid var(--app-border, #cbd5e1);
  border-radius: 8px !important;
  background-color: var(--app-bg-soft, #f8fafc);
  background-image: var(--app-select-chevron) !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
  background-repeat: no-repeat !important;
  color: var(--app-text, #0f172a);
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
html body select:not([multiple]):is(:not([size]), [size="0"], [size="1"]):hover:not(:disabled) {
  border-color: #94a3b8;
}
html body select:not([multiple]):is(:not([size]), [size="0"], [size="1"]):focus-visible {
  outline: 2px solid var(--app-blue, #0c63e7) !important;
  outline-offset: 2px;
  border-color: var(--app-blue, #0c63e7);
}
html body select:disabled {
  cursor: not-allowed;
}
/* Dense bidding toolbars retain their compact rhythm and readable labels. */
.sort-lines-select,
.sort-lines-controls {
  --app-select-min-height: 34px;
  --app-select-padding-block: 6px;
  --app-select-padding-start: 10px;
  --app-select-padding-end: 36px;
}
html body select:not([multiple]):is(:not([size]), [size="0"], [size="1"]):dir(rtl) {
  background-position: left 14px center !important;
}
@media (forced-colors: active) {
  html body select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    background-image: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body select { transition: none !important; }
}
