/* ============================================================
   Notarization quantity selector — visual parity with WooCommerce
   "Number of pages" quantity box (− / value / +).
   Scoped to the EPO notarization input only via .usls-qty wrapper.
   ============================================================ */

/* Left-align the controls and let labels claim a full row even when
   the EPO plugin makes the wrapper a flex container.

   Specificity (0,2,0) beats the EPO plugin's .tm-quantity.tcwidth-100
   centering rules. We deliberately do NOT touch `display` so the
   plugin keeps full control of show/hide via its inline
   `style="display:none"`. */
.tm-quantity.usls-qty {
    text-align: left !important;
    justify-content: flex-start !important; /* if display is flex */
    flex-wrap: wrap !important;             /* if display is flex */
    line-height: 1;
}

/* ---------- Labels above and below the qty controls ---------- */

.usls-qty__label {
    display: block;
    flex: 0 0 100%;        /* claim full row in flex contexts */
    color: #222;
    text-align: left;
    line-height: 1.4;
    white-space: nowrap;   /* keep label on a single line */
    overflow: visible;
}

.usls-qty__label--above {
    font-size: 0.8em;
    font-weight: 500;
    margin: 4px 0 8px;
}

.usls-qty__label--below {
    font-size: 0.8em;
    color: #555;
    margin: 8px 0 0;
    /* Allow normal paragraph wrapping on narrow viewports. Overrides
       the `white-space: nowrap` inherited from `.usls-qty__label`. */
    white-space: normal;
}

/* ---------- Live price line ----------
   Sits below the descriptive text. Updates in real time on every
   change to the qty input (buttons, manual typing, reset). */

.usls-qty__price {
    display: block;
    flex: 0 0 100%;          /* claim full row in flex contexts */
    margin: 8px 0 0;
    color: #222;
    font-size: 0.9em;
    line-height: 1.4;
    white-space: nowrap;
}

.usls-qty__price-label {
    color: #555;
}

.usls-qty__price-amount {
    color: #222;
    font-weight: 700;
}

/* ---------- Number input ---------- */

.usls-qty .tm-qty.tc-element-qty {
    flex: 0 0 40px;        /* lock size in flex contexts */
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    padding: 0 4px;
    text-align: center;
    border: 1px solid #d4d4d4;
    border-left: 0;
    border-right: 0;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1;
    border-radius: 0;
    box-shadow: none;
    vertical-align: middle;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

.usls-qty .tm-qty.tc-element-qty::-webkit-outer-spin-button,
.usls-qty .tm-qty.tc-element-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---------- − / + buttons ----------
   Light-gray background to match the WooCommerce "Number of pages"
   quantity buttons. Adjust #f7f7f7 if the theme uses a different
   exact tone (see notes in the response). */

.usls-qty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;        /* lock size in flex contexts (no shrink) */
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid #d4d4d4;
    background: #f7f7f7;
    color: #222;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    border-radius: 0;
    box-shadow: none;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.12s ease;
}

.usls-qty__btn:hover {
    background: #ebebeb;
}

/* No focus ring on mouse click. The keyboard-only focus ring is
   restored below via :focus-visible (modern browsers). */
.usls-qty__btn:focus {
    outline: none;
}

.usls-qty__btn:focus-visible {
    outline: 2px solid #1e73be;
    outline-offset: -2px;
}

.usls-qty__btn:active {
    background: #e0e0e0;
}

/* The minus button intentionally does NOT show a disabled state at
   value = 1. The clamp lives in JS so the value never drops below
   the input's `min`, but visually the button looks identical to the
   plus button at all times. */
