/* Searchable dropdown for storefront variant groups. */

.storefront-variant-set__fields {
  align-items: start;
}

.storefront-variant-set .storefront-variant-group {
  align-self: start;
  min-height: 0;
}

.storefront-searchable-select {
  display: block;
  min-width: 0;
  position: relative;
  width: 100%;
}

.storefront-searchable-select__trigger {
  align-items: center;
  background: var(--store-surface);
  border: 1px solid color-mix(in srgb, var(--store-text) 16%, transparent);
  border-radius: max(9px, calc(var(--store-radius) * 0.55));
  box-sizing: border-box;
  color: var(--store-text);
  display: flex;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  gap: 10px;
  justify-content: space-between;
  min-height: 40px;
  padding: 7px 10px;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.storefront-searchable-select__trigger:hover:not(:disabled),
.storefront-searchable-select.is-open .storefront-searchable-select__trigger {
  border-color: var(--store-accent);
}

.storefront-searchable-select__trigger:focus-visible,
.storefront-searchable-select__trigger[aria-invalid="true"] {
  border-color: var(--store-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 17%, transparent);
  outline: none;
}

.storefront-searchable-select__trigger:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.storefront-searchable-select__trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storefront-searchable-select__trigger svg {
  fill: none;
  flex: 0 0 auto;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 150ms ease;
  width: 16px;
}

.storefront-searchable-select.is-open .storefront-searchable-select__trigger svg {
  transform: rotate(180deg);
}

.storefront-searchable-select__menu {
  background: color-mix(in srgb, var(--store-surface) 97%, var(--store-bg));
  border: 1px solid color-mix(in srgb, var(--store-text) 22%, transparent);
  border-radius: max(9px, calc(var(--store-radius) * 0.55));
  box-shadow: 0 18px 46px rgb(0 0 0 / 0.42);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  pointer-events: auto;
  position: fixed;
  z-index: 2147483000;
}

.storefront-searchable-select__menu[hidden] {
  display: none !important;
}

.storefront-searchable-select__search {
  align-items: center;
  background: color-mix(in srgb, var(--store-surface) 97%, var(--store-bg));
  border-bottom: 1px solid color-mix(in srgb, var(--store-text) 12%, transparent);
  display: flex;
  flex: 0 0 auto;
  padding: 8px;
  position: relative;
  z-index: 2;
}

.storefront-searchable-select__search svg {
  fill: none;
  height: 17px;
  left: 18px;
  pointer-events: none;
  position: absolute;
  stroke: color-mix(in srgb, var(--store-text) 58%, transparent);
  stroke-linecap: round;
  stroke-width: 1.7;
  width: 17px;
}

.storefront-searchable-select__search input {
  background: color-mix(in srgb, var(--store-bg) 72%, var(--store-surface));
  border: 1px solid color-mix(in srgb, var(--store-text) 18%, transparent);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--store-text);
  font: inherit;
  font-size: 0.78rem;
  min-height: 38px;
  outline: none;
  padding: 7px 10px 7px 36px;
  width: 100%;
}

.storefront-searchable-select__search input:focus {
  border-color: var(--store-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 14%, transparent);
}

.storefront-searchable-select__options {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  scrollbar-color: color-mix(in srgb, var(--store-accent) 68%, transparent) transparent;
  scrollbar-width: thin;
}

.storefront-searchable-select__options::-webkit-scrollbar {
  width: 7px;
}

.storefront-searchable-select__options::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--store-accent) 68%, transparent);
  border-radius: 999px;
}

.storefront-searchable-select__option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--store-text);
  display: flex;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 620;
  justify-content: space-between;
  min-height: 37px;
  padding: 7px 9px;
  text-align: left;
  width: 100%;
}

.storefront-searchable-select__option:hover:not(:disabled),
.storefront-searchable-select__option:focus-visible {
  background: color-mix(in srgb, var(--store-accent) 13%, var(--store-surface));
  outline: none;
}

.storefront-searchable-select__option.is-selected,
.storefront-searchable-select__option[aria-selected="true"] {
  background: color-mix(in srgb, var(--store-accent) 19%, var(--store-surface));
}

.storefront-searchable-select__option[aria-selected="true"]::after {
  color: var(--store-accent);
  content: "✓";
  font-weight: 900;
  margin-left: 12px;
}

.storefront-searchable-select__option:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.storefront-searchable-select__option[hidden] {
  display: none !important;
}

.storefront-searchable-select__empty {
  color: color-mix(in srgb, var(--store-text) 58%, transparent);
  font-size: 0.76rem;
  margin: 0;
  padding: 14px 10px;
  text-align: center;
}

.storefront-searchable-select__native {
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  opacity: 0.001 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}
