/* SPEII NEX 2.8.8.4 — Global Layout Alignment Final
   Camada aditiva: padroniza alinhamento, largura útil, responsividade e overflow
   sem alterar player, gateways, Bunny, Google Drive ou lógica de negócio. */
:root{
    --speii-2884-header-h:78px;
    --speii-2884-sidebar-w:74px;
    --speii-2884-shell-max:1640px;
    --speii-2884-page-x:clamp(14px,2.1vw,34px);
    --speii-2884-page-top:clamp(96px,8vw,122px);
    --speii-2884-page-bottom:clamp(44px,5vw,82px);
    --speii-2884-gap:clamp(14px,1.8vw,28px);
}

html,body{max-width:100%;min-height:100%;overflow-x:hidden!important}
body.speii-next-template{min-height:100vh!important}
body.speii-next-template *{box-sizing:border-box}
body.speii-next-template img,
body.speii-next-template video,
body.speii-next-template iframe,
body.speii-next-template canvas,
body.speii-next-template svg{max-width:100%}

/* Shell: centraliza na área realmente disponível depois da sidebar fixa. */
body.speii-next-template .page-wrapper{
    min-height:100vh!important;width:100%!important;max-width:100%!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:none!important;min-width:0!important;
    margin:0!important;padding:var(--speii-2884-page-top) var(--speii-2884-page-x) var(--speii-2884-page-bottom) calc(var(--speii-2884-sidebar-w) + var(--speii-2884-page-x))!important;
    position:relative!important;z-index:1!important;
}
body.speii-next-template .speii-main-shell > :where(section,.section,.card-area,.movie-details-section,.current-live-match-section,.recent-match-section,.shorts-section,.speii-trust-page,.speii-contact-page,.speii-blog-page,.speii-support-pro,.speii-checkout-pro,.speii-release-calendar,.speii-season-page,.speii-watch-shell,.speii-next-page,.speii-generic-page),
body.speii-next-template .speii-main-shell > .container,
body.speii-next-template .speii-main-shell > .container-fluid{
    width:min(100%,var(--speii-2884-shell-max))!important;max-width:var(--speii-2884-shell-max)!important;
    margin-left:auto!important;margin-right:auto!important;min-width:0!important;
}
body.speii-next-template .speii-main-shell :where(.container,.container-fluid){
    width:100%!important;max-width:1540px!important;margin-left:auto!important;margin-right:auto!important;
    padding-left:clamp(10px,1.25vw,22px)!important;padding-right:clamp(10px,1.25vw,22px)!important;min-width:0!important;
}
body.speii-next-template .speii-main-shell .row{min-width:0!important}
body.speii-next-template .speii-main-shell .row > [class*="col-"]{min-width:0!important}

/* Somente espaçamentos de topo da raiz da página: evita conteúdo muito abaixo da navbar. */
body.speii-next-template .speii-main-shell > :where(.mt-80,.pt-80,.pt-100,.pt-120,.ptb-80){margin-top:0!important;padding-top:0!important}
body.speii-next-template .speii-main-shell > :where(.mb-80,.pb-80,.pb-100,.pb-120,.ptb-80){margin-bottom:0!important;padding-bottom:0!important}

/* Header, sidebar e rodapé na mesma grade visual. */
body.speii-next-template .speii-topbar{width:100%!important;max-width:100vw!important;left:0!important;right:0!important;z-index:99990!important}
body.speii-next-template .speii-topbar__nav{min-width:0!important}
body.speii-next-template .speii-search{min-width:0!important}
body.speii-next-template .speii-sidebar{width:var(--speii-2884-sidebar-w)!important;z-index:99980!important}
body.speii-next-template .speii-nex-footer{
    flex:0 0 auto!important;margin-top:auto!important;margin-left:var(--speii-2884-sidebar-w)!important;
    width:calc(100% - var(--speii-2884-sidebar-w))!important;max-width:calc(100% - var(--speii-2884-sidebar-w))!important;
}
body.speii-next-template .speii-nex-footer .speii-footer-wrap{width:min(100%,1260px)!important;max-width:1260px!important;margin-inline:auto!important}

/* Tabelas e listas extensas nunca rompem o viewport. */
body.speii-next-template :where(.table-responsive,.speii-table-wrap,.speii-history-table,.speii-list-table){
    width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;
    scrollbar-width:thin!important;
}
body.speii-next-template table{max-width:100%!important}
body.speii-next-template td,body.speii-next-template th{overflow-wrap:anywhere}

/* Formulários, modais e cartões. */
body.speii-next-template :where(.card,.custom--card,.speii-panel,.speii-card-pro,.speii-checkout-card,.speii-payment-card){min-width:0!important;max-width:100%!important}
body.speii-next-template :where(input,select,textarea,.form-control,.form--control){max-width:100%!important}
body.speii-next-template .modal-dialog{width:min(calc(100% - 24px),var(--bs-modal-width,720px))!important;margin:1.25rem auto!important}
body.speii-next-template .modal-content{max-width:100%!important;overflow:hidden!important}
body.speii-next-template .iziToast-wrapper{max-width:calc(100vw - 18px)!important}

