/* Touch-friendly number input wrapper */
.touch-number-wrapper {
  display: inline-flex;
  align-items: stretch;
  box-sizing: border-box;
}

/* When the wrapper inherits visual classes like .modal-text-input,
   strip padding and clip children to the rounded corners */
.touch-number-wrapper.modal-text-input {
  padding: 0;
  overflow: hidden;
}

/* Focus ring on the WRAPPER when the inner input is focused */
.touch-number-wrapper.modal-text-input:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Arrow buttons: square, filling the full height of the control */
.touch-number-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4em;
  flex-shrink: 0;
  border: none;
  background: var(--bg-tertiary, #252540);
  color: var(--text-primary, #e8e8f2);
  font-size: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.touch-number-btn:hover:not(:disabled) {
  background: var(--bg-hover, #333);
}

.touch-number-btn:active:not(:disabled) {
  background: var(--accent-primary, #6366f1);
  color: #fff;
}

.touch-number-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.touch-number-btn-dec {
  border-right: 1px solid var(--border-color, #3a3a5a);
}

.touch-number-btn-inc {
  border-left: 1px solid var(--border-color, #3a3a5a);
}

/* Inner number input: fills remaining space, centered text.
   Visual chrome (border, background, shadow) is handled by the wrapper. */
.touch-number-input {
  flex: 1;
  min-width: 0;
  text-align: center;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding-left: 4px;
  padding-right: 4px;
}

/* Hide native spinner arrows */
.touch-number-input::-webkit-inner-spin-button,
.touch-number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.touch-number-input {
  -moz-appearance: textfield;
}

