/* MapaBet | Identidade Azul, Grafite e Lima
   Aplicado após o tema original para preservar navegação e lógica do Vue/Ionic.
   Paleta MapaBet: carvão, azul elétrico, lima e branco.
*/
:root, html, body, html.new-skin-symbol {
    color-scheme: dark;
    --mapabet-black: #0B1018;
    --mapabet-panel: #141E2D;
    --mapabet-red: #2F6BFF;
    --mapabet-red-bright: #5B8BFF;
    --mapabet-gold: #C8F55B;
    --mapabet-gold-light: #D8FA91;
    --mapabet-white: #F4F7FB;
    --ep-color-background-fill-body-default: #0B1018 !important;
    --ep-color-background-fill-top-nav-primary: #0B1018 !important;
    --ep-color-background-fill-surface: #141E2D !important;
    --ep-color-background-fill-surface-raised-L1: #192538 !important;
    --ep-color-background-fill-surface-raised-L2: #1D2C42 !important;
    --ep-color-background-fill-surface-lowered: #0E1622 !important;
    --ep-color-background-fill-glow-primary-opacity-40: rgba(47,107,255,.18) !important;
    --ep-color-background-fill-glow-secondary-opacity-100: #2F6BFF !important;
    --ep-color-text-default: #F4F7FB !important;
    --ep-color-text-weak: #B3C0D1 !important;
    --ep-color-text-weaker: #8798B0 !important;
    --ep-color-border-default: #293A53 !important;
    --ep-color-border-brand: #2F6BFF !important;
    --ep-color-icon-brand-primary: #C8F55B !important;
    --ep-color-icon-brand-secondary: #5B8BFF !important;
    --ep-color-text-brand-primary: #C8F55B !important;
    --ep-color-btn-level-3-border: #C8F55B !important;
    --color-bar-bg-100: #0B1018 !important;
    --color-primary-btn-main: #2F6BFF !important;
    --color-primary-border-light: #2F6BFF !important;
    --tab-image-color: #D7E0EC !important;
    --tab-image-active-color: #C8F55B !important;
    --color-text-tab-main: #C8F55B !important;
    --d4e820a4: #0B1018 !important;
    --ion-background-color: #0B1018 !important;
    --ion-text-color: #F4F7FB !important;
    --ion-toolbar-background: #0B1018 !important;
    --ion-item-background: #141E2D !important;
    --ion-color-primary: #C8F55B !important;
    --ion-color-primary-contrast: #0B1018 !important;
}
html, body, #app, ion-app, ion-router-outlet, ion-page {
    background: #0B1018 !important;
}
body {color:#F4F7FB !important;font-family:'Inter',system-ui,Arial,sans-serif;}
ion-content {--background:#0B1018 !important;}
ion-content::part(background) { background: #0B1018 !important; }
ion-header, ion-toolbar {--background:#0B1018 !important;--color:#fff !important;}
ion-header { border-bottom:1px solid rgba(47,107,255,.22); }
/* Barra do aplicativo e navegação inferior */
ion-tab-bar, ion-tab-bar div.tab-bar {
    --background:#0B1018 !important;
    background:#0B1018 !important;
    border-top:1px solid #293A53 !important;
    box-shadow:0 -7px 25px rgba(0,0,0,.60) !important;
}
ion-tab-button {--color:#D7E0EC !important;--color-selected:#C8F55B !important;}
ion-tab-button.tab-selected, ion-tab-button[aria-selected='true'] {color:#C8F55B !important;}
ion-tab-button.tab-selected ion-icon {filter: drop-shadow(0 0 5px rgba(200,245,91,.32));}
/* Cards: bordas sutis, com cantos consistentes */
.game-card, .style1.game-card, .style2.game-card, .game-box ion-col {
    border-radius:12px !important;
}
.game-card .game-img, .game-card ion-img, .game-box ion-img {
    border-radius:11px !important;
    overflow:hidden;
}
/* Superfícies e chips compatíveis com o skin layout2 */
.new-skin-symbol .tab-bar, .new-skin-symbol .category-container .container,
.new-skin-symbol ion-list, .new-skin-symbol ion-card, .new-skin-symbol ion-item {
    --background:#141E2D;
}
.new-skin-symbol .search-container .ion-no-border .toolbar-search #searchbar {
    --background:#141E2D !important;
    --box-shadow:0 0 0 1px #334A6C !important;
    border-radius:10px !important;
}
.new-skin-symbol ion-segment-button.segment-button-checked,
.new-skin-symbol ion-segment-button.active-tab {
    --color-checked:#C8F55B !important;
    color:#C8F55B !important;
}
/* Chamadas à ação de login e cadastro, sem interferir em rotas */
ion-button.login, ion-button.register,
.new-skin-symbol ion-button.login, .new-skin-symbol ion-button.register {
    --color:#0B1018 !important;
    --background:#C8F55B !important;
    --background-hover:#D8FA91 !important;
    --background-activated:#B5E641 !important;
    --border-radius:10px !important;
    --box-shadow:inset 0 1px 0 #E3FCB1, 0 2px 8px rgba(47,107,255,.16) !important;
    font-weight:700 !important;
}
ion-button.login::part(native), ion-button.register::part(native) {
    background:#C8F55B !important;
    color:#0B1018 !important;
    border:1px solid #D8FA91 !important;
    border-radius:10px !important;
    font-weight:700 !important;
}
/* Botões principais dos formulários mantêm estados desativados e autenticação */
ion-button.primary:not(.button-disabled):not([disabled]) {
    --background:#C8F55B !important;
    --color:#0B1018 !important;
}
/* Banners carregados pela API existente: cantos arredondados, moldura sutil */
.swiper-slide img, .swiper-wrapper img, .swiper img,
.banner-swiper img, .banner-box img, [class*='banner'] ion-img {
    border-radius:12px;
}
.swiper-slide img[src*='mapabet_banner'],
img[src*='mapabet_banner'] {
    object-fit:cover;
    border-radius:12px !important;
    border:1px solid rgba(47,107,255,.28);
    box-shadow:0 5px 18px rgba(0,0,0,.22);
}
/* Ajustes de tipografia e brilho sem comprometer a legibilidade */
.new-skin-symbol .favorite.active, .new-skin-symbol .tab-img.on {color:#C8F55B !important;}
.new-skin-symbol a {text-decoration:none;}
.new-skin-symbol [class*='section-title'],
.new-skin-symbol [class*='game-title'] {letter-spacing:-.01em;}
/* A maioria das telas Ionic usa shadow DOM: variáveis, não overlays, mantêm a interação. */
@media (max-width: 700px) {
    ion-content { --padding-start:0; --padding-end:0; }
    ion-tab-bar {padding-bottom:env(safe-area-inset-bottom,0px);}
    .new-skin-symbol .swiper-slide img[src*='mapabet_banner'] {
        width:100%;height:auto;aspect-ratio:2.22;object-fit:cover;
    }
}
/* Desktop real: o JavaScript limita a escala fluida em 486 px. A partir de 1024 px,
   usamos uma base legivel de 16 px e reorganizamos apenas os componentes conhecidos.
   Celulares e tablets menores continuam usando integralmente o layout original. */
@media (min-width: 1024px) {
    :root {
        --mapabet-desktop-shell: 1440px;
        --mapabet-desktop-gutter: clamp(24px, 3vw, 48px);
        --mapabet-form-width: 760px;
        --mapabet-profile-width: 880px;
    }

    html {font-size:16px !important;}
    body {
        background:
            radial-gradient(70rem 34rem at 50% -18rem, rgba(47,107,255,.12), transparent 72%),
            #0B1018 !important;
    }
    #app, ion-app {
        width:100% !important;
        max-width:none !important;
        min-height:100vh !important;
    }
    ion-router-outlet.mx-auto {width:100% !important; max-width:none !important;}

    /* Cabecalho principal alinhado ao mesmo eixo do conteudo. */
    html.new-skin-symbol ion-toolbar.header {
        width:100% !important;
        max-width:var(--mapabet-desktop-shell) !important;
        margin-inline:auto !important;
        --padding-start:var(--mapabet-desktop-gutter) !important;
        --padding-end:var(--mapabet-desktop-gutter) !important;
        --min-height:4.25rem;
    }
    html.new-skin-symbol ion-toolbar.header .logo {max-width:11rem !important; height:2.625rem !important;}
    html.new-skin-symbol ion-toolbar.header .login,
    html.new-skin-symbol ion-toolbar.header .register {
        min-width:5.75rem !important;
        min-height:2.5rem !important;
        --padding-start:1rem !important;
        --padding-end:1rem !important;
        font-size:.8125rem !important;
    }

    /* Home: um shell unico evita tanto o corredor mobile quanto o conteudo espalhado. */
    html.new-skin-symbol #inicio .main-content .order-container {
        width:100% !important;
        max-width:var(--mapabet-desktop-shell) !important;
        margin-inline:auto !important;
        padding-inline:var(--mapabet-desktop-gutter) !important;
        box-sizing:border-box !important;
    }
    html.new-skin-symbol #inicio .main-content .order-container .swiper-c {
        width:100% !important;
        height:auto !important;
        max-height:none !important;
        margin:1.25rem auto 0 !important;
    }
    html.new-skin-symbol #inicio .swiper-poster {
        width:100% !important;
        max-width:1280px !important;
        height:auto !important;
        aspect-ratio:1280 / 570 !important;
        margin:0 auto !important;
        border-radius:1rem !important;
        overflow:hidden !important;
        box-shadow:0 14px 38px rgba(0,0,0,.38) !important;
    }
    html.new-skin-symbol #inicio .swiper-poster .swiper,
    html.new-skin-symbol #inicio .swiper-poster .swiper-wrapper,
    html.new-skin-symbol #inicio .swiper-poster .swiper-slide,
    html.new-skin-symbol #inicio .swiper-poster .poster-img {
        width:100% !important;
        height:100% !important;
    }
    html.new-skin-symbol #inicio .swiper-poster .poster-img {object-fit:cover !important; object-position:center !important;}

    /* Atalhos superiores com alvos maiores para mouse, sem alterar os cliques. */
    html.new-skin-symbol #inicio .scroll-box.layout1 .list-box {
        width:100% !important;
        display:grid !important;
        grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
        gap:.875rem !important;
    }
    html.new-skin-symbol #inicio .scroll-box.layout1 .list-box > li {
        width:auto !important;
        min-width:0 !important;
        min-height:5rem;
        border-radius:.75rem;
    }
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-MarqueeView-default-index {
        margin-inline:0 !important;
        height:2.75rem !important;
    }

    /* Somente as grades de jogos da home viram grid. O menu lateral conserva seu flex. */
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index {
        padding-inline:0 !important;
        margin-bottom:1.25rem !important;
    }
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index .card-container {
        display:grid !important;
        grid-template-columns:repeat(6, minmax(0, 1fr)) !important;
        gap:1rem !important;
    }
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index .card-container > * {
        width:auto !important;
        min-width:0 !important;
        max-width:none !important;
        flex:none !important;
    }
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index .game-card {
        width:100% !important;
        min-width:0 !important;
        box-shadow:0 .5rem 1.25rem rgba(0,0,0,.24);
        transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
    }
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index .game-card .game-img,
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index .game-card ion-img {
        width:100% !important;
        height:100% !important;
    }

    /* Busca/categorias: barra lateral legivel e grade responsiva; o card panoramico
       de provedor (sem .order-2) continua ocupando a linha inteira. */
    html.new-skin-symbol .category-container .container {
        width:100% !important;
        max-width:var(--mapabet-desktop-shell) !important;
        margin-inline:auto !important;
        padding:1rem var(--mapabet-desktop-gutter) 1.5rem !important;
        box-sizing:border-box !important;
        gap:1.25rem !important;
    }
    html.new-skin-symbol .category-container .container .side {
        flex:0 0 9.5rem !important;
        width:9.5rem !important;
        max-width:9.5rem !important;
        padding-right:1rem !important;
        border-right:1px solid rgba(200,245,91,.12);
    }
    html.new-skin-symbol .category-container .container .side ion-segment ion-segment-button {
        min-height:4.25rem !important;
        margin-bottom:.625rem !important;
    }
    html.new-skin-symbol .category-container .container .side ion-segment ion-segment-button .label {
        font-size:.8125rem !important;
        line-height:1.15 !important;
    }
    html.new-skin-symbol .category-container .container #main {min-width:0 !important; flex:1 1 auto !important;}
    html.new-skin-symbol .category-container ion-grid ion-row {
        display:grid !important;
        grid-template-columns:repeat(auto-fill, minmax(9.5rem, 1fr)) !important;
        gap:1rem !important;
    }
    html.new-skin-symbol .category-container ion-grid ion-col.card-col.order-2 {
        width:auto !important;
        max-width:none !important;
        flex:none !important;
        padding:0 !important;
    }
    html.new-skin-symbol .category-container ion-grid ion-col.card-col:not(.order-2) {
        grid-column:1 / -1 !important;
        width:100% !important;
        max-width:none !important;
    }

    /* Formularios financeiros e telas internas permanecem contidos e confortaveis. */
    html.new-skin-symbol ion-content.first-content,
    html.new-skin-symbol ion-content.common-ion-content {
        width:100% !important;
        max-width:var(--mapabet-form-width) !important;
        margin-inline:auto !important;
        --padding-start:1.5rem !important;
        --padding-end:1.5rem !important;
    }
    html.new-skin-symbol ion-content.first-content > *,
    html.new-skin-symbol ion-content.common-ion-content > * {
        width:100% !important;
        max-width:45rem !important;
        margin-left:auto !important;
        margin-right:auto !important;
        box-sizing:border-box !important;
    }
    html.new-skin-symbol .fixedBottom-footer {
        width:100% !important;
        max-width:var(--mapabet-form-width) !important;
        left:50% !important;
        transform:translateX(-50%) !important;
    }
    html.new-skin-symbol .fixedBottom-footer .btn-warp,
    html.new-skin-symbol .footer-assets {
        width:calc(100% - 3rem) !important;
        max-width:45rem !important;
    }

    /* Perfil: preserva o cabecalho fixed e o calculo de altura do aplicativo. */
    html.new-skin-symbol .mine {
        width:100% !important;
        max-width:var(--mapabet-profile-width) !important;
        margin-inline:auto !important;
    }
    html.new-skin-symbol .mine .user-base-info {
        width:min(100%, var(--mapabet-profile-width)) !important;
        max-width:var(--mapabet-profile-width) !important;
        left:50% !important;
        transform:translateX(-50%) !important;
        border-left:1px solid rgba(200,245,91,.1);
        border-right:1px solid rgba(200,245,91,.1);
        box-shadow:0 1rem 2.5rem rgba(0,0,0,.2);
    }
    html.new-skin-symbol .mine .user-tab-info {
        width:100% !important;
        max-width:var(--mapabet-profile-width) !important;
        margin-inline:auto !important;
        padding-inline:1.5rem !important;
        box-sizing:border-box !important;
    }
    html.new-skin-symbol .mine .my-vip,
    html.new-skin-symbol .mine .kf-nav,
    html.new-skin-symbol .mine .feature-tab {border-radius:.75rem;}

    /* Promocoes, indicacoes e resgate: paineis centrais em vez de faixas esticadas. */
    html.new-skin-symbol .activity-list,
    html.new-skin-symbol .recharge-container,
    html.new-skin-symbol .recharge-content {
        width:100% !important;
        max-width:68rem !important;
        margin-left:auto !important;
        margin-right:auto !important;
        box-sizing:border-box !important;
    }
    html.new-skin-symbol .agent-poster,
    html.new-skin-symbol .agent-content {
        width:100% !important;
        max-width:50rem !important;
        margin-left:auto !important;
        margin-right:auto !important;
    }
    html.new-skin-symbol .top-banner {
        max-width:42rem !important;
        margin-left:auto !important;
        margin-right:auto !important;
    }

    /* Login/cadastro deixam de ocupar a tela inteira no computador. */
    ion-modal#login-modal,
    ion-modal#change-pw-modal {
        --width:min(35rem, calc(100vw - 3rem)) !important;
        --height:min(47rem, calc(100vh - 3rem)) !important;
        --max-width:35rem !important;
        --border-radius:1.25rem !important;
    }
    ion-modal#bind-account-modal {
        --width:min(35rem, calc(100vw - 3rem)) !important;
        --height:auto !important;
        --max-width:35rem !important;
        --border-radius:1.25rem !important;
    }
    ion-modal#login-modal::part(content),
    ion-modal#change-pw-modal::part(content),
    ion-modal#bind-account-modal::part(content) {
        max-width:35rem !important;
        border-radius:1.25rem !important;
        overflow:hidden !important;
        box-shadow:0 1.5rem 5rem rgba(0,0,0,.65) !important;
    }
    ion-modal#login-modal .warpper {max-width:35rem !important; margin-inline:auto !important;}

    /* Barra inferior vira um dock central, mantendo exatamente os mesmos destinos. */
    html.new-skin-symbol .tabbar-MainPage-components-Tabs-Tabs1-index,
    html.new-skin-symbol .outer-wrap,
    html.new-skin-symbol ion-tab-bar.tab-bar {
        width:min(48rem, calc(100% - 3rem)) !important;
        left:50% !important;
        right:auto !important;
        transform:translateX(-50%) !important;
        border-radius:1rem 1rem 0 0 !important;
        overflow:hidden !important;
        box-shadow:0 -1rem 2.5rem rgba(0,0,0,.34);
    }
    html.new-skin-symbol .tabbar-MainPage-components-Tabs-Tabs1-index ion-tab-bar,
    html.new-skin-symbol .outer-wrap .tab-bar,
    html.new-skin-symbol ion-tab-bar.tab-bar {
        border:1px solid rgba(200,245,91,.16) !important;
        border-bottom:0 !important;
        border-radius:1rem 1rem 0 0 !important;
    }

    /* Defesa explicita: containers homonimos do drawer nunca podem virar grid. */
    html.new-skin-symbol ion-menu .card-container {
        display:flex !important;
        flex-flow:column !important;
        grid-template-columns:none !important;
    }
}

