.stss-custom-select-field {
  display: grid;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  gap: 4px;
}

.stss-custom-select-field--configurator {
  margin-left: auto;
}

.stss-custom-select__caption {
  display: block !important;
  min-width: 0;
  margin: 0 !important;
  cursor: default;
}

.stss-custom-select__native-slot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.stss-custom-select__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.stss-custom-select {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-width: 0;
  color: #292929;
  font: inherit;
}

.stss-custom-select-field > .stss-custom-select {
  width: 100%;
  min-width: min(210px, 100%);
  max-width: 100%;
}

.stss-custom-select__button {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid #d7dade;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.stss-custom-select__button:hover {
  border-color: #f19a6f;
}

.stss-custom-select__button:focus {
  outline: none;
}

.stss-custom-select__button:focus-visible,
.stss-custom-select__option:focus-visible {
  outline: 2px solid #fb6420;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgb(251 100 32 / 18%);
}

.stss-custom-select__button:disabled {
  color: #82888e;
  background: #f3f4f5;
  cursor: not-allowed;
}

.stss-custom-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stss-custom-select__chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease, margin .15s ease;
}

.stss-custom-select__button[aria-expanded="true"] .stss-custom-select__chevron {
  margin-top: 4px;
  transform: rotate(225deg);
}

.stss-custom-select__listbox {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  box-sizing: border-box;
  width: 100%;
  max-height: min(280px, 45vh);
  overflow: auto;
  padding: 5px;
  border: 1px solid #e1e3e6;
  border-radius: 10px;
  background: #fff;
  color: #292929;
  box-shadow: 0 12px 30px rgb(29 37 45 / 18%), 0 2px 7px rgb(29 37 45 / 8%);
}

.stss-custom-select__listbox[hidden] {
  display: none !important;
}

.stss-custom-select__option {
  box-sizing: border-box;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  color: inherit;
  font: inherit;
  line-height: 1.35;
  cursor: pointer;
}

.stss-custom-select__option:hover,
.stss-custom-select__option.is-active {
  background: #fff1e9;
  color: #a84411;
}

.stss-custom-select__option[aria-selected="true"] {
  font-weight: 600;
}

.stss-custom-select__option.is-disabled {
  color: #a6aaae;
  cursor: not-allowed;
}

.stss-custom-select__option.is-disabled:hover,
.stss-custom-select__option.is-disabled.is-active {
  background: transparent;
  color: #a6aaae;
}

.stss-catalog .stss-sort[hidden] {
  display: none !important;
}

.stss-catalog__toolbar > .stss-custom-select--catalog {
  grid-area: sort;
  flex: 0 1 190px;
  min-width: 190px;
}

.stss-custom-select--catalog .stss-custom-select__button {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: inherit;
}

.stss-custom-select--configurator .stss-custom-select__button {
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12px;
}

@media (max-width: 520px) {
  .stss-catalog__toolbar > .stss-custom-select--catalog {
    flex: 0 1 45vw;
    min-width: 125px;
    max-width: 45vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stss-custom-select__button,
  .stss-custom-select__chevron {
    transition: none;
  }
}
