/* Evita o flash de "${...}" (template Vue cru) antes do JS montar a
   interface. Vue remove este atributo assim que compila o elemento. */
[v-cloak] {
    display: none !important;
}

/* Restaura a rolagem interna da lista de jogos no desktop (>=992px). O
   container so tinha max-height, sem overflow-y, entao o conteudo que
   excedia a altura era cortado pelo overflow:hidden do .app (usado pro
   border-radius do card) e ficava inacessivel. */
.page-aposta .overflow-jogos {
    overflow-y: auto;
    overflow-x: hidden;
}

.header-mobile .mobile-brand {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

/* Cupom mobile como bottom sheet fixo (abre com a classe .show ao clicar em
   "Ver cupom" em header.twig). As regras originais (site.css) exigiam um
   ancestral ".responsive" no <html>, mas essa classe nunca existe de fato —
   o atributo é renderizado como "pre-loadingresponsive" (fusão de texto sem
   espaço, bug conhecido e mantido de propósito em outra parte do
   layout.twig). Por isso a classe .show era aplicada corretamente pelo
   clique, mas nenhuma regra de posicionamento batia e o cupom nunca
   aparecia. Reimplementado aqui com um seletor que não depende de
   ".responsive", sem alterar cores/identidade visual (já herdadas de
   .bilhete/.ticket-head existentes). */
@media (max-width: 768px) {
    .page-aposta .bilhete {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        z-index: 999;
        overflow: auto;
        border-radius: 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transition: top 0.3s ease-in-out;
    }
    .page-aposta .bilhete.show {
        top: 0;
    }
    .page-aposta .bilhete .ticket-head {
        position: sticky;
        top: 0;
        width: 100%;
        z-index: 1;
    }
    .page-aposta .bilhete .bilhete-close {
        position: absolute;
        top: 0;
        right: 0;
        width: 27px;
        padding: 6px 0;
        font-size: 20px;
        text-align: center;
        cursor: pointer;
    }
}

.header-mobile .mobile-brand img {
    max-width: 140px;
    height: auto;
}

.header-mobile .btn-link {
    padding: 8px 10px;
}

.header-mobile-app .btn-link {
    white-space: nowrap;
}

.bets-reference-page .dateEventAndSearch .searchEvent input {
    width: 100%;
}

/* Remove o banner institucional (logo + "Plataforma de apostas" + "TopBets")
   da tela de apostar no mobile. Ele deveria já ficar escondido (o header.twig
   usa "d-none d-md-block" e o CSS de bets-reference-page também esconde
   .site-topbar), mas um bug de fusao de classes no Twig gruda a palavra
   seguinte ao ".site-topbar" (vira "site-topbard-none"), entao nenhuma das
   duas regras bate. Escondido aqui via seletor de atributo, que funciona
   mesmo com a classe corrompida, sem mexer no template. */
@media (max-width: 768px) {
    body.bets-reference-page header[class*="site-topbar"] {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .header-mobile {
        margin-bottom: 10px !important;
    }

    .header-mobile .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-mobile .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    .header-mobile [class*="col-"],
    .header-mobile .col {
        padding-left: 6px;
        padding-right: 6px;
    }

    .header-mobile .row-aposta .container {
        width: 100%;
        max-width: none;
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-mobile .row-aposta .row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-mobile .row-aposta .col,
    .header-mobile .row-aposta .col-auto {
        padding-left: 0;
        padding-right: 0;
    }

    .header-mobile .row-aposta .col {
        flex: 1 1 calc(50% - 4px);
    }

    .header-mobile .row-aposta .col-auto {
        flex: 1 1 100%;
    }

    .header-mobile .row-aposta .btn {
        width: 100%;
        height: 38px;
    }

    .bets-reference-page .page-aposta > .col,
    .bets-reference-page .page-aposta > [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .bets-reference-page .campeonatos {
        width: 100% !important;
        margin-bottom: 12px;
    }

    .bets-reference-page .sidebar-logo img {
        width: 150px;
    }

    .bets-reference-page .sidebar-links {
        padding: 0 8px 10px;
    }

    .bets-reference-page .campeonatos .title {
        margin: 0 8px 10px !important;
    }

    .bets-reference-page .campeonatos ul {
        padding: 0 4px 0 8px !important;
    }

    .bets-reference-page .dateEventAndSearch {
        padding: 0 0 10px !important;
    }

    .bets-reference-page .dateEvent h1 {
        font-size: 28px !important;
        line-height: 1.05;
    }

    .bets-reference-page .dateEvent span {
        font-size: 14px !important;
    }

    .bets-reference-page .searchEvent {
        width: 100% !important;
    }

    .bets-reference-page .bets-reference-mobile-actions {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .bets-reference-page .bets-reference-mobile-actions a {
        font-size: 12px;
        padding: 0 8px;
    }

    .bets-reference-page .cardItem {
        grid-template-columns: 52px 1fr !important;
        grid-template-rows: auto auto auto !important;
        gap: 8px !important;
        padding: 10px 8px !important;
    }

    .bets-reference-page .dateAndHour {
        grid-row: 1 / span 3 !important;
    }

    .bets-reference-page .teams {
        grid-column: 2;
    }

    .bets-reference-page .outcomesMain {
        grid-column: 1 / -1 !important;
    }

    .bets-reference-page .totalOutcomes {
        grid-column: 1 / -1 !important;
        justify-content: flex-end !important;
    }

    .bets-reference-page .boxOdds {
        width: 100% !important;
    }

    .bets-reference-page .boxOdds .odd {
        min-height: 42px;
    }

    .bets-reference-page .logoTeam {
        width: 24px !important;
        height: 24px !important;
    }

    .bets-reference-page .nameTeam {
        font-size: 12px !important;
    }

    .bets-reference-page .eventlist-country {
        height: auto !important;
        min-height: 32px;
        padding: 6px 8px !important;
    }

    .bets-reference-page .eventlist-country .name {
        white-space: normal !important;
        line-height: 1.2;
    }

    .bets-reference-page .bilhete {
        margin-top: 12px !important;
    }
}

/* Compliance: aviso de idade mínima (rodapé + cupom) */
.compliance-notice {
    font-size: 12px;
    color: #999;
    padding: 6px 0;
}

.compliance-notice-inline {
    display: block;
    color: #999;
    font-size: 11px;
    margin-bottom: 6px;
}

/* Seletor de campeonatos customizado (substitui o <select> nativo) */
.campeonato-picker {
    position: relative;
}

.campeonato-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background-color: #fff;
}

.campeonato-picker-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
}

.campeonato-picker-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    padding: 10px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.campeonato-picker-list {
    overflow-y: auto;
    margin-top: 8px;
}

.campeonato-picker-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    padding: 8px 6px 4px;
}

.campeonato-picker-group-title img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.campeonato-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    color: #333;
    border-radius: 4px;
}

.campeonato-picker-item:hover,
.campeonato-picker-item.active {
    background-color: var(--cor-primaria, #920808);
    color: #fff;
    text-decoration: none;
}

.campeonato-picker-flag img,
.campeonato-picker-flag i {
    width: 16px;
    height: 16px;
}

/* Cupom de apostas: bottom sheet fixo no rodapé (mobile) */
.cupom-bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.cupom-bottom-sheet-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
}

.cupom-bottom-sheet-count {
    font-size: 13px;
    color: #444;
    white-space: nowrap;
}

.cupom-bottom-sheet-count .badge {
    background-color: var(--cor-primaria, #920808);
    color: #fff;
    margin-right: 4px;
}

.cupom-bottom-sheet-valor {
    flex: 1;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
}

.cupom-bottom-sheet-btn {
    white-space: nowrap;
}

/* Dá espaço no fim da página para o conteúdo não ficar escondido atrás do bottom sheet */
@media (max-width: 768px) {
    .bets-reference-page {
        padding-bottom: 60px;
    }
}

/* Lista de jogos: tema claro com vermelho da marca, batendo com a referência
   (site.css tem um reskin escuro fixo pra essa tabela — aqui sobrepomos só ela,
   sem mexer no resto do site que possa depender do tema escuro). */
#pg-aposta .table.table-jogos {
    background: transparent;
}

#pg-aposta .table.table-jogos thead tr.tr-pais {
    background: var(--cor-primaria, #920808) !important;
    border-radius: 8px 8px 0 0;
}

#pg-aposta .table.table-jogos thead tr.tr-pais th {
    font-size: 16px;
    font-weight: 700;
    padding: 12px 16px;
}

