/* Reusable number stepper styles shared across tools */

.stepper-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-content: space-between;
}

.stepper-row > * {
  flex: 0 0 auto;
}

.stepper-row label {
  min-width: 96px;
}

.stepper-row .number-input-wrapper,
.stepper-row select {
  flex: 0 0 110px;
  min-width: 0;
}

.stepper-row .number-input-wrapper input {
  width: 100%;
}

.sidebar .stepper-row label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 44px;
  border-radius: 10px;
  color: #666666;
  font-weight: 600;
  font-size: 0.71rem;
}

/* Hide default spinner controls */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Custom number input wrapper */
.number-input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  background: #F5F5F5;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s ease;
  height: 30px;
  overflow: hidden;
}

.number-input-wrapper:focus-within {
  border-color: #e5e7eb;
  background: #F5F5F5;
}

.number-input-wrapper input {
  flex: 1;
  border: none;
  border-left: 2px solid #e5e7eb;
  border-right: 2px solid #e5e7eb;
  background: #fff;
  padding: 0 6px;
  min-width: 0;
  text-align: center;
  font-size: 1.03125rem;
  font-weight: 700;
  color: #333;
}

.number-input-wrapper input:focus {
  outline: none;
  border: none;
  background: transparent;
}

/* Custom spinner buttons */
.spinner-btn {
  width: 30px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #3479FF;
  font-size: 1.21875rem;
  font-weight: 600;
  transition: all 0.15s ease;
  user-select: none;
}

.spinner-btn:hover {
  background: #E8E8E8;
}

.spinner-btn:active {
  background: #DDDDDD;
}

.spinner-btn:focus {
  outline: none;
  background: transparent;
}

.spinner-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
  background: transparent;
  opacity: 0.5;
}

.spinner-btn.decrement {
  border-radius: 0;
  border-right: none;
}

.spinner-btn.increment {
  border-radius: 0;
  border-left: none;
}

/* Alternative stepper markup used in chart tools */
.number-stepper {
  display: flex;
  align-items: center;
  background: #F5F5F5;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  width: 98px;
}

.number-stepper:focus-within {
  background: #F5F5F5;
}

.stepper-btn {
  width: 30px;
  height: 30px;
  border: none;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  font-size: 1.21875rem;
  color: #3479FF;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.stepper-btn:hover {
  background: #E8E8E8;
  color: #3479FF;
}

.stepper-btn:active {
  background: #DDDDDD;
}

.stepper-btn:focus {
  outline: none;
  background: transparent;
}

.stepper-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
  background: transparent;
  opacity: 0.5;
}

.stepper-input {
  width: 38px;
  height: 30px;
  text-align: center;
  border: none;
  border-left: 2px solid #e5e7eb;
  border-right: 2px solid #e5e7eb;
  background: #fff;
  font-size: 1.03125rem;
  font-weight: 700;
  color: #333333;
  font-family: inherit;
  -moz-appearance: textfield;
}

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

.stepper-input:focus {
  outline: none;
  background: #fff;
}

.sidebar .number-input-wrapper {
  border: 2px solid #e5e7eb;
  background: #F5F5F5;
  width: 90px;
}

.sidebar .number-input-wrapper:focus-within {
  border-color: #e5e7eb;
  background: #F5F5F5;
}

.sidebar .number-input-wrapper input {
  color: #333;
}

.sidebar .spinner-btn {
  background: transparent;
  color: #3479FF;
}

.sidebar .spinner-btn:hover {
  background: #E8E8E8;
  color: #3479FF;
}
