/* ░░ UDM TYPED DATE INPUT ░░
   Three numeric boxes (DD / MM / YYYY) replacing <input type="date"> across the
   public forms. The native picker was found hard to use for a birth year decades
   back — every entry means scrolling a calendar through hundreds of months.

   Shared by member registration, the EOI form, leader submissions and the
   payment-date fields, so the rules and the look stay in one place.
   Behaviour lives in /js/udm-date-input.js. */

.udm-dob {
    position: relative;
    border: 1px solid var(--udm-border, #e3e3e3);
    border-radius: var(--udm-radius-sm, 8px);
    background: #fff;
    padding: 22px 14px 10px 42px;
    min-height: 58px;
}

.udm-dob:focus-within {
    border-color: var(--udm-primary, #D3000F);
    box-shadow: 0 0 0 3px rgba(211, 0, 15, .08);
}

.udm-dob__ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--udm-muted, #777);
    font-size: 1.05rem;
}

.udm-dob__label {
    position: absolute;
    top: 6px;
    left: 42px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--udm-muted, #777);
}

.udm-dob__req { color: var(--udm-primary, #D3000F); }

.udm-dob__parts { display: flex; align-items: center; gap: 6px; }

.udm-dob__box {
    width: 42px;
    border: 0;
    border-bottom: 1px solid var(--udm-border, #e3e3e3);
    background: transparent;
    font-size: .95rem;
    font-weight: 700;
    color: var(--udm-ink, #2A0D10);
    text-align: center;
    padding: 2px 0;
    font-variant-numeric: tabular-nums;
}

.udm-dob__box--year { width: 62px; }

.udm-dob__box:focus { outline: none; border-bottom-color: var(--udm-primary, #D3000F); }
.udm-dob__box::placeholder { color: #bbb; font-weight: 500; letter-spacing: .5px; }

/* The one box that is wrong, marked as it is typed rather than at submit. */
.udm-dob__box--bad {
    color: var(--udm-primary, #D3000F);
    border-bottom-width: 2px;
    border-bottom-color: var(--udm-primary, #D3000F);
    background: rgba(211, 0, 15, .05);
}

.udm-dob--invalid { border-color: var(--udm-primary, #D3000F); }

/* Inline message. Pages that already own an error slot (the EOI form) suppress
   this with data-msg="off" and render into their own span instead. */
.udm-dob__msg {
    display: none;
    font-size: .76rem;
    font-weight: 600;
    color: var(--udm-primary, #D3000F);
    margin-top: 6px;
}

.udm-dob__msg--on { display: block; }

/* Compact variant for admin tables and narrow cells. */
.udm-dob--sm { padding: 18px 10px 7px 34px; min-height: 48px; }
.udm-dob--sm .udm-dob__ico { left: 10px; font-size: .92rem; }
.udm-dob--sm .udm-dob__label { left: 34px; font-size: .66rem; }
.udm-dob--sm .udm-dob__box { width: 36px; font-size: .85rem; }
.udm-dob--sm .udm-dob__box--year { width: 54px; }