#pg-aposta .table.table-jogos thead tr.tr-header {
    background: #f4f5f7 !important;
}

#pg-aposta .table.table-jogos thead .th-cotacao {
    color: #6b7280 !important;
}

#pg-aposta .table.table-jogos tbody {
    background: #fff !important;
}

#pg-aposta .table.table-jogos tbody tr.campeonato {
    background: #eceff1 !important;
}

#pg-aposta .table.table-jogos tbody tr.campeonato td,
#pg-aposta .table.table-jogos tbody tr.campeonato th {
    padding: 8px 12px;
}

#pg-aposta .table.table-jogos tr.campeonato a {
    color: var(--cor-primaria, #920808) !important;
    font-weight: 700;
}

#pg-aposta .table.table-jogos tbody tr:not(.campeonato) {
    background: #fff !important;
    box-shadow: none;
}

#pg-aposta .table.table-jogos tbody tr:not(.campeonato) td {
    padding: 10px 12px;
    border-top: none;
    border-bottom: 1px solid #eceff1;
    color: #1f2937 !important;
}

#pg-aposta .table.table-jogos tbody tr:not(.campeonato) td:first-child,
#pg-aposta .table.table-jogos tbody tr:not(.campeonato) td:last-child {
    border-radius: 0;
    border-left: none;
    border-right: none;
}

#pg-aposta .table.table-jogos tbody tr td small {
    color: #6b7280 !important;
}

#pg-aposta .table.table-jogos tbody tr td b {
    color: #111827 !important;
    font-weight: 700;
}

#pg-aposta .btn-cotacao {
    background: #39373a !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px;
}

#pg-aposta .btn-cotacao:hover {
    background: var(--cor-primaria, #920808) !important;
    color: #fff !important;
}

#pg-aposta .btn-cotacao.active {
    background: var(--cor-primaria, #920808) !important;
    color: #fff !important;
}

#pg-aposta .btn-cotacao.outras {
    background: var(--cor-secundaria, #f7c63f) !important;
    color: #39373a !important;
}

/* Lateral de campeonatos (desktop): vermelho da marca em vez do azul-marinho,
   coerente com o vermelho já usado no cabeçalho de país da lista de jogos. */
.page-aposta .campeonatos {
    background: var(--cor-primaria, #7a0c14) !important;
}

.page-aposta .campeonatos ul li.pais {
    background: rgba(0, 0, 0, 0.15) !important;
}

.page-aposta .campeonatos ul li a.active {
    color: var(--cor-secundaria, #f7c63f) !important;
}

/* Login overlay (staff login: admin/gerente/cambista) */
.login-overlay {
    background-size: cover;
    background-position: center;
}

.login-overlay .modal-dialog {
    z-index: 1;
}

.login-overlay::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.72);
    z-index: 0;
}

.login-overlay-card {
    background: #fff;
    border-radius: 10px;
    border: none;
    padding: 30px 26px 24px;
    text-align: center;
    position: relative;
}

.login-overlay-close {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #999;
}

.login-overlay-logo {
    margin-bottom: 18px;
}

.login-overlay-logo img {
    max-height: 56px;
    max-width: 100%;
}

.login-overlay .modal-body {
    text-align: left;
}

.login-overlay-submit {
    margin-top: 6px;
}

.login-overlay-back {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: #777;
    font-size: 13px;
}

.login-overlay-back:hover {
    color: #444;
    text-decoration: none;
}

