* {
  border: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.stepper {
  --border-width: 3px;
  display: flex;
  gap: 0.75em;
  align-items: center;
}

.stepper__label {
  min-width: 1ch;
  font-size: 1em;
  font-weight: 600;
  color: #000;
}

.stepper__wrapper {
  border-radius: 1.125em;
  box-shadow: 0 0 0 var(--border-width) inset #000;
  position: relative;
}

.stepper__control {
  border-radius: inherit;
  overflow: hidden;
  position: relative;
  width: 10em;
  height: 2.25em;
}

.stepper__button,
.stepper__icon {
  flex: 1;
}

.stepper__button {
  background-color: #000;
  box-shadow: -1.25em 0 0 #000;
  color: #fff;
  cursor: pointer;
  outline: transparent;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
  border: none;
  font: inherit;
}

.stepper__button:last-child {
  background-color: transparent;
  box-shadow: none;
  color: #000;
}

.stepper__button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.stepper__icon {
  color: #fff;
  display: grid;
  place-items: center;
  position: relative;
  transition: color 0.3s, transform 0.3s cubic-bezier(0.65, 0, 0.35, 2);
  pointer-events: none;
}

.stepper__icon:last-child {
  color: #000;
}

.stepper__icon svg {
  width: 1.25em;
  height: auto;
}

.stepper__focus,
.stepper__icons,
.stepper__sr,
.stepper__track {
  position: absolute;
}

.stepper__focus,
.stepper__icons,
.stepper__track {
  direction: ltr;
  display: flex;
}

.stepper__icons,
.stepper__sr {
  overflow: hidden;
}

.stepper__focus,
.stepper__icons {
  pointer-events: none;
}

.stepper__focus {
  inset: 0;
}

.stepper__focus-ring {
  border-radius: 1.125em 0 0 1.125em;
  box-shadow: 0 0 0 var(--border-width) transparent;
  transition: box-shadow 0.15s linear;
}

.stepper__focus-ring:last-child {
  border-radius: 0 1.125em 1.125em 0;
}

.stepper__icons {
  inset: var(--border-width);
}

.stepper__sr {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.stepper__track {
  inset: 0 0 0 auto;
  width: 200%;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 2);
}

.stepper__wrapper:has(.stepper__button:last-child:disabled) .stepper__focus-ring:first-child,
.stepper__wrapper:has(.stepper__button:first-child:disabled) .stepper__focus-ring:last-child {
  border-radius: 1.125em;
}

.stepper__wrapper:has(.stepper__button:first-child:focus-visible) .stepper__focus-ring:first-child,
.stepper__wrapper:has(.stepper__button:last-child:focus-visible) .stepper__focus-ring:last-child {
  box-shadow: 0 0 0 var(--border-width) #a68f50;
}

