/*
 * Storefront — phone fixes shared by every theme.
 * Loaded last (see ThemeAsset), so these rules sit on top of each theme's own
 * stylesheet. They only change sizes and behaviour on small or touch screens;
 * colours and layouts stay as each theme designed them.
 */

/* ---------- Form fields: 16px so iOS Safari does not zoom in on focus ---------- */
@media (max-width: 991.98px), (hover: none) and (pointer: coarse) {
    html[data-theme] input:not([type="checkbox"], [type="radio"], [type="range"], [type="submit"], [type="button"], [type="reset"], [type="file"], [type="color"], [type="image"]),
    html[data-theme] select,
    html[data-theme] textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 991.98px) {
    /* ---------- Header icons: 44px touch targets ---------- */
    html[data-theme] :is(.tk-icon-btn, .tk-action, .gl-icon-btn, .md-icon-btn, .md-action, .by-icon-btn, .hy-icon-btn) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    html[data-theme] :is(.tk-cart, .gl-action, .by-action) {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }

    /* ---------- Sort menu: the whole pill opens the list, not only its text ---------- */
    html[data-theme] .sf-sort-select {
        align-self: stretch;
        height: auto;
    }

    /* ---------- Product gallery arrows ---------- */
    html[data-theme] .sfx-gal-nav {
        width: 40px;
        height: 40px;
    }

    /* ---------- Footer links: taller rows instead of 15-20px text lines ---------- */
    html[data-theme] :is(.sf-footer-list, .tk-footer ul, .gl-footer ul, .md-footer ul, .by-footer ul, .hy-foot-grid ul) li > a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }

    html[data-theme] :is(.sf-footer-list, .tk-footer ul, .gl-footer ul, .md-footer ul, .by-footer ul) > li {
        margin-bottom: 2px;
    }

    html[data-theme] .hy-foot-grid ul {
        gap: 2px;
    }

    /* ---------- Hyper: labels under 11px are hard to read on a phone ---------- */
    html[data-theme="hyper"] :is(.hy-cat-badge, .hy-tag) {
        font-size: 0.72rem;
    }

    html[data-theme="hyper"] .hy-trust small {
        font-size: 0.75rem;
    }
}