/* Menu lateral mobile (hamburguer) */
.menu-mobile {
    background-color: var(--cor-primaria, #7a0c14) !important;
}

.menu-mobile .header {
    background-color: rgba(0, 0, 0, 0.18) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-mobile .header img {
    max-height: 30px;
}

.menu-mobile li a {
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.menu-mobile li a i {
    width: 18px;
    text-align: center;
    opacity: 0.85;
}

.menu-mobile li a:hover,
.menu-mobile li a:focus {
    background-color: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.menu-mobile li.menu-item-login a {
    background-color: var(--cor-secundaria, #d4af37);
    color: #1a1a1a !important;
    font-weight: 700;
}

.menu-mobile li.menu-item-login a:hover {
    background-color: var(--cor-secundaria, #d4af37);
    opacity: 0.9;
}

/* Botão LOGIN no topbar desktop, substitui o form embutido */
.site-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--cor-secundaria, #d4af37);
    color: var(--cor-primaria, #5c0910);
    border: none;
    padding: 9px 22px;
    border-radius: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12.5px;
}

.site-login-btn:hover {
    filter: brightness(1.08);
    color: var(--cor-primaria, #5c0910);
    text-decoration: none;
}

@media (max-width: 768px) {
    /* Mais Cotações: respeita a safe area do aparelho (home indicator iOS) */
    #modal-cotacoes .modal-dialog {
        margin-bottom: 0;
    }

    #modal-cotacoes .modal-content {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    #modal-cotacoes .table-responsive {
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 480px) {
    .header-mobile .mobile-brand img {
        max-width: 112px;
    }

    .header-mobile .btn-link {
        padding: 8px 6px;
        font-size: 13px;
    }

    .header-mobile-app .btn-link .text-success {
        font-size: 12px;
    }

    .bets-reference-page .dateEvent h1 {
        font-size: 24px !important;
    }

    .bets-reference-page .bets-reference-mobile-actions {
        grid-template-columns: 1fr;
    }

    .bets-reference-page .row-aposta .col {
        flex: 1 1 100%;
    }

    .bets-reference-page .eventlist-country .name {
        font-size: 12px !important;
    }

    .bets-reference-page .cardItem {
        padding: 8px 6px !important;
    }

    .bets-reference-page .boxOdds .odd {
        font-size: 13px !important;
    }
}

/* ============================================================
   Redesign da lista de jogos / cupom / modal (protótipos v2,
   fiéis à referência jogos.app). A lista de jogos deixou de ser
   uma <table class="table-jogos"> e virou divs (.league-block,
   .match-row, .match-odd-btn, etc.) — classes totalmente novas,
   então não herdam nenhum conflito das 3 camadas de tema
   sobrepostas que já existiam em site.css para .table-jogos/
   .tr-pais/.btn-cotacao. Só o container externo `.bilhete`
   (mantido pelo JS de abrir/fechar no mobile) e `#modal-cotacoes`
   (plugin Bootstrap) continuam com os nomes antigos.
   ============================================================ */
#pg-aposta {
    --liga-navy: #0d1b3d;
    --odd-bg: #1c1c1c;
    --odd-selected-bg: #173d24;
    --odd-selected-text: #7be3a0;
    --odd-selected-border: #2f9d5c;
}

/* Cabeçalho: dia da semana + contagem de jogos + busca */
#pg-aposta .bets-reference-head .dateEvent h1 { font-size: 19px; font-weight: 800; margin: 0; }
#pg-aposta .bets-reference-head .dateEvent span { color: #888; font-size: 13px; }
#pg-aposta .searchEvent { position: relative; }
#pg-aposta .searchEvent .search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cor-primaria, #7a0c14); }
#pg-aposta .searchEvent input { padding-left: 34px !important; border-radius: 8px !important; }

/* Chips: Todos/Hoje/Amanhã + destaques + gatilho de campeonatos (mobile) */
#pg-aposta .quick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
#pg-aposta .day-chip {
    padding: 8px 16px; border-radius: 100px; font-size: 12.5px; font-weight: 700;
    background: #fff; color: #888; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: none;
}
#pg-aposta .day-chip.active { background: var(--cor-primaria, #7a0c14); color: #fff; }
#pg-aposta .fav-chip {
    padding: 8px 14px; border-radius: 100px; font-size: 12px; font-weight: 700;
    background: #fdf6e0; color: var(--cor-primaria, #5c0910); border: 1px solid #f0e0a8;
    display: inline-flex; align-items: center; gap: 5px;
}
#pg-aposta .fav-chip i { color: var(--cor-secundaria, #d4af37); }
#pg-aposta .fav-chip.active { background: var(--cor-primaria, #7a0c14); color: #fff; border-color: var(--cor-primaria, #7a0c14); }
#pg-aposta .fav-chip.active i { color: var(--cor-secundaria, #e8c968); }
#pg-aposta .quick-row .campeonato-picker { margin-left: auto; position: relative; }
#pg-aposta .league-select-btn {
    display: flex; align-items: center; gap: 6px;
    background: #fff; padding: 9px 15px; border-radius: 100px; font-size: 12.5px; font-weight: 700;
    color: #222; box-shadow: 0 1px 3px rgba(0,0,0,.06); white-space: nowrap; border: none;
}
#pg-aposta .league-select-btn .arrow { color: var(--cor-secundaria, #d4af37); }

/* Skeleton de carregamento (enquanto axios.get('apostar/jogos') não respondeu) */
#pg-aposta .jogos-skeleton { margin-bottom: 14px; }
#pg-aposta .skeleton-country, #pg-aposta .skeleton-row {
    background: linear-gradient(90deg, #e8e8e8 25%, #f2f2f2 37%, #e8e8e8 63%);
    background-size: 400% 100%; animation: skeleton-shine 1.4s ease infinite; border-radius: 8px; margin-bottom: 8px;
}
#pg-aposta .skeleton-country { height: 38px; }
#pg-aposta .skeleton-row { height: 64px; }
@keyframes skeleton-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
    #pg-aposta .skeleton-row, #pg-aposta .skeleton-country { animation: none; }
}

/* Barra de país: sempre a cor primária sólida, nunca varia por país */
#pg-aposta .country-bar {
    background: var(--cor-primaria, #7a0c14) !important; color: #fff;
    padding: 11px 16px; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; gap: 9px; border-radius: 8px 8px 0 0;
}
#pg-aposta .country-bar .flag-badge { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }

/* Barra de liga: navy fixo (não segue o tema do tenant — só o país segue) */
#pg-aposta .league-block { background: #fff; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border-radius: 0 0 8px 8px; overflow: hidden; }
#pg-aposta .league-head {
    display: flex; align-items: center; gap: 9px;
    background: var(--liga-navy); color: #fff; padding: 10px 16px; font-size: 13px; font-weight: 700;
}
#pg-aposta .league-head a { color: #fff; }
#pg-aposta .league-head a:hover { text-decoration: underline; }
#pg-aposta .league-head-label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pg-aposta .league-flag { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
#pg-aposta .league-head .cols {
    margin-left: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    width: 150px; font-size: 11px; opacity: .85;
}
#pg-aposta .league-head .cols span { text-align: center; }
#pg-aposta .league-chevron { margin-left: 8px; color: rgba(255,255,255,.8); font-size: 12px; flex-shrink: 0; padding: 4px; }

