/*
 * Touch-only control sizing (themis#105). daisyUI ships inside @layer
 * daisyui…, so these un-layered rules win regardless of specificity; they
 * override the custom properties daisyUI's own size classes set, lifting the
 * -xs/-sm controls to a 44px hit target. Scoped to pointer: coarse so desktop
 * density is untouched. Only daisyUI's sized controls are reached — a
 * standalone action has to be one (`btn btn-link btn-xs`, not `link text-xs`).
 */
@media (pointer: coarse) {
    .btn-xs,
    .btn-sm {
        --size: calc(var(--size-field, .25rem) * 11);
        --fontsize: .875rem;
        --btn-p: 1rem;
    }

    .input-xs,
    .input-sm {
        --in-size-mul: 11;
    }

    .select-xs,
    .select-sm {
        --sl-size-mul: 11;
    }

    /* 1rem is also the floor below which iOS Safari zooms on focus. */
    .input-xs,
    .input-sm,
    .select-xs,
    .select-sm,
    .textarea-xs,
    .textarea-sm {
        --font-size-min: 1rem;
    }

    /* md checkbox (24px); the wrapping label or cell supplies the rest of the hit area. */
    .checkbox-xs,
    .checkbox-sm {
        --size: calc(var(--size-selector, .25rem) * 6);
        padding: .25rem;
    }

    .tabs-xs,
    .tabs-sm {
        --tab-height: calc(var(--size-field, .25rem) * 11);
    }

    /*
     * daisyUI's own .menu-xs/.menu-sm item selectors, so the override lands on
     * the same elements. Items are grids packed to the top (align-content:
     * flex-start); centre them or the label rides the top of the taller row.
     */
    .menu-xs :where(li:not(.menu-title) > :not(ul, menu, details, .menu-title)),
    .menu-xs :where(li:not(.menu-title) > details > summary:not(.menu-title)),
    .menu-sm :where(li:not(.menu-title) > :not(ul, menu, details, .menu-title)),
    .menu-sm :where(li:not(.menu-title) > details > summary:not(.menu-title)) {
        min-height: 2.75rem;
        align-content: center;
        font-size: .875rem;
    }
}
