/* Load after style.css. Without the JS enhancement every native select stays visible. */
.ds-native {
  position: absolute !important; width: 1px !important; height: 1px !important;
  min-height: 0 !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important; white-space: nowrap !important;
  border: 0 !important; pointer-events: none !important;
}
.ds-root, .ds-listbox {
  --ds-bg: #fff; --ds-fg: #151a18; --ds-muted: #66716b;
  --ds-line: #dce5d9; --ds-hover: #f0f4f1; --ds-selected: #e7f2ed;
  --ds-accent: #006650; --ds-ring: #a65a08;
  color: var(--ds-fg); color-scheme: light; font-family: inherit; box-sizing: border-box;
}
[data-theme="dark"] .ds-root, [data-theme="dark"] .ds-listbox {
  --ds-bg: #181818; --ds-fg: #f4f4f4; --ds-muted: #b8b8b8;
  --ds-line: #454545; --ds-hover: #292929; --ds-selected: #242424;
  --ds-accent: #b0deb6; --ds-ring: #edb366; color-scheme: dark;
}
.ds-root { display: inline-block; position: relative; min-width: 0; max-width: 100%; vertical-align: middle; }
.control > .ds-root, .preferences-page .theme-control > .ds-root { display: block; width: 100%; }
.ds-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--ds-line); border-radius: 10px;
  background: var(--ds-bg); color: var(--ds-fg); font: inherit;
  font-size: 13px; font-weight: 550; line-height: 1.4; text-align: left;
  cursor: pointer; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.ds-trigger:hover { border-color: var(--ds-muted); }
.ds-trigger:focus-visible { outline: 3px solid var(--ds-ring); outline-offset: 2px; }
.ds-trigger[aria-invalid="true"] { border-color: #bf493d; }
.ds-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-arrow { flex: 0 0 7px; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); margin: -4px 2px 0 0; }
.ds-open .ds-arrow { transform: rotate(225deg); margin-top: 4px; }
.ds-disabled .ds-trigger { color: var(--ds-muted); background: var(--ds-hover); cursor: not-allowed; }
.ds-listbox {
  position: fixed; inset: auto; margin: 0; z-index: 1000; display: block;
  min-width: 0; max-width: calc(100vw - 16px); padding: 5px;
  overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ds-line); border-radius: 12px; background: var(--ds-bg);
  box-shadow: 0 10px 35px #0003; scrollbar-width: thin;
}
.ds-listbox[hidden] { display: none !important; }
.ds-listbox::backdrop { background: transparent; }
.ds-option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 44px; padding: 10px 11px; border-radius: 7px;
  color: var(--ds-fg); font-size: 14px; font-weight: 450; line-height: 1.45;
  cursor: pointer; white-space: normal; overflow-wrap: anywhere; touch-action: pan-y;
}
.ds-option[aria-selected="true"] { background: var(--ds-selected); font-weight: 650; }
.ds-check { visibility: hidden; flex-shrink: 0; color: var(--ds-accent); font-weight: 750; }
.ds-option[aria-selected="true"] .ds-check { visibility: visible; }
.ds-option.ds-highlight { background: var(--ds-hover); outline: 2px solid var(--ds-accent); outline-offset: -2px; }
.ds-option[aria-disabled="true"] { color: var(--ds-muted); cursor: not-allowed; opacity: .65; }
.ds-group { padding: 11px 11px 5px; color: var(--ds-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.theme-control > .ds-root { min-width: 106px; }
.theme-control .ds-trigger { font-size: 12px; }
.date-control .ds-trigger { font-size: 12px; }
@media (hover: hover) { .ds-option:not([aria-disabled="true"]):hover { background: var(--ds-hover); } }
@media (max-width: 600px) { .storefront-tools .ds-trigger { gap: 7px; padding: 10px 8px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .ds-root *, .ds-listbox * { scroll-behavior: auto; } }
@media (forced-colors: active) {
  .ds-trigger, .ds-listbox { border: 1px solid ButtonText; }
  .ds-option.ds-highlight { outline: 2px solid Highlight; }
  .ds-option[aria-selected="true"] .ds-check { color: Highlight; }
  .ds-trigger:focus-visible { outline-color: Highlight; }
}