@media (min-width: 1280px) {
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index .card-container {
        grid-template-columns:repeat(7, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1600px) {
    html.new-skin-symbol #inicio .tabbar-tabs-inicio-components-GameWrapper-index .card-container {
        grid-template-columns:repeat(8, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    html.new-skin-symbol #inicio .game-card:hover {
        transform:translateY(-4px);
        filter:brightness(1.06);
        box-shadow:0 1rem 2rem rgba(0,0,0,.38);
    }
    html.new-skin-symbol #inicio .scroll-box.layout1 .list-box > li:hover,
    html.new-skin-symbol .category-container ion-segment-button:hover {
        filter:brightness(1.1);
    }
    html.new-skin-symbol ion-button:not([disabled]):hover {filter:brightness(1.06);}
}

@media (min-width: 1024px) {
    html.new-skin-symbol :where(a, button, [role='button']):focus-visible {
        outline:2px solid var(--mapabet-gold) !important;
        outline-offset:3px !important;
    }
}

/* MapaBet identity: presentation only. */
:root{--mapabet-brand:#C8F55B;--mapabet-emerald:#2F6BFF;--mapabet-ink:#0B1018;}

/* MapaBet banner proportions */
:root, html, body { --ep-color-background-fill-glow-primary-opacity-100:rgba(47,107,255,.16) !important; }
.swiper-c:has(img[src*='mapabet_banner']) { height:auto !important; }
div.swiper-poster:has(img[src*='mapabet_banner']) {
    width:100% !important;
    height:auto !important;
    max-width:1280px !important;
    aspect-ratio:1280 / 570 !important;
    margin-inline:auto !important;
}
.swiper-poster:has(img[src*='mapabet_banner']) .swiper,
.swiper-poster:has(img[src*='mapabet_banner']) .swiper-wrapper,
.swiper-poster:has(img[src*='mapabet_banner']) .swiper-slide {
    height:100% !important;
}
.swiper-poster img[src*='mapabet_banner'] {
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
}

/* MapaBet header plano */
html .layout2.logo-wrap::before,
#tabbar-tabs-inicio-components-HeaderBar-components-logo-index .layout2.logo-wrap::before {
    background:none !important;
}

/* Canonical MapaBet tokens; legacy aliases above keep the original components compatible. */
:root {
    --mapabet-charcoal:#0B1018;
    --mapabet-surface:#141E2D;
    --mapabet-blue:#2F6BFF;
    --mapabet-lime:#C8F55B;
    --mapabet-white:#F4F7FB;
}
/* A flat header keeps the compact wordmark readable on every screen. */
ion-header, ion-toolbar,
html.new-skin-symbol ion-toolbar.header {
    background:#0B1018 !important;
    --background:#0B1018 !important;
    --background-image:none !important;
    box-shadow:none !important;
}
html .layout2.logo-wrap::before,
#tabbar-tabs-inicio-components-HeaderBar-components-logo-index .layout2.logo-wrap::before {
    background:none !important;
    box-shadow:none !important;
    filter:none !important;
}
html.new-skin-symbol ion-toolbar.header .logo,
html.new-skin-symbol ion-toolbar.header img[src*='mapabet_logo'] {
    object-fit:contain !important;
    object-position:left center !important;
    filter:none !important;
}
@media (prefers-reduced-motion:reduce) {
    html.new-skin-symbol #inicio .game-card {transition:none !important;}
}
