/* ═══════════════════════════════════════════════════════════
   Server-side mobile device overrides (User-Agent detection)
   Fixes high-DPI phones (e.g. Xiaomi) that report desktop widths.
   Active when <html class="is-mobile-device"> is set from Laravel.
   ═══════════════════════════════════════════════════════════ */

/* ─── Navbar: always use mobile chrome on detected phones ─── */
html.is-mobile-device .navbar-nav-custom {
    display: none !important;
}

html.is-mobile-device .navbar-hamburger {
    display: flex !important;
}

html.is-mobile-device .navbar-signin-btn {
    display: none !important;
}

/* ─── Cards: no desktop hover/play chrome on phones ─── */
html.is-mobile-device .movie-card-play,
html.is-mobile-device .movie-card-final:hover .movie-card-play,
html.is-mobile-device .movie-card-hover-info,
html.is-mobile-device .movie-card-final:hover .movie-card-hover-info {
    display: none !important;
}


    html.is-mobile-device .browse-filter-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    html.is-mobile-device .browse-filter-trigger {
        min-height: auto;
        padding: 6px 8px;
        font-size: 12px;
        gap: 0.35rem;
        line-height: 1.25;
    }

    html.is-mobile-device .browse-filter-chevron {
        font-size: 0.5rem;
    }

    html.is-mobile-device .theater-bottom-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            'info actions'
            'episodes episodes';
    }

    html.is-mobile-device .theater-info {
        grid-area: info;
    }

    html.is-mobile-device .theater-actions {
        grid-area: actions;
    }

    html.is-mobile-device .theater-episodes-toggle,
    html.is-mobile-device .theater-episodes-spacer {
        grid-area: episodes;
        justify-self: center;
    }
}

/* Hero: center mobile layout when width is mis-reported as desktop */
@media (min-width: 769px) {
    html.is-mobile-device .heroSwiper {
        height: 78vh;
        min-height: 520px;
        max-height: 720px;
    }

    html.is-mobile-device .hero-slide {
        padding-bottom: clamp(2rem, 6vh, 3rem);
        align-items: flex-end;
        justify-content: center;
    }

    html.is-mobile-device .hero-slide .hero-slide-container {
        display: flex;
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    html.is-mobile-device .hero-slide-content {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
        padding-bottom: 0.75rem;
    }

    html.is-mobile-device .hero-slide-desc {
        display: none !important;
    }

    html.is-mobile-device .hero-slide-badges {
        justify-content: center;
    }

    html.is-mobile-device .hero-slide-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    html.is-mobile-device .hero-slide-actions .btn-hero-primary,
    html.is-mobile-device .hero-slide-actions .btn-hero-secondary {
        width: 90%;
        max-width: 320px;
    }
}