/* Accordion do campeonato: só um aberto por vez no mobile (regra restrita
   ao mobile — o desktop sempre mostra todas as partidas, sem recolher). */
#pg-aposta .league-body { display: none; }
#pg-aposta .league-body.open { display: block; }
@media (min-width: 768px) {
    #pg-aposta .league-body { display: block !important; }
}

/* Linha de jogo: grid de 2 colunas (informações + odds). A coluna de
   informações tem 3 linhas empilhadas (time casa, time fora, data/código);
   a coluna de odds fica alinhada ao TOPO e mostra as 3 cotações lado a lado,
   na mesma linha do primeiro time — nunca acompanhando o segundo time ou a
   data, igual ao layout original da TopBets. */
#pg-aposta .match-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    border-top: 1px solid #ececec; cursor: pointer;
}
#pg-aposta .match-row:hover { background: #fafafa; }
#pg-aposta .match-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; }
#pg-aposta .team { display: flex; align-items: center; gap: 6px; line-height: 1.3; min-width: 0; }
#pg-aposta .crest { width: 18px; height: 18px; border-radius: 50%; background: #eee; border: 1px solid #ddd; flex-shrink: 0; object-fit: cover; }
#pg-aposta .team-name {
    font-size: 12.5px; font-weight: 700; color: #222;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#pg-aposta .match-meta {
    display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #888; margin-top: 1px;
}
#pg-aposta .match-code { font-weight: 800; color: #222; }

#pg-aposta .odds-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    flex-shrink: 0; width: 150px;
}
#pg-aposta .match-odd-btn {
    width: 100%; padding: 7px 2px; text-align: center; border-radius: 5px;
    background: var(--odd-bg); color: #fff; font-weight: 700; font-size: 12.5px; border: 1.5px solid transparent;
    display: flex; align-items: center; justify-content: center;
}
#pg-aposta .match-odd-btn:hover { background: #000; }
#pg-aposta .match-odd-btn.active { background: var(--odd-selected-bg); color: var(--odd-selected-text); border-color: var(--odd-selected-border); }
#pg-aposta .match-odd-btn:focus-visible, #pg-aposta .day-chip:focus-visible,
#pg-aposta .fav-chip:focus-visible, #pg-aposta .league-select-btn:focus-visible, #pg-aposta .btn-generate:focus-visible,
#pg-aposta .btn-clear:focus-visible,
#pg-aposta .league-head a:focus-visible,
.page-aposta .campeonatos a:focus-visible,
.page-aposta .campeonatos button:focus-visible,
.campeonato-picker-item:focus-visible,
.search-clear:focus-visible, .search-go:focus-visible {
    outline: 2px solid var(--cor-secundaria, #d4af37); outline-offset: 2px;
}
#pg-aposta .match-row:focus-within { background: #fafafa; }

@media (max-width: 768px) {
    #pg-aposta .match-row { padding: 8px 14px; gap: 8px; }
    #pg-aposta .crest { width: 18px; height: 18px; }
    #pg-aposta .team-name { font-size: 13px; }
    #pg-aposta .match-meta { font-size: 10.5px; }
    #pg-aposta .odds-row { width: 138px; gap: 5px; }
    #pg-aposta .match-odd-btn { font-size: 12px; padding: 6px 2px; }
    #pg-aposta .league-head .cols { width: 138px; gap: 5px; }
    #pg-aposta .league-head .cols span { font-size: 12px; }
}

@media (max-width: 380px) {
    #pg-aposta .match-row { padding: 7px 10px; gap: 6px; }
    #pg-aposta .team-name { font-size: 12px; }
    #pg-aposta .match-meta { font-size: 10px; gap: 4px; }
    #pg-aposta .odds-row { width: 114px; gap: 4px; }
    #pg-aposta .match-odd-btn { font-size: 10.5px; padding: 6px 1px; }
    #pg-aposta .league-head .cols { width: 114px; gap: 4px; }
    #pg-aposta .league-head .cols span { font-size: 10.5px; }
}

/* Estado vazio */
#pg-aposta .containerBets-semEventos {
    background: #fff; border-radius: 8px; padding: 34px 16px; text-align: center; color: #888; font-size: 13px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ================= CUPOM (ticket) ================= */
#pg-aposta .ticket { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
#pg-aposta .ticket-head { background: var(--cor-primaria, #7a0c14); color: #fff; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; }
#pg-aposta .ticket-head h3 { font-size: 15px; font-weight: 800; margin: 0; }
#pg-aposta .ticket-body { padding: 16px; }
#pg-aposta .ticket-empty { text-align: center; padding: 34px 10px; color: #888; font-size: 12.5px; }
#pg-aposta .ticket-empty .ic { font-size: 24px; display: block; margin-bottom: 8px; color: var(--cor-primaria, #7a0c14); }

#pg-aposta .ticket-item { padding: 9px 0; border-bottom: 1px dashed #e5e0d0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
#pg-aposta .ticket-item .info .m { font-size: 12px; font-weight: 700; color: #222; margin-bottom: 2px; }
#pg-aposta .ticket-item .info .p { font-size: 11px; color: var(--cor-primaria, #7a0c14); font-weight: 700; }
#pg-aposta .ticket-item .odd { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
#pg-aposta .ticket-item .rm { color: #888; font-size: 14px; margin-left: 6px; cursor: pointer; }
#pg-aposta .ticket-item .rm:hover { color: var(--cor-primaria, #7a0c14); }

#pg-aposta .stat-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #ececec; font-size: 12.5px; }
#pg-aposta .stat-row .label { color: #888; }
#pg-aposta .stat-row .value { font-weight: 800; color: var(--cor-primaria, #7a0c14); }
#pg-aposta .stat-row.big .value { font-size: 16px; }

#pg-aposta .ticket-body .field { margin: 12px 0 0; }
#pg-aposta .ticket-body .field label { font-size: 11px; color: #888; font-weight: 700; display: block; margin-bottom: 5px; }
#pg-aposta .ticket-body .field input { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e2e2; border-radius: 7px; font-size: 13.5px; }
#pg-aposta .ticket-body .field input:focus { outline: none; border-color: var(--cor-secundaria, #d4af37); }

/* Aviso de erro visível (não depende só da cor do texto, que pode ficar
   quase invisível quando o tema da banca também é vermelho/escuro) */
#pg-aposta .field-warning {
    display: flex; align-items: flex-start; gap: 6px;
    background: #fdecea; color: #b42318; border: 1px solid #f5c2c0;
    border-radius: 6px; padding: 8px 10px; font-size: 11.5px; font-weight: 600;
    margin-top: 8px; line-height: 1.4;
}
#pg-aposta .field-warning i { margin-top: 1px; flex-shrink: 0; }

