/* ============================================
   stepper.css: .bl-stepper (owner A1, see .claude/md files/redesign-spec.md section 3)

   <div class="bl-stepper-row">
     <div class="bl-stepper-row__text">
       <span class="bl-stepper-row__label" id="g-label">Guests</span>
       <span class="bl-stepper-row__hint">Staying overnight</span>
     </div>
     <div class="bl-stepper" data-stepper data-min="0" data-max="50">
       <button type="button" data-step="-1" aria-label="Fewer guests"></button>
       <input type="number" inputmode="numeric" name="guests" min="0" max="50" value="2"
              aria-labelledby="g-label">
       <button type="button" data-step="1" aria-label="More guests"></button>
     </div>
   </div>

   Leave the buttons empty to get the drawn minus / plus; text or an SVG inside works too.
   ui.js marks a button aria-disabled at its bound; without JS it is a plain number input.
   ============================================ */

.bl-stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex: none;
}

.bl-stepper [data-step] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background-color: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out),
    scale var(--press-duration) var(--press-ease);
}

/* 44px tap target around the 36px disc. */
.bl-stepper [data-step]::after {
  content: "";
  position: absolute;
  inset: -4px;
}

/* Drawn minus / plus when the button is left empty (no whitespace inside either). */
.bl-stepper [data-step]:empty {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: center;
  background-size: 12px 1.75px;
  background-repeat: no-repeat;
}

.bl-stepper [data-step="1"]:empty {
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-size: 12px 1.75px, 1.75px 12px;
}

@media (hover: hover) and (pointer: fine) {
  .bl-stepper [data-step]:hover {
    border-color: var(--color-ink);
  }
}

.bl-stepper [data-step]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.bl-stepper [data-step]:active {
  scale: 0.92;
}

.bl-stepper [data-step][aria-disabled="true"],
.bl-stepper [data-step]:disabled {
  border-color: var(--color-border-light);
  color: var(--color-text-light);
  opacity: 0.55;
  cursor: not-allowed;
  scale: none;
}

.bl-stepper input {
  width: 3.25ch;
  min-width: 32px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.bl-stepper input::-webkit-outer-spin-button,
.bl-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bl-stepper input:focus {
  outline: none;
}

.bl-stepper input:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* --- Row: label + hint on the left, stepper on the right --- */
.bl-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding: var(--space-3) 0;
}

.bl-stepper-row + .bl-stepper-row {
  border-top: 1px solid var(--color-border-light);
}

.bl-stepper-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bl-stepper-row__label {
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.bl-stepper-row__hint {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .bl-stepper [data-step] {
    transition:
      border-color var(--duration-fast) var(--ease-out),
      color var(--duration-fast) var(--ease-out),
      opacity var(--duration-fast) var(--ease-out);
  }

  .bl-stepper [data-step]:active {
    scale: none;
  }
}
