/*
 * Quantity stepper (− 1 +) around WooCommerce quantity inputs (assets/js/quantity-stepper.js).
 * Shared: the website (product, cart) and the wp-admin "Offline order" form (phone-order-form mu-plugin)
 * load this same file, so both look and behave the same.
 */
.quantity-stepper {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}

.quantity-stepper__button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
}

/* Hover: a small centred circle, so it never touches the pill border whatever the button height. */
.quantity-stepper__button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  transition: background-color var(--transition-fast);
}

.quantity-stepper__button:hover:not([aria-disabled='true'])::before {
  background: var(--color-primary-soft);
}

.quantity-stepper__button[aria-disabled='true'] {
  opacity: 0.35;
  cursor: not-allowed;
}

.quantity-stepper__input {
  width: 3rem;
  height: var(--control-height);
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: var(--font-weight-semibold);
  -moz-appearance: textfield;
}

.quantity-stepper__input::-webkit-outer-spin-button,
.quantity-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