#pg-aposta .btn-generate {
    width: 100%; margin-top: 14px; padding: 13px; border-radius: 8px; text-align: center;
    background: var(--cor-primaria, #7a0c14); color: #fff; font-weight: 800; font-size: 13.5px; border: none;
}
#pg-aposta .btn-generate:hover:not(:disabled) { filter: brightness(1.12); }
#pg-aposta .btn-generate:disabled { opacity: .4; cursor: not-allowed; }
#pg-aposta .btn-clear { width: 100%; margin-top: 8px; padding: 10px; text-align: center; background: #f2f2f2; color: #555; font-weight: 700; font-size: 12px; border-radius: 8px; border: none; }
#pg-aposta .age-note { font-size: 10.5px; color: #888; text-align: center; padding: 12px 0 0; display: block; }

@media (min-width: 768px) {
    #pg-aposta .bilhete { position: sticky !important; top: 18px; align-self: flex-start; }
}

/* ================= MODAL "MAIS APOSTAS" ================= */
/* Fundo claro no corpo do modal; cada mercado vira seu proprio card branco
   (sugestao aprovada: extensao da partida, nao uma pagina nova por cima). */
#pg-aposta .modal-cotacoes-sheet .modal-content { border: none; border-radius: 10px; overflow: hidden; background: #f4f5f7; }
#pg-aposta .modal-cotacoes-sheet .modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 12px; border-bottom: 1px solid #ececec; background: #fff; flex-shrink: 0; }
#pg-aposta .modal-cotacoes-sheet .modal-head h3 { font-size: 15px; margin: 0; }
#pg-aposta .modal-cotacoes-sheet .modal-match { margin-top: 6px; }
#pg-aposta .modal-cotacoes-sheet .modal-match-teams { font-size: 15px; font-weight: 800; color: #222; display: flex; align-items: center; gap: 8px; }
#pg-aposta .modal-cotacoes-sheet .modal-match-sep { color: #aaa; font-weight: 400; font-size: 13px; }
#pg-aposta .modal-cotacoes-sheet .modal-match-meta { font-size: 11.5px; color: #888; font-weight: 600; margin-top: 3px; }
#pg-aposta .modal-cotacoes-sheet .modal-close { width: 28px; height: 28px; border-radius: 50%; background: #f2f2f2; display: flex; align-items: center; justify-content: center; color: #666; font-size: 13px; cursor: pointer; flex-shrink: 0; }

#pg-aposta .modal-cotacoes-sheet .modal-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; background: #fff; border-bottom: 1px solid #ececec; flex-shrink: 0; }
#pg-aposta .modal-cotacoes-sheet .modal-search { position: relative; flex: 1; min-width: 160px; }
#pg-aposta .modal-cotacoes-sheet .modal-search .modal-search-ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #999; font-size: 12px; pointer-events: none; }
#pg-aposta .modal-cotacoes-sheet .modal-search input { padding-left: 28px !important; padding-right: 26px !important; border-radius: 8px !important; font-size: 12.5px; }
#pg-aposta .modal-cotacoes-sheet .modal-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: #999; cursor: pointer; font-size: 11px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
#pg-aposta .modal-cotacoes-sheet .modal-search-clear:hover { color: #555; }
#pg-aposta .modal-cotacoes-sheet .modal-expand-toggle {
    font-size: 12px; font-weight: 700; color: var(--cor-primaria, #7a0c14); cursor: pointer;
    white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
#pg-aposta .modal-cotacoes-sheet .modal-expand-toggle i { font-size: 10px; }

/* Só esta área rola — cabeçalho, busca e "expandir todos" ficam fixos */
#pg-aposta .modal-cotacoes-sheet .modal-scroll {
    max-height: calc(100vh - 63px - 63px - 70px); overflow-y: auto;
    padding: 12px 16px 16px; scrollbar-width: thin; scrollbar-color: #ccc transparent;
}
#pg-aposta .modal-cotacoes-sheet .modal-scroll::-webkit-scrollbar { width: 6px; }
#pg-aposta .modal-cotacoes-sheet .modal-scroll::-webkit-scrollbar-track { background: transparent; }
#pg-aposta .modal-cotacoes-sheet .modal-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* Cada mercado é seu próprio card branco arredondado, com respiro entre eles */
#pg-aposta .modal-cotacoes-sheet .modal-group-wrap {
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 12px;
}
#pg-aposta .modal-cotacoes-sheet .modal-group-wrap:last-child { margin-bottom: 0; }
#pg-aposta .modal-cotacoes-sheet .modal-group { display: flex; align-items: center; gap: 8px; background: #fff; padding: 13px 16px; font-size: 12.5px; font-weight: 700; color: #333; cursor: pointer; }
#pg-aposta .modal-cotacoes-sheet .modal-group-name { flex: 1; }
#pg-aposta .modal-cotacoes-sheet .modal-group-count { font-size: 11px; font-weight: 600; color: #888; }
#pg-aposta .modal-cotacoes-sheet .modal-group-chevron { width: 12px; text-align: center; font-size: 11px; color: #aaa; }