/* Login, cadastro e recuperação: centralizados sem serem cobertos pelo footer. */
body.speii-next-template .account-area{width:min(100%,1120px)!important;max-width:1120px!important;margin:0 auto!important;min-width:0!important;overflow:hidden!important}
body.speii-next-template .account-area > .row{margin:0!important}
body.speii-next-template .account-area :where(.left,.right){min-width:0!important}
body.speii-next-template .account-area .right{padding:clamp(22px,3vw,48px)!important}
body.speii-next-template :where(.auth-devide,.social-auth-list):empty{display:none!important}

/* Checkout, gateways e doações. */
body.speii-next-template .speii-checkout-pro{width:min(100%,1480px)!important;min-height:calc(100vh - 170px)!important;margin-inline:auto!important}
body.speii-next-template .speii-checkout-shell{width:100%!important;max-width:1480px!important;margin-inline:auto!important;min-width:0!important}
body.speii-next-template .speii-checkout-grid{display:grid!important;grid-template-columns:minmax(0,1.45fr) minmax(320px,.55fr)!important;gap:var(--speii-2884-gap)!important;align-items:start!important}
body.speii-next-template .speii-summary-card{position:sticky!important;top:calc(var(--speii-2884-header-h) + 18px)!important}

/* Suporte, Trust Center, calendário, programação, blog e Watch Party. */
body.speii-next-template :where(.speii-support-pro,.speii-trust-wrap,.speii-trust-page,.speii-blog-page,.speii-release-calendar,.speii-season-page,.watch-party-section,.speii-watch-shell,.recent-match-section,.current-live-match-section){width:min(100%,1540px)!important;max-width:1540px!important;margin-inline:auto!important;min-width:0!important}
body.speii-next-template :where(.speii-trust-grid,.speii-grid,.speii-blog-grid,.speii-blog-featured-grid){min-width:0!important}
body.speii-next-template .speii-watch-shell :where(video,iframe,.plyr,.video-player){max-width:100%!important}

/* Páginas de perfis e dispositivos. */
body.speii-next-template :where(.speii-profile-grid,.speii-device-grid,.speii-family-grid){width:100%!important;min-width:0!important}
body.speii-next-template :where(.speii-profile-card,.speii-device-card,.speii-family-card){min-width:0!important;max-width:100%!important}

/* Botões flutuantes ficam empilhados e não cobrem campos. */
body.speii-next-template :where(.speii-backtop,.scrollToTop){right:18px!important;bottom:18px!important}
body.speii-next-template :where(.speii-pwa-floating,.speii-install-app,.pwa-install-btn,#speiiPwaInstallBtn){right:18px!important;bottom:88px!important;max-width:calc(100vw - 36px)!important}

/* TV, ultrawide e notebook. */
@media (min-width:1800px){
    :root{--speii-2884-shell-max:1760px}
}
@media (max-width:1399px){
    body.speii-next-template .speii-main-shell{padding-right:22px!important;padding-left:calc(var(--speii-2884-sidebar-w) + 22px)!important}
}

/* Sidebar some no breakpoint usado pelo próprio template. */
@media (max-width:991px){
    :root{--speii-2884-sidebar-w:0px;--speii-2884-page-top:132px}
    body.speii-next-template .speii-main-shell{padding-left:14px!important;padding-right:14px!important;padding-bottom:48px!important}
    body.speii-next-template .speii-nex-footer{margin-left:0!important;width:100%!important;max-width:100%!important}
    body.speii-next-template .speii-checkout-grid{grid-template-columns:1fr!important}
    body.speii-next-template .speii-summary-card{position:static!important}
    body.speii-next-template .account-area{display:block!important}
    body.speii-next-template .speii-topbar{gap:10px!important}
    body.speii-next-template .speii-topbar__nav{width:100%!important;max-width:100%!important;overflow-x:auto!important;white-space:nowrap!important;padding-bottom:4px!important}
}
@media (max-width:575px){
    :root{--speii-2884-page-top:144px}
    body.speii-next-template .speii-main-shell{padding-left:10px!important;padding-right:10px!important;padding-bottom:34px!important}
    body.speii-next-template .speii-main-shell :where(.container,.container-fluid){padding-left:6px!important;padding-right:6px!important}
    body.speii-next-template .account-area .right{padding:20px 16px!important}
    body.speii-next-template .speii-maintenance-meta{grid-template-columns:1fr!important}
    body.speii-next-template .modal-dialog{width:calc(100% - 14px)!important;margin:.7rem auto!important}
    body.speii-next-template :where(.speii-backtop,.scrollToTop){right:10px!important;bottom:10px!important}
    body.speii-next-template :where(.speii-pwa-floating,.speii-install-app,.pwa-install-btn,#speiiPwaInstallBtn){right:10px!important;bottom:70px!important}
}
