/* Global tablet-friendly number steppers: [-] value [+] */
.number-input-stepper {
    display: inline-flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    direction: ltr;
    box-sizing: border-box;
    border: 1px solid #CBD5E1;
    border-radius: 12px;
    background: #FFFFFF;
    overflow: hidden;
}

.number-input-stepper:focus-within {
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.number-input-stepper input[type="number"],
.number-input-stepper input.amount-input,
.number-input-stepper input[data-amount-input] {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    -moz-appearance: textfield;
    appearance: textfield;
}

.number-input-stepper input[type="number"]::-webkit-outer-spin-button,
.number-input-stepper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input-stepper__btn {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    min-height: 52px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #F1F5F9;
    color: #0F172A;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.number-input-stepper__btn--dec {
    border-inline-end: 1px solid #E2E8F0;
}

.number-input-stepper__btn--inc {
    border-inline-start: 1px solid #E2E8F0;
}

.number-input-stepper__btn:hover {
    background: #E2E8F0;
    color: #007BFF;
}

.number-input-stepper__btn:active {
    background: #CBD5E1;
}

.number-input-stepper__btn:focus-visible {
    outline: 2px solid #007BFF;
    outline-offset: -2px;
    z-index: 1;
}

.service-result-input-wrapper > .number-input-stepper,
.service-result-weight-input-wrapper > .number-input-stepper,
.service-result-weight-wrapper > .number-input-stepper {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    min-height: 100%;
}

/* Match standard .form-input look inside registration / upsert forms */
.form-group > .number-input-stepper {
    min-height: auto;
    border: 2px solid var(--neutral-300, #e5e7eb);
    border-radius: var(--radius-10, 10px);
    background: var(--bg-card, #FFFFFF);
    overflow: hidden;
}

.form-group > .number-input-stepper:focus-within {
    border-color: var(--color-primary, #007BFF);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group > .number-input-stepper input[type="number"].form-input,
.form-group > .number-input-stepper input[type="number"],
.form-group > .number-input-stepper input.amount-input,
.form-group > .number-input-stepper input[data-amount-input] {
    height: auto;
    min-height: 0;
    padding: var(--spacing-12, 12px) var(--spacing-16, 16px) !important;
    font-size: var(--font-size-14, 14px);
    font-weight: 400;
    color: var(--neutral-700, #374151);
    text-align: center;
    direction: ltr;
}

.form-group > .number-input-stepper + .amount-words {
    width: 100%;
}

.form-group > .number-input-stepper .number-input-stepper__btn {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px;
    min-height: 100%;
    font-size: 22px;
    font-weight: 600;
    background: #F8FAFC;
    color: var(--neutral-700, #374151);
}

.form-group > .number-input-stepper .number-input-stepper__btn:hover {
    background: var(--color-primary-light, #E8F2FC);
    color: var(--color-primary, #007BFF);
}

.service-result-input-wrapper:has(> .number-input-stepper),
.service-result-weight-input-wrapper:has(> .number-input-stepper),
.service-result-weight-wrapper:has(> .number-input-stepper) {
    padding: 0 !important;
    overflow: hidden;
}

.service-result-page-container .service-result-input-wrapper > .number-input-stepper,
.service-result-page-container .service-result-weight-input-wrapper > .number-input-stepper {
    height: 100%;
    min-height: 52px;
}

.service-result-page-container .number-input-stepper__btn {
    min-height: 52px;
    background: #EEF3F9;
}

.service-result-page-container .number-input-stepper input[type="number"] {
    text-align: center !important;
    line-height: normal !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 8px !important;
}

.secretary-quantity-field:has(.number-input-stepper) {
    max-width: 280px;
}

.payment-field .number-input-stepper {
    min-height: 44px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FFFFFF;
}

.payment-field .number-input-stepper__btn {
    min-height: 44px;
    flex-basis: 48px;
    width: 48px;
    min-width: 48px;
    font-size: 24px;
}

.payment-field .number-input-stepper + .amount-words {
    width: 100%;
}

/* Compact steppers for small bootstrap/table number fields */
.form-control-sm.schedule-input-number,
.form-control-sm.schedule-input-capacity {
    text-align: center;
}

td .number-input-stepper {
    min-height: 38px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
}

td .number-input-stepper .number-input-stepper__btn {
    flex-basis: 36px;
    width: 36px;
    min-width: 36px;
    min-height: 38px;
    font-size: 18px;
}

td .number-input-stepper input[type="number"] {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 6px !important;
}

@media (max-width: 768px) {
    .number-input-stepper__btn {
        flex-basis: 64px;
        width: 64px;
        min-width: 64px;
        min-height: 56px;
        font-size: 32px;
    }

    .number-input-stepper {
        min-height: 56px;
    }

    .form-group > .number-input-stepper {
        min-height: auto;
    }

    .form-group > .number-input-stepper .number-input-stepper__btn {
        flex-basis: 48px;
        width: 48px;
        min-width: 48px;
        min-height: 100%;
        font-size: 24px;
    }
}