/* Accordion animado (200ms ease-out): o conteúdo sempre existe no DOM,
   mas fica com max-height:0 recolhido, entao expandir/recolher anima em
   vez de aparecer/sumir abruptamente. */
#pg-aposta .modal-cotacoes-sheet .modal-group-body {
    max-height: 0; overflow: hidden;
    transition: max-height 200ms ease-out;
}
#pg-aposta .modal-cotacoes-sheet .modal-group-body.open {
    max-height: 1400px;
}

#pg-aposta .modal-cotacoes-sheet .modal-row {
    display: flex; justify-content: space-between; align-items: center; cursor: pointer;
    padding: 12px 16px; background: var(--odd-bg, #1c1c1c); color: #eee; font-size: 13px; border-top: 1px solid #2f2f2f;
}
#pg-aposta .modal-cotacoes-sheet .modal-row-list .modal-row:first-child { border-top: none; }
#pg-aposta .modal-cotacoes-sheet .modal-row .val { color: #8be3a7; font-weight: 800; }
#pg-aposta .modal-cotacoes-sheet .modal-row.active { background: #173d24; }
#pg-aposta .modal-cotacoes-sheet .modal-row.active .val { color: #7be3a0; }

#pg-aposta .modal-cotacoes-sheet .modal-row-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    padding: 12px 16px; background: var(--odd-bg, #1c1c1c);
}
#pg-aposta .modal-cotacoes-sheet .modal-odd-box {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 10px 4px; border-radius: 8px; background: var(--odd-bg, #1c1c1c); cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, .08);
}
#pg-aposta .modal-cotacoes-sheet .modal-odd-box:hover { background: #000; }
#pg-aposta .modal-cotacoes-sheet .modal-odd-box-title { font-size: 11px; color: #ccc; font-weight: 600; }
#pg-aposta .modal-cotacoes-sheet .modal-odd-box-val { font-size: 15px; color: #8be3a7; font-weight: 800; }
#pg-aposta .modal-cotacoes-sheet .modal-odd-box.active { background: var(--odd-selected-bg); border-color: var(--odd-selected-border); }
#pg-aposta .modal-cotacoes-sheet .modal-odd-box.active .modal-odd-box-title,
#pg-aposta .modal-cotacoes-sheet .modal-odd-box.active .modal-odd-box-val { color: var(--odd-selected-text); }

#pg-aposta .modal-cotacoes-sheet .modal-empty { padding: 40px 16px; text-align: center; color: #888; font-size: 13px; background: #fff; }

/* Mobile (<768px): continua o bottom sheet já existente, sem nenhuma das
   mudanças de tamanho/posição de desktop abaixo. */
@media (max-width: 768px) {
    #pg-aposta .modal-cotacoes-sheet .modal-dialog { margin: 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: 100%; }
    #pg-aposta .modal-cotacoes-sheet .modal-content { border-radius: 16px 16px 0 0; max-height: 85vh; }
}

/* Desktop/tablet/notebook: modal menor, centralizado, com respiro nas
   quatro bordas — nunca mais de ~78% da altura da tela. Só o corpo de
   mercados rola; cabeçalho, busca e "expandir todos" ficam fixos. */
@media (min-width: 768px) {
    #pg-aposta .modal-cotacoes-sheet .modal-dialog {
        display: flex; align-items: center; min-height: calc(100% - 3.5rem);
        margin: 1.75rem auto; width: 90vw; max-width: 90vw;
    }
    #pg-aposta .modal-cotacoes-sheet .modal-content {
        max-height: 78vh; border-radius: 14px;
        display: flex; flex-direction: column; width: 100%;
    }
    #pg-aposta .modal-cotacoes-sheet .modal-head { padding: 24px 24px 16px; }
    #pg-aposta .modal-cotacoes-sheet .modal-toolbar { padding: 16px 24px; }
    #pg-aposta .modal-cotacoes-sheet .modal-scroll {
        flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto;
        padding: 16px 24px 24px;
    }
}

@media (min-width: 992px) {
    #pg-aposta .modal-cotacoes-sheet .modal-dialog { width: 700px; max-width: 700px; }
}

@media (min-width: 1200px) {
    #pg-aposta .modal-cotacoes-sheet .modal-dialog { width: 760px; max-width: calc(100vw - 80px); }
}

