/**
 * Cross-app accessibility + mobile touch helpers
 */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.eman-skip-link {
    position: absolute;
    top: -100px;
    inset-inline-start: var(--space-3);
    z-index: 10000;
    padding: var(--space-2) var(--space-3);
    background: var(--eman-purple);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
}

.eman-skip-link:focus {
    top: var(--space-3);
}

body:not(.preloader-visible) .js-preloader,
html.eman-skip-preloader .js-preloader {
    display: none !important;
}

/* Lesson detail — ensure hero/content visible after preloader */
body.eman-lesson-detail [data-anim-wrap],
html.eman-content-ready [data-anim-wrap] {
    pointer-events: auto;
}

body.eman-lesson-detail [data-anim-child],
body.eman-lesson-detail [data-anim],
html.eman-content-ready [data-anim-child],
html.eman-content-ready [data-anim] {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
}

/* Public/info pages without main.js — never hide content behind data-anim */
.public-info-page [data-anim-wrap],
html.eman-content-ready [data-anim-wrap] {
    pointer-events: auto;
}

.public-info-page [data-anim-child],
.public-info-page [data-anim],
html.eman-content-ready [data-anim-child],
html.eman-content-ready [data-anim] {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    [data-anim-wrap] {
        pointer-events: auto;
    }

    [data-anim-child],
    [data-anim] {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto;
    }
}

@media (max-width: 767px) {
    .button,
    .action-btn,
    .tabs__button,
    .auth-submit-btn,
    .btn-nav {
        min-height: 44px;
    }
}
