/* SPEII NEX 2.8.8.3 HOTFIX - Global Layout Alignment Audit
   Objetivo: centralizar TODAS as páginas do template Speii Nex, impedir footer no meio da tela
   e padronizar espaçamento em páginas atuais/futuras sem alterar Bunny, player ou gateways. */

:root{
    --speii-shell-max: 1580px;
    --speii-shell-pad-x: clamp(16px, 2.2vw, 34px);
    --speii-shell-pad-top: clamp(82px, 7vw, 112px);
    --speii-shell-pad-bottom: clamp(48px, 6vw, 86px);
    --speii-topbar-h: 88px;
    --speii-sidebar-w: 82px;
    --speii-panel-border: rgba(188, 65, 255, .24);
    --speii-panel-bg: rgba(12, 7, 24, .86);
}

html,body{
    min-height:100%;
}

body.speii-next-template{
    min-height:100vh;
    overflow-x:hidden!important;
    background:
        radial-gradient(circle at 10% 0%, rgba(188,0,255,.12), transparent 34%),
        #050511!important;
}

/* Estrutura principal */
body.speii-next-template .page-wrapper{
    min-height:100vh!important;
    display:flex!important;
    flex-direction:column!important;
    overflow-x:hidden!important;
}

body.speii-next-template .speii-main-shell{
    flex:1 0 auto!important;
    width:100%!important;
    max-width:var(--speii-shell-max)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding:var(--speii-shell-pad-top) var(--speii-shell-pad-x) var(--speii-shell-pad-bottom)!important;
    box-sizing:border-box!important;
    position:relative!important;
    z-index:1!important;
}

/* Em páginas com header/topbar do Speii Nex, evita conteúdo colado na barra lateral fixa */
@media (min-width: 1200px){
    body.speii-next-template .speii-main-shell{
        padding-left:max(var(--speii-shell-pad-x), calc(var(--speii-sidebar-w) + 18px))!important;
    }
}

/* Footer sempre no final */
body.speii-next-template .page-wrapper > .speii-nex-footer,
body.speii-next-template .page-wrapper > .footer-section,
body.speii-next-template .page-wrapper > footer,
body.speii-next-template .page-wrapper .speii-nex-footer{
    flex-shrink:0!important;
    margin-top:auto!important;
}

/* Container universal */
body.speii-next-template .speii-main-shell > section,
body.speii-next-template .speii-main-shell > .section,
body.speii-next-template .speii-main-shell > .card-area,
body.speii-next-template .speii-main-shell > .movie-details-section,
body.speii-next-template .speii-main-shell > .current-live-match-section,
body.speii-next-template .speii-main-shell > .recent-match-section,
body.speii-next-template .speii-main-shell > .shorts-section,
body.speii-next-template .speii-main-shell > .speii-trust-page,
body.speii-next-template .speii-main-shell > .speii-contact-page,
body.speii-next-template .speii-main-shell > .speii-blog-page,
body.speii-next-template .speii-main-shell > .speii-support-pro,
body.speii-next-template .speii-main-shell > .speii-checkout-pro,
body.speii-next-template .speii-main-shell > .speii-release-calendar,
body.speii-next-template .speii-main-shell > .speii-season-page,
body.speii-next-template .speii-main-shell > .speii-watch-shell{
    width:100%!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
}

/* Remove margens antigas que empurravam páginas para fora do centro */
body.speii-next-template .speii-main-shell .mt-80,
body.speii-next-template .speii-main-shell .pt-80,
body.speii-next-template .speii-main-shell .pt-100,
body.speii-next-template .speii-main-shell .pt-120{
    margin-top:0!important;
    padding-top:0!important;
}

body.speii-next-template .speii-main-shell .mb-80,
body.speii-next-template .speii-main-shell .pb-80,
body.speii-next-template .speii-main-shell .pb-120{
    margin-bottom:0!important;
    padding-bottom:0!important;
}

/* Containers Bootstrap e fluidos centralizados */
body.speii-next-template .speii-main-shell .container,
body.speii-next-template .speii-main-shell .container-fluid{
    width:100%!important;
    max-width:1480px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:clamp(12px,1.4vw,24px)!important;
    padding-right:clamp(12px,1.4vw,24px)!important;
    box-sizing:border-box!important;
}

