/* MindZ 27333 — splash inicial mobile premium.
   Escopo: somente o primeiro loading da tela /inicio no mobile.
   Usa a mesma logo branca canônica dos cabeçalhos fixos, sem animação ou transformação. */

@media (max-width: 760px),
       (max-width: 959px) and (orientation: landscape) and (max-height: 560px) and (pointer: coarse) {
    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error) {
        position: fixed;
        z-index: 20000;
        isolation: isolate;
        inset: 0;
        width: 100vw;
        min-width: 100vw;
        max-width: none;
        height: 100dvh;
        min-height: 100dvh;
        margin: 0;
        padding:
            calc(28px + env(safe-area-inset-top, 0px))
            clamp(24px, 7vw, 40px)
            calc(34px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        background:
            radial-gradient(circle at 80% 8%, rgb(118 39 255 / 24%) 0 4%, transparent 27%),
            radial-gradient(circle at 9% 92%, rgb(47 128 255 / 24%) 0 5%, transparent 31%),
            radial-gradient(circle at 52% 52%, rgb(91 61 255 / 9%) 0 9%, transparent 37%),
            linear-gradient(155deg, #0b102b 0%, #18203d 48%, #101735 100%);
        box-shadow: none;
        color: #f8f9ff;
        text-align: center;
        box-sizing: border-box;
        overscroll-behavior: none;
    }

    /* Mesma logo clara usada pelo shell/cabeçalhos fixos. */
    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error)::before {
        content: "";
        position: relative;
        z-index: 2;
        width: min(72vw, 330px);
        height: clamp(92px, 14vh, 128px);
        margin: 0 0 clamp(34px, 5.2vh, 48px);
        display: block;
        flex: 0 0 auto;
        background-image: url("/static/assets/img/logo_mindz_transparente_sem_fundo.png?v=27333");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        filter: none;
        transform: none;
        animation: none;
    }

    /* Grafismo de fundo estático: não gira nem transforma a tela. */
    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error)::after {
        content: "";
        position: absolute;
        z-index: 0;
        left: -20vw;
        right: -20vw;
        bottom: -18vh;
        height: 42vh;
        pointer-events: none;
        opacity: .82;
        background:
            radial-gradient(70% 55% at 22% 100%, rgb(51 90 255 / 24%) 0 24%, transparent 25%),
            radial-gradient(68% 56% at 76% 100%, rgb(123 47 255 / 25%) 0 23%, transparent 24%);
        filter: blur(5px);
        transform: none;
        animation: none;
    }

    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error) > * {
        position: relative;
        z-index: 2;
    }

    /* Apenas o indicador circular gira; a marca e a tela permanecem estáticas. */
    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error) .ph-home-loading__spinner {
        width: 64px;
        height: 64px;
        min-width: 64px;
        min-height: 64px;
        margin: 0 0 26px;
        display: block;
        border: 0;
        border-radius: 50%;
        color: transparent;
        background-color: transparent;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='6' y1='6' x2='50' y2='50' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23b14cff'/%3E%3Cstop offset='.52' stop-color='%23762cff'/%3E%3Cstop offset='1' stop-color='%232f8cff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='28' cy='28' r='22' fill='none' stroke='%232a3358' stroke-width='5'/%3E%3Cpath d='M28 6a22 22 0 0 1 22 22' fill='none' stroke='url(%23g)' stroke-width='5' stroke-linecap='round'/%3E%3Ccircle cx='50' cy='28' r='2.5' fill='%232f8cff'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100% 100%;
        filter: drop-shadow(0 0 10px rgb(118 44 255 / 42%));
        transform-origin: center;
        animation: mindz-mobile-spinner-rotate .92s linear infinite;
        will-change: transform;
    }

    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error) .ph-home-loading__spinner > svg {
        display: none;
    }

    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error) > strong {
        margin: 0;
        color: #ffffff;
        font-size: clamp(21px, 5.4vw, 26px);
        font-weight: 790;
        line-height: 1.15;
        letter-spacing: -0.028em;
        text-shadow: 0 4px 18px rgb(0 0 0 / 16%);
    }

    body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error) > span:not(.ph-home-loading__spinner) {
        max-width: 320px;
        margin: 12px 0 0;
        color: rgb(232 236 255 / 72%);
        font-size: clamp(13px, 3.7vw, 15px);
        font-weight: 500;
        line-height: 1.5;
        letter-spacing: .005em;
    }

    @keyframes mindz-mobile-spinner-rotate {
        to { transform: rotate(360deg); }
    }

    @media (prefers-reduced-motion: reduce) {
        body.inicio-premium-v2 #pageContent > .ph-home-loading:not(.ph-home-loading--error) .ph-home-loading__spinner {
            animation-duration: 2.4s;
        }
    }
}
