/* Shared enhanced selects. Native controls remain usable without JavaScript. */
.select-control {
  position: relative;
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.select-control .select-native { display: none; }

.select-trigger,
.header-quick-search .select-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #dce6e2;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  color: #1c1c4d;
  font: inherit;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.7;
  text-align: start;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.select-trigger:hover,
.header-quick-search .select-trigger:hover { border-color: #a5c5b9; background: #f5faf7; color: #1c1c4d; }
.select-trigger:focus-visible,
.header-quick-search .select-trigger:focus-visible { outline: 3px solid #00c292; outline-offset: 3px; }
.select-control.is-open .select-trigger { border-color: #00a982; box-shadow: 0 0 0 3px rgb(0 194 146 / 10%); }
.select-trigger:disabled { opacity: .5; cursor: not-allowed; }
.select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-chevron {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-block-start: -4px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.select-control.is-open .select-chevron { margin-block-start: 3px; transform: rotate(225deg); }
.select-control--sort { min-width: 178px; }

.header-quick-search > .select-control {
  display: flex;
  flex: 0 0 140px;
  min-width: 140px;
  max-width: 140px;
  align-self: stretch;
}
.header-quick-search .select-trigger {
  min-height: 100%;
  border: 0;
  border-inline-end: 1px solid #dce6e2;
  border-radius: 0;
  border-start-start-radius: inherit;
  border-end-start-radius: inherit;
  padding-inline: 18px 14px;
  gap: 12px;
  background: transparent;
  font-size: .75rem;
}
.header-quick-search .select-trigger:focus-visible { outline-offset: -4px; }
.header-quick-search .select-control.is-open .select-trigger { box-shadow: none; background: #f1f8f5; }

.select-menu {
  position: fixed;
  z-index: 250;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  border: 1px solid #dce6e2;
  border-radius: 12px;
  padding: 6px;
  background: #fff;
  color: #1c1c4d;
  box-shadow: 0 12px 36px rgb(28 28 77 / 13%), 0 2px 6px rgb(28 28 77 / 4%);
  font: inherit;
  font-size: .8125rem;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: #b7cec5 transparent;
}
.select-menu[hidden] { display: none; }
.select-option {
  position: relative;
  display: flex;
  min-height: 43px;
  align-items: center;
  border-radius: 7px;
  padding: 10px 12px;
  padding-inline-end: 38px;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}
.select-option + .select-option { margin-block-start: 2px; }
.select-option.is-active { background: #eef6f2; }
.select-option[aria-selected="true"] { background: #e1f8ef; color: #087654; font-weight: 600; }
.select-option[aria-selected="true"]::after {
  position: absolute;
  inset-inline-end: 14px;
  width: 6px;
  height: 11px;
  border-right: 2px solid #009b73;
  border-bottom: 2px solid #009b73;
  transform: rotate(45deg);
  content: "";
}
.select-option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

@media (max-width: 480px) {
  .header-quick-search > .select-control { flex-basis: 115px; min-width: 115px; max-width: 115px; }
  .header-quick-search .select-trigger { padding-inline: 12px 10px; gap: 9px; font-size: .6875rem; }
  .select-control--sort { min-width: 152px; }
  .select-trigger { gap: 12px; font-size: .75rem; padding-inline: 12px; }
  .select-menu { font-size: .8125rem; }
  .select-option { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .select-trigger, .select-chevron, .select-option { transition: none; }
}