/* ================= SIDEBAR (restyle em cima das classes já existentes) ================= */
.page-aposta .sidebar-logo { background: #fff; border-radius: 10px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 12px; }
.page-aposta .campeonatos > .sidebar-links a.menuSingle,
.page-aposta .campeonatos > ul > li > a {
    background: #fff !important; color: #222 !important; font-weight: 700; font-size: 13px;
    border-radius: 9px !important; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 6px;
}
.page-aposta .campeonatos > .sidebar-links a.menuSingle:hover,
.page-aposta .campeonatos > ul > li > a:hover { background: #faf6ea !important; }
.page-aposta .campeonatos > .sidebar-links a.menuSingle.active,
.page-aposta .campeonatos > ul > li > a.active {
    background: var(--cor-primaria, #7a0c14) !important; color: #fff !important;
}
.page-aposta .campeonatos .submenu-campeonatos li a { background: #fff; border-radius: 7px; font-weight: 600; font-size: 12.5px; box-shadow: 0 1px 2px rgba(0,0,0,.04); margin-bottom: 5px; }
.page-aposta .campeonatos .submenu-destaques li a { background: #fdf6e0; border: 1px solid #f0e0a8; font-weight: 700; }
.page-aposta .campeonatos .submenu-destaques .submenu-dot.star { color: var(--cor-secundaria, #d4af37); }

/* Wrapper de rolagem própria da sidebar (era style inline max-height:760px;
   overflow:auto — só existe no desktop, pois esse bloco inteiro é
   d-none d-md-block no mobile). Mantido como classe pra poder virar sticky
   no modo "fiel à referência" abaixo, sem duplicar comportamento. */
.sidebar-scroll-wrap { max-height: 760px; overflow: auto; }

/* Coluna de horário dedicada na partida (Horário | Times | Odds), usada só
   no desktop "fiel à referência" (ver bloco @media abaixo). Escondida por
   padrão pra não afetar o layout mobile/compacto já validado. */
#pg-aposta .match-time { display: none; }

/* Nome da banca ao lado do logo no menu mobile */
.menu-mobile-brand { color: #fff; font-weight: 800; font-size: 16px; }

/* =========================================================================
   DESKTOP "FIEL À REFERÊNCIA" (>=768px, só na tela de apostar)
   Ajustes estruturais pedidos com base num HTML de referência: shell
   central com largura máxima, sidebar/cupom mais leves (cards brancos no
   fundo claro da página, sem faixa vinho contínua), cabeçalho de liga na
   cor da marca, coluna de horário dedicada e rolagem NATURAL da página
   (sidebar e cupom sticky) em vez da janela de rolagem interna que a
   lista tinha. Tudo escopado a body.bets-reference-page + min-width:768px
   pra não tocar no mobile nem em nenhuma outra página do site.
   ========================================================================= */
@media (min-width: 768px) {

    /* .app tem overflow:hidden (pra cortar o border-radius do card antigo),
       mas isso quebra position:sticky de qualquer descendente (sidebar e
       cupom). Nesta página o border-radius já foi zerado, entao o clip nao
       faz falta — liberamos o overflow pra sticky voltar a funcionar. */
    body.bets-reference-page .app {
        overflow: visible;
    }

    /* .page-aposta tem align-items:flex-start, entao a coluna da sidebar
       (1o filho da linha externa) só fica tao alta quanto o proprio
       conteudo — sem "espaco" pra o sticky rolar junto com a lista de
       jogos (bem mais alta, na coluna do meio). Esticamos só essa coluna
       pra acompanhar a altura da linha; o conteudo visivel dela continua
       controlado pelo sticky + max-height do .sidebar-scroll-wrap. */
    body.bets-reference-page .page-aposta > div:first-child {
        align-self: stretch;
    }

    /* Shell central com largura máxima, centralizado (antes esticava até a
       borda da tela em monitores largos) */
    body.bets-reference-page .app-container {
        max-width: 1400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Topbar: barra sólida da cor da marca, compacta, em vez do card de
       vidro escuro — logo/texto reais preservados, só a composição muda */
    body.bets-reference-page .site-topbar {
        padding: 0 !important;
        margin-bottom: 14px;
    }
    body.bets-reference-page .site-topbar-inner {
        background: var(--cor-primaria, #7a0c14) !important;
        border: none; border-radius: 8px; box-shadow: none; backdrop-filter: none;
        padding: 11px 24px;
    }
    body.bets-reference-page .site-eyebrow { display: none; }
    body.bets-reference-page .site-logo { max-height: 26px; }
    body.bets-reference-page .site-brand-copy strong { font-size: 15px; letter-spacing: .03em; }

    /* Sidebar: tira a faixa vinho contínua, os cards brancos ficam direto
       no fundo claro da página, como na referência */
    body.bets-reference-page .page-aposta .campeonatos {
        background: transparent !important;
        box-shadow: none !important; border: none !important;
    }
    body.bets-reference-page .page-aposta .campeonatos ul li.pais {
        background: transparent !important;
    }
    body.bets-reference-page .page-aposta .campeonatos .title {
        background: #fff; color: var(--cor-primaria, #7a0c14);
        border-radius: 9px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
    }

    /* Sidebar sticky com rolagem própria só quando exceder a viewport */
    body.bets-reference-page .sidebar-scroll-wrap {
        position: sticky; top: 18px; align-self: flex-start;
        max-height: calc(100vh - 36px); overflow-y: auto;
    }

    /* Cabeçalho de liga na cor da marca (era navy fixo) */
    body.bets-reference-page #pg-aposta .league-head {
        background: var(--cor-primaria, #7a0c14);
    }

    /* Coluna de horário dedicada, escondendo a data duplicada na linha de
       meta (que fica só com o "+N" de mercados extras) */
    body.bets-reference-page #pg-aposta .match-time {
        display: block; width: 54px; flex-shrink: 0;
        font-size: 11.5px; color: #888; font-weight: 600; line-height: 1.4;
    }
    body.bets-reference-page #pg-aposta .match-date-inline { display: none; }
    body.bets-reference-page #pg-aposta .match-row { align-items: center; }

    /* Rolagem natural da página: tira a janela de rolagem interna da lista
       de jogos — o conteúdo cresce naturalmente e quem rola é o body */
    body.bets-reference-page .page-aposta .overflow-jogos {
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: visible !important;
        padding-right: 0 !important;
    }

    /* Cupom um pouco mais estreito, igual à referência (a regra antiga de
       320px usa !important, entao precisa bater aqui tambem) */
    body.bets-reference-page .page-aposta .bilhete { width: 300px !important; }
}

/* ================= MOBILE: busca/filtros/bottom sheets ================= */

/* Busca principal: botão de limpar */
#pg-aposta .searchEvent { position: relative; }
#pg-aposta .search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: #999; cursor: pointer; width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
#pg-aposta .search-clear:hover { color: #555; }

/* Busca + filtros grudados no topo ao rolar (só mobile).
   Nota: testado com position:sticky nesse container e o espaço reservado
   no fluxo normal não batia com a altura real renderizada (bug de layout
   confirmado via offsetTop/offsetHeight, específico dessa combinação),
   sobrepondo o primeiro campeonato da lista. A própria especificação
   pede pra só aplicar sticky quando não causar esse tipo de conflito —
   optei por manter a rolagem normal (não fixo) em vez de arriscar a
   sobreposição em produção. */

/* Linha com os dois botões de filtro (período + campeonatos) */
#pg-aposta .mobile-filter-row {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px; margin-bottom: 12px;
}
#pg-aposta .mobile-filter-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    background: #fff; padding: 10px 12px; border-radius: 8px; min-height: 40px;
    font-size: 12.5px; font-weight: 700; color: #222; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: none;
}
#pg-aposta .mobile-filter-btn i { color: var(--cor-secundaria, #d4af37); flex-shrink: 0; font-size: 11px; }
#pg-aposta .mobile-filter-btn-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bottom sheets (período / campeonatos) */
#pg-aposta .mobile-sheet-backdrop {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.4); z-index: 1040;
}
#pg-aposta .mobile-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
    background: #fff; border-radius: 14px 14px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    max-height: 80vh; display: flex; flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
#pg-aposta .mobile-sheet.mobile-sheet-tall { max-height: 86vh; }
#pg-aposta .mobile-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 16px 12px; border-bottom: 1px solid #ececec; flex-shrink: 0;
}
#pg-aposta .mobile-sheet-head h3 { font-size: 15px; margin: 0; font-weight: 800; }
#pg-aposta .mobile-sheet-close {
    width: 28px; height: 28px; border-radius: 50%; background: #f2f2f2;
    display: flex; align-items: center; justify-content: center; color: #666; font-size: 13px; cursor: pointer;
}
#pg-aposta .mobile-sheet-tabs { display: flex; gap: 4px; padding: 10px 16px 0; flex-shrink: 0; }
#pg-aposta .mobile-sheet-tab {
    flex: 1; padding: 10px 0; text-align: center; font-size: 12.5px; font-weight: 700;
    color: #888; background: none; border: none; border-bottom: 2px solid transparent;
}
#pg-aposta .mobile-sheet-tab.active { color: var(--cor-primaria, #7a0c14); border-bottom-color: var(--cor-primaria, #7a0c14); }
#pg-aposta .mobile-sheet-body { overflow-y: auto; padding: 12px 16px 20px; flex: 1 1 auto; min-height: 0; }
#pg-aposta .mobile-sheet-search { margin-bottom: 10px; border-radius: 8px !important; }

#pg-aposta .mobile-sheet-option {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 13px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: #222; cursor: pointer;
    min-height: 44px;
}
#pg-aposta .mobile-sheet-option:hover { background: #f7f7f7; }
#pg-aposta .mobile-sheet-option.active { background: var(--cor-primaria, #7a0c14); color: #fff; }
#pg-aposta .mobile-sheet-option-count { font-size: 11.5px; color: inherit; opacity: .75; white-space: nowrap; }

/* Itens do picker de campeonato dentro do bottom sheet (favoritos/destaque/país) */
#pg-aposta .campeonato-picker-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pg-aposta .campeonato-picker-fav {
    color: #ccc; font-size: 15px; padding: 6px; margin: -6px; flex-shrink: 0;
}
#pg-aposta .campeonato-picker-fav.active { color: var(--cor-secundaria, #d4af37); }
#pg-aposta .campeonato-picker-item.active .campeonato-picker-fav { color: #fff; }
#pg-aposta .campeonato-picker-item.active .campeonato-picker-fav.active { color: var(--cor-secundaria, #f2d98a); }
#pg-aposta .campeonato-picker-item { min-height: 44px; }

#pg-aposta .campeonato-picker-pais-toggle {
    display: flex; align-items: center; gap: 8px; padding: 10px 6px; font-size: 13px; font-weight: 700;
    color: #333; cursor: pointer; border-top: 1px solid #eee;
}
#pg-aposta .campeonato-picker-pais-toggle img { width: 18px; height: 18px; border-radius: 50%; }
#pg-aposta .campeonato-picker-pais-toggle i { margin-left: auto; color: #999; font-size: 11px; }
#pg-aposta .campeonato-picker-arrow { margin-left: auto; color: #ccc; font-size: 11px; }
#pg-aposta .campeonato-picker-back {
    display: flex; align-items: center; gap: 8px; padding: 10px 6px; font-size: 13px; font-weight: 700;
    color: var(--cor-primaria, #7a0c14); cursor: pointer; margin-bottom: 6px;
}