body.speii-next-template .speii-main-shell .row{
    margin-left:calc(var(--bs-gutter-x, 1.5rem) * -.5)!important;
    margin-right:calc(var(--bs-gutter-x, 1.5rem) * -.5)!important;
}

/* Login, cadastro, recuperar senha */
body.speii-next-template .speii-main-shell .account-area{
    width:min(100%, 1120px)!important;
    margin:0 auto!important;
    border-radius:26px!important;
    overflow:hidden!important;
    box-shadow:0 24px 80px rgba(0,0,0,.35)!important;
}

body.speii-next-template .speii-main-shell .account-area .left,
body.speii-next-template .speii-main-shell .account-area .right{
    min-height:auto!important;
}

body.speii-next-template .speii-main-shell .account-area .right{
    padding:clamp(26px,3vw,48px)!important;
}

/* Se o social login estiver desabilitado, não deixar OR sozinho por CSS */
body.speii-next-template .auth-devide:empty,
body.speii-next-template .social-auth-list:empty{
    display:none!important;
}

/* Cards/painéis universais */
body.speii-next-template .speii-panel,
body.speii-next-template .speii-card-pro,
body.speii-next-template .custom--card,
body.speii-next-template .card,
body.speii-next-template .account-area,
body.speii-next-template .speii-checkout-card,
body.speii-next-template .speii-payment-card{
    box-sizing:border-box!important;
}

/* Checkout e pagamentos: largura e footer limpos */
body.speii-next-template .speii-checkout-pro{
    min-height:calc(100vh - 150px)!important;
}

body.speii-next-template .speii-checkout-shell{
    width:100%!important;
    max-width:1480px!important;
    margin:0 auto!important;
}

body.speii-next-template .speii-checkout-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1.45fr) minmax(340px,.55fr)!important;
    gap:28px!important;
    align-items:start!important;
}

/* Suporte e tickets */
body.speii-next-template .speii-support-pro{
    min-height:calc(100vh - 160px)!important;
}

body.speii-next-template .speii-support-pro .container{
    max-width:1420px!important;
}

/* Trust Center/Status/Legal */
body.speii-next-template .speii-trust-page,
body.speii-next-template .speii-trust-wrap{
    width:100%!important;
    max-width:1480px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}

/* Blog e páginas com cards */
body.speii-next-template .speii-blog-page,
body.speii-next-template .speii-home-blog-section{
    width:100%!important;
    max-width:1480px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}

/* Watch Party, Sports, Calendário, Programação */
body.speii-next-template .watch-party-section,
body.speii-next-template .recent-match-section,
body.speii-next-template .current-live-match-section,
body.speii-next-template .speii-release-calendar,
body.speii-next-template .speii-season-page{
    width:100%!important;
    max-width:1480px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}

/* Player/watch mantém área organizada sem esmagar vídeo */
body.speii-next-template .speii-watch-shell{
    max-width:1500px!important;
}

/* Header/side fix */
body.speii-next-template .speii-topbar{
    left:0!important;
    right:0!important;
}

body.speii-next-template .speii-sidebar{
    z-index:99980!important;
}

/* Mobile/tablet */
@media (max-width: 1199px){
    body.speii-next-template .speii-main-shell{
        padding-left:var(--speii-shell-pad-x)!important;
        padding-right:var(--speii-shell-pad-x)!important;
    }
}

@media (max-width: 991px){
    body.speii-next-template .speii-main-shell{
        padding-top:92px!important;
        padding-bottom:48px!important;
    }
    body.speii-next-template .speii-checkout-grid{
        grid-template-columns:1fr!important;
    }
    body.speii-next-template .account-area{
        display:block!important;
    }
    body.speii-next-template .account-area .left{
        padding:28px!important;
    }
}

@media (max-width: 575px){
    body.speii-next-template .speii-main-shell{
        padding-left:12px!important;
        padding-right:12px!important;
    }
    body.speii-next-template .speii-main-shell .container,
    body.speii-next-template .speii-main-shell .container-fluid{
        padding-left:8px!important;
        padding-right:8px!important;
    }
}
