/* Custom selects share the website's warm paper and forest palette. */
.hd-select { position: relative; display: inline-flex; flex-direction: column; min-width: 0; width: 100%; vertical-align: middle; }
.hd-select select.hd-select__native {
  position: absolute !important; width: 1px !important; min-width: 0 !important;
  height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; opacity: 0 !important; clip-path: inset(50%) !important;
  pointer-events: none !important; overflow: hidden !important;
}
.hd-select__trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--line, #ded4c0); border-radius: 10px;
  background: var(--paper, #fffdf8); color: var(--text, #1b1611);
  font: inherit; font-size: .875rem; font-weight: 400; line-height: 1.45;
  text-align: start; text-transform: none; letter-spacing: 0;
  cursor: pointer; box-shadow: none; transform: none;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}
.hd-select__trigger:hover { background-color: #f5f1e9; border-color: #bdb19b; transform: none; }
.hd-select__trigger:focus-visible, .hd-select.is-open > .hd-select__trigger { outline: 2px solid #a65023; outline-offset: 3px; }
.hd-select__trigger[aria-invalid="true"] { border-color: #a33623; }
.hd-select__trigger:disabled { cursor: not-allowed; opacity: .55; }
.hd-select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hd-select__chevron { display: block !important; flex: 0 0 16px; width: 16px !important; height: 16px !important; color: #6c6153; opacity: 1 !important; transition: transform .18s; }
.hd-select.is-open .hd-select__chevron { transform: rotate(180deg); }
.hd-select__error { display: block; margin-top: 7px; color: #a33623; font-size: .78rem; line-height: 1.4; }
.hd-select__error[hidden], .hd-select__menu[hidden] { display: none !important; }
.hd-select__menu {
  position: fixed; z-index: 15000; inset: auto; margin: 0; padding: 7px;
  min-width: 0; max-width: calc(100vw - 24px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid #ded4c0; border-radius: 14px; background: #fffdf8; color: #1b1611;
  box-shadow: 0 16px 48px #192d2524, 0 3px 10px #192d250a;
  font-family: 'Instrument Sans', system-ui, sans-serif; font-size: .875rem; line-height: 1.45;
  scrollbar-width: thin; scrollbar-color: #c5b89f transparent; touch-action: pan-y;
}
.hd-select__menu::backdrop { background: transparent; }
.hd-select__option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 44px; padding: 11px 13px; border-radius: 8px; cursor: pointer;
  font-weight: 400; text-align: start; user-select: none; overflow-wrap: anywhere;
}
.hd-select__option + .hd-select__option { margin-top: 2px; }
.hd-select__option.is-active { background: #eee9df; }
.hd-select__option[aria-selected="true"] { background: #e7eee8; color: #1c3a31; font-weight: 600; }
.hd-select__option[aria-selected="true"].is-active { background: #dce7df; }
.hd-select__option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.hd-select__check { flex: 0 0 16px; font-size: 15px; text-align: center; visibility: hidden; }
.hd-select__option[aria-selected="true"] .hd-select__check { visibility: visible; }
.hd-select__group { padding: 12px 13px 6px; font-size: .69rem; font-weight: 700; color: #746854; letter-spacing: .08em; text-transform: uppercase; }
.hd-select--tool { width: auto; flex: none; }
.hd-select--tool .hd-select__trigger { width: 80px; min-height: 44px; padding: 10px 12px; border-radius: 999px; background: transparent; font-size: .75rem; font-weight: 600; gap: 7px; }
.hd-select--tool .hd-select__trigger:hover { background-color: var(--bone-2, #ece4d5); }
.finder__control > .hd-select { flex: 1; }
.finder__control .hd-select__trigger { min-height: 34px; border: 0; border-radius: 6px; padding: 3px 0; gap: 6px; background: transparent; font-size: var(--fs-sm, .875rem); font-weight: 500; }
.finder__control .hd-select__trigger:hover { color: #a65023; }
.finder__control .hd-select__trigger:focus-visible, .finder__control .hd-select.is-open .hd-select__trigger { outline: none; }
.finder__field:has(.hd-select__trigger:focus-visible), .finder__field:has(.hd-select.is-open) { background-color: #f4eee2; box-shadow: inset 0 0 0 2px #a65023; }
.toolbar__sort > .hd-select { width: auto; max-width: 260px; }
.toolbar__sort .hd-select__trigger { min-height: 44px; font-size: .78rem; }
.drawer__currency .hd-select, .drawer__pref .hd-select { width: auto; min-width: 100px; }
.toolbar > .hd-select { min-width: 160px; }
/* Keep the native fallback arrow on hover too: background shorthand previously erased it. */
select.tool--select:hover { background-color: var(--bone-2, #ece4d5); background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-size: 5px 5px; background-position: calc(100% - 17px) 50%,calc(100% - 12px) 50%; background-repeat: no-repeat; }
@media (max-width: 599px) { .tools > .hd-select--tool { display: none; } }
@media (max-width: 480px) {
  .toolbar__sort > .hd-select { flex: 1; max-width: 240px; }
  .finder__control .hd-select__trigger { font-size: .82rem; }
  .hd-select__menu { border-radius: 12px; }
  .hd-select__option { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .hd-select__trigger, .hd-select__chevron { transition: none; } }
@media (forced-colors: active) {
  .hd-select__trigger, .hd-select__menu { border: 1px solid ButtonText; }
  .hd-select__option.is-active { outline: 1px solid Highlight; }
  .hd-select__option[aria-selected="true"] { color: HighlightText; background: Highlight; forced-color-adjust: none; }
}