/* Estado vazio do cupom */
#pg-aposta .ticket-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#pg-aposta .ticket-empty strong { font-size: 13.5px; color: #333; }
#pg-aposta .ticket-empty-sub { font-size: 12px; color: #888; }

@media (max-width: 768px) {
    #pg-aposta .mobile-sheet-body { max-height: calc(80vh - 60px); }
    #pg-aposta .mobile-sheet.mobile-sheet-tall .mobile-sheet-body { max-height: calc(86vh - 100px); }
}

/* ================= MOBILE: refinamentos de revisão de UX ================= */
@media (max-width: 768px) {

    /* 1) Título do dia menos dominante (~15% menor, peso mais leve) */
    #pg-aposta .bets-reference-head .dateEvent h1 {
        font-size: 20px !important; font-weight: 700 !important; line-height: 1.15 !important;
    }
    #pg-aposta .bets-reference-head .dateEvent span { font-size: 12.5px !important; }

    /* 2) Busca mais baixa */
    #pg-aposta .bets-reference-head .searchEvent input { height: 48px !important; }

    /* 3) Botões de filtro (período/campeonatos) um pouco mais baixos */
    #pg-aposta .mobile-filter-btn { padding: 8px 12px; min-height: 36px; }

    /* 8) Reordena: busca -> filtros -> título (a busca é o que o usuário
       procura primeiro; o título do dia vira um rótulo de contexto, não
       o destaque da tela). .dateEventAndSearch vira "transparente" pro
       layout (display:contents) só aqui, entao dateEvent/searchEvent
       passam a ser itens diretos do mesmo flex de .bets-reference-head
       junto com .mobile-filter-row, permitindo reordenar os três com
       "order" sem duplicar nada no HTML. Desktop não é afetado — lá
       .dateEventAndSearch continua com display:flex normal (título e
       busca na mesma linha), inalterado. */
    #pg-aposta .bets-reference-head { display: flex; flex-direction: column; }
    #pg-aposta .bets-reference-head .dateEventAndSearch { display: contents; }
    #pg-aposta .bets-reference-head .searchEvent { order: 1; padding-bottom: 10px; }
    #pg-aposta .bets-reference-head .mobile-filter-row { order: 2; }
    #pg-aposta .bets-reference-head .dateEvent { order: 3; padding: 4px 0 10px; }
}

/* 5) Badge "+N" vira uma pill compacta, sem o texto "mercados" */
#pg-aposta .match-code {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cor-primaria, #7a0c14); color: #fff; font-weight: 800;
    font-size: 10px; padding: 2px 6px; border-radius: 100px; line-height: 1.4;
}

/* 7) "Ver cupom" com mais destaque (é o CTA principal do rodapé). Fica fora
   de #pg-aposta (vem do header.twig, não do apostar.twig), por isso sem
   esse prefixo. */
.cupom-bottom-sheet-btn { flex: 1.6; }
