/*
 * Shared numeric stepper control. Used by /purchase (machine count)
 * and /account/licenses (license count). The stepper IS a bordered
 * control — the outer frame reads as the control shape, and the inner
 * input has no chrome of its own (no border, no native spin arrows).
 *
 * Template shape:
 *   <div class="stepper">
 *     <button class="stepper-button">−</button>
 *     <input class="val" type="number">
 *     <button class="stepper-button">+</button>
 *   </div>
 */

.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg);
}

/* Buttons — override framework button defaults so they fit inside the
   stepper frame rather than reading as standalone 44px CTAs. */
.stepper .stepper-button {
  height: 2rem;
  min-width: 2rem;
  padding: 0 0.625rem;
  background: transparent;
  color: var(--ink);
  border: none;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}
.stepper .stepper-button:hover:not(:disabled) {
  background: var(--bg-soft);
  border: none;
}
.stepper .stepper-button:disabled {
  color: var(--ink-faint);
  cursor: not-allowed;
  background: transparent;
  opacity: 1;
}

/* Inner value input — strip every framework + browser default. No
   border, no full-width, no native spin buttons. */
.stepper .val {
  display: inline-block;
  width: 2.5rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: var(--font-medium);
  color: var(--ink);
  text-align: center;
  line-height: 2rem;
  background: transparent;
  border: none;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-radius: 0;
  outline: none;
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper .val::-webkit-outer-spin-button,
.stepper .val::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.stepper .val:hover,
.stepper .val:focus,
.stepper .val:focus-visible {
  background: transparent;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  box-shadow: none;
}

/* iOS Safari zooms inputs under 16px on focus; the stepper input is
   intentionally smaller for visual balance with the buttons, so bump
   it on mobile only. */
@media (max-width: 700px) {
  .stepper .val { font-size: 16px; }
}
