﻿/* ==========================================================================
   WM Form Field Styles — Handheld Barcode Device 320 x 680
   Layout: label above input, help/error below — stacked.
   ========================================================================== */

.wm-form {
    display: flex;
    flex-direction: column;
}

    .wm-form .wm-field {
        display: flex;
        flex-direction: column;
        gap: .25rem;
        margin-bottom: 1.25rem;
    }

    .wm-form .wm-label {
        font-weight: 600;
        font-size: 0.9rem;
    }

    .wm-form .wm-input,
    .wm-form .wm-select {
        width: 100%;
        padding: .75rem; 
        font-size: 1rem;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

    /* the field draws its box on the input itself: the wrapper around the input must not draw a second border and padding */
    .wm-form .wm-input:has(> .wm-input) {
        padding: 0;
        border: 0;
        border-radius: 0;
    }

    .wm-form .wm-message {
        font-size: .9rem;
        min-height: 1.1rem; 
    }

        .wm-form .wm-message .wm-help {
            color: darkslategray;
        }

        .wm-form .wm-message .wm-error {
            color: red;
        }

        .wm-form .wm-message .wm-loading {
            color: darkslategray;
        }

    .wm-form .wm-required {
        color: red;
    }

    .wm-form .wm-field-error .wm-input,
    .wm-form .wm-field-error .wm-select {
        border-color: red;
    }

    .wm-form .wm-field-disabled {
        opacity: .6;
    }

    .wm-form .wm-field-loading {
        position: relative;
    }

.wm-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.wm-quantity-button {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 2.5rem;
    border-radius: 12px;
    touch-action: manipulation;
    user-select: none;
}

.wm-quantity-input {
    flex: 1;
    min-width: 0;
    height: 72px;
    text-align: center;
    font-size: 3rem;
    font-weight: bold; 
}

    .wm-quantity-button i {
        line-height: 1;
    }

.wm-unit {
    margin-left: 0.5rem;
    font-size: 1.5rem;
}
