/* =====================================================================
   V88 - A NAVEGAÇÃO NOVA

   O dono mandou prints do celular: os menus "fora de padrão, feios, ficam
   cortados na tela, praticamente nem consigo rolar para baixo".

   A CAUSA DO CORTE: a barra de cima tem efeito de vidro (backdrop-filter).
   Esse efeito faz qualquer coisa "fixa" dentro dela ficar presa à barra -
   o menu não passava da altura da barra e não rolava.

   O QUE MUDA
     Celular:
       - no topo: logotipo, botão da loteria e botão do perfil;
       - embaixo: a barra de navegação (Início, Analisar, Montar jogos,
         Meus jogos, Mais), no alcance do polegar, com letra legível;
       - os menus abrem DE BAIXO PARA CIMA, na largura da tela, com
         rolagem própria e fundo escurecido (tocar fora fecha).
     Computador:
       - menus com rolagem quando a lista é maior que a tela;
       - o mesmo desenho de item em todos os menus.
   ===================================================================== */

/* ---------------- a marca ---------------- */
.brand-v88 { gap: 10px; }
.brand-logo { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; box-shadow: 0 8px 20px rgba(111, 42, 168, .25); }
.brand-v88 strong { font-size: 16px; letter-spacing: -.02em; color: #1b1426; text-transform: none; }
.brand-radar { color: #6f2aa8; font-weight: 900; }
.brand-v88 small { font-size: 12px; }

/* ---------------- o perfil ---------------- */
.menu-perfil { margin-left: 6px; }
.menu-perfil > summary::after { display: none !important; }
.menu-perfil > summary.perfil-botao {
  list-style: none; cursor: pointer; display: grid !important; place-items: center; flex-direction: row;
  width: 46px !important; height: 46px !important; min-height: 0 !important; padding: 0 !important;
  border: 0 !important; background: transparent !important; border-radius: 50% !important;
}
.perfil-botao::-webkit-details-marker { display: none; }
.perfil-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #8a3fd0, #3b1266); color: #fff; font-weight: 900; font-size: 17px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e6d8f3;
}
.perfil-avatar.grande { width: 52px; height: 52px; font-size: 22px; box-shadow: none; }
.menu-perfil[open] .perfil-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #6f2aa8; }
.perfil-popover { width: 340px; }
.perfil-cabeca { display: flex; align-items: center; gap: 12px; padding: 6px 6px 12px; }
.perfil-cabeca b { display: block; font-size: 17px; }
.perfil-cabeca small { display: block; font-size: 13px; color: #6e6679; overflow-wrap: anywhere; }
.perfil-plano { margin: 0 4px 12px; padding: 12px 14px; border-radius: 16px; background: #f4ecfb; display: grid; gap: 4px; }
.perfil-plano.vitalicio { background: #e6f6ee; }
.perfil-plano.atencao, .perfil-plano.pendente { background: #fff4da; }
.perfil-plano-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.perfil-plano-topo span { font-size: 16px; font-weight: 900; color: #1b1426; }
.perfil-plano-topo em { font-style: normal; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #6f2aa8; }
.perfil-plano.vitalicio .perfil-plano-topo em { color: #177a4c; }
.perfil-plano.atencao .perfil-plano-topo em, .perfil-plano.pendente .perfil-plano-topo em { color: #946400; }
.perfil-plano p { margin: 0; font-size: 14px; color: #2b2436; }
.perfil-trilho { height: 8px; border-radius: 999px; background: rgba(0, 0, 0, .08); overflow: hidden; margin-top: 4px; }
.perfil-trilho i { display: block; height: 100%; border-radius: 999px; background: #6f2aa8; }
.perfil-numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 4px 10px; }
.perfil-numeros a { display: grid; justify-items: center; gap: 1px; padding: 10px 4px; border-radius: 14px; border: 1px solid #efe9f4; text-decoration: none; color: #1b1426; text-align: center; }
.perfil-numeros b { font-size: 20px; font-weight: 900; }
.perfil-numeros small { font-size: 11px; color: #6e6679; line-height: 1.25; }
.perfil-renovar { display: block; margin: 0 4px 10px; padding: 12px; border-radius: 14px; background: #6f2aa8; color: #fff; text-align: center; font-weight: 800; text-decoration: none; }
.perfil-links form { margin: 0; }
.perfil-sair { color: #b42f34; }

/* ---------------- itens de menu: um desenho só ---------------- */
.menu-topo-popover, .game-menu-popover { scrollbar-width: thin; overscroll-behavior: contain; }
.folha-titulo { display: none !important; }
.nav-inicio { display: none !important; }
.folha-fundo { display: none; }

@media (min-width: 761px) {
  .menu-topo-popover, .game-menu-popover { max-height: calc(100vh - 110px); overflow-y: auto; }
  .game-menu-mobile { display: none !important; }
}

/* =====================================================================
   CELULAR
   ===================================================================== */
@media (max-width: 760px) {
  /* o efeito de vidro prendia o menu dentro da barra */
  /* z-index 100: a barra (e as folhas dentro dela) fica acima do fundo escurecido (99) */
  .topbar { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: #fff !important; z-index: 100 !important; }
  .topbar-inner { min-height: 64px !important; flex-wrap: nowrap !important; gap: 8px !important; padding: 8px 0; }
  .topbar-inner > .topbar-main { display: flex !important; align-items: center; gap: 8px; flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; min-width: 0; }
  .brand-v88 { display: flex !important; flex: 1 1 auto !important; min-width: 0; }
  .brand-v88 > span { min-width: 0; }
  .brand-logo { width: 40px !important; height: 40px !important; flex: 0 0 40px !important; }
  .brand-v88 strong { font-size: 15px !important; max-width: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-v88 small { display: block !important; font-size: 12px; color: #6e6679; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* o botão da loteria: um "chip" com a sigla na cor dela */
  .game-menu { flex: 0 0 auto; }
  .game-menu > summary { list-style: none; }
  .game-menu > summary::-webkit-details-marker { display: none; }
  .game-menu-desktop { display: none !important; }
  .game-menu-mobile {
    display: inline-flex !important; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 6px;
    border-radius: 999px; border: 1.5px solid #e6d8f3; background: #fff; font-size: 14px; font-weight: 900;
  }
  .game-menu-mobile i {
    font-style: normal; min-width: 32px; height: 32px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center;
    background: var(--dot, #6f2aa8); color: #fff; font-size: 12px;
  }
  .game-menu-mobile b { font-size: 14px; color: #6e6679; }

  /* ---------- a barra de baixo ---------- */
  .top-actions,
  .top-actions.with-account,
  .top-actions.with-admin,
  .game-theme-portal .top-actions {
    position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 70;
    display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none !important;
    gap: 0 !important; width: 100% !important; margin: 0 !important;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff; border-top: 1px solid #ece4f3; box-shadow: 0 -8px 24px rgba(27, 20, 38, .08);
  }
  .nav-inicio { display: flex !important; }
  .top-actions .icon-btn,
  .top-actions .repeat-nav,
  .top-actions .menu-topo > summary {
    width: 100% !important; min-height: 54px !important; padding: 4px 2px !important; border: 0 !important;
    background: transparent !important; box-shadow: none !important; border-radius: 14px !important;
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #4f475c !important; text-decoration: none;
  }
  .top-actions .icon-btn > span, .top-actions .repeat-nav > span { font-size: 21px; line-height: 1; }
  .top-actions > a small, .top-actions > .menu-topo > summary small { display: block !important; font-size: 11.5px !important; font-weight: 800 !important; letter-spacing: 0 !important; color: inherit; white-space: nowrap; }
  .top-actions .menu-topo-popover small { font-weight: 500 !important; color: #6e6679 !important; white-space: normal !important; }
  .top-actions .menu-topo { width: 100%; }
  .top-actions .menu-topo[open] > summary,
  .nav-inicio.ativo { background: #f4ecfb !important; color: #6f2aa8 !important; }
  .top-actions .menu-topo > summary::after { display: none !important; }
  .menu-topo-bolinha { top: 6px !important; right: calc(50% - 18px) !important; }
  .mj-sino .mj-sino-numero, .mj-sino b { position: absolute; top: 2px; right: calc(50% - 22px); }

  /* o conteúdo não pode ficar escondido atrás da barra de baixo */
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }

  /* ---------- os menus viram folhas que sobem de baixo ---------- */
  .menu-topo-popover,
  .menu-topo-popover.direita,
  .game-menu-popover {
    position: fixed !important; top: auto !important; left: 0 !important; right: 0 !important;
    bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important; max-width: none !important; min-width: 0 !important;
    max-height: calc(100dvh - 150px) !important; overflow-y: auto !important;
    padding: 22px 14px 14px !important; margin: 0 !important;
    border: 0 !important; border-radius: 24px 24px 0 0 !important;
    background: #fff !important; box-shadow: 0 -18px 50px rgba(26, 9, 48, .25) !important;
    z-index: 90 !important;
    animation: folha-subir .22s cubic-bezier(.2, .8, .2, 1) both;
  }
  /* o perfil e a loteria abrem do topo? Não: todas as folhas sobem de baixo,
     mas estas duas cobrem também a barra de baixo */
  .menu-perfil .menu-topo-popover, .game-menu-popover { bottom: 0 !important; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important; max-height: calc(100dvh - 70px) !important; z-index: 95 !important; }
  .menu-topo-popover::before, .game-menu-popover::before {
    content: ""; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px;
    border-radius: 999px; background: #ddd3e8;
  }
  .folha-titulo { display: block !important; font-size: 13px !important; letter-spacing: .08em !important; color: #1b1426 !important; padding: 4px 8px 8px !important; }
  @keyframes folha-subir { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

  .menu-topo-item, .game-menu-popover a {
    min-height: 60px; padding: 10px 10px !important; border-radius: 14px !important; gap: 12px !important;
  }
  .menu-topo-item > i { width: 42px !important; height: 42px !important; border-radius: 13px !important; font-size: 19px !important; }
  .menu-topo-item b, .game-menu-popover a b { font-size: 16px !important; }
  .menu-topo-item small, .game-menu-popover a small { font-size: 13px !important; line-height: 1.35; }
  .menu-topo-titulo:not(.folha-titulo) { font-size: 12px !important; padding: 12px 10px 4px !important; }

  /* o fundo escurecido atrás da folha */
  .folha-fundo {
    display: block; position: fixed; inset: 0; z-index: 99; background: rgba(16, 10, 19, .5);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  html.folha-aberta .folha-fundo { opacity: 1; pointer-events: auto; }
  html.folha-aberta, html.folha-aberta body { overflow: hidden; }
  html.folha-aberta .ex-botao { display: none !important; }

  /* o botão "Como usar esta tela" sobe para cima da barra de baixo */
  .ex-botao { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }

  .perfil-popover { width: auto !important; }
  .perfil-botao { width: 44px; height: 44px; }
  .perfil-avatar { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-topo-popover, .game-menu-popover { animation: none !important; }
}

.so-celular { display: none; }
@media (max-width: 760px) { .so-computador { display: none !important; } .so-celular { display: inline !important; } }

/* o perfil herdava "menu ocupa a largura toda" (menu-topo.css) e empurrava o logotipo */
.topbar-main > .menu-perfil { width: auto !important; flex: 0 0 auto !important; }
@media (max-width: 760px) {
  .top-actions small span { font-size: inherit !important; font-weight: inherit !important; line-height: inherit; }
}

/* V92 - a faixa do teste gratis e as telas de limite/cadeado */
.teste-gratis-faixa { background: #f4ecfb; border: 1px solid #e2cff3; color: #3b1266; }
.teste-gratis-faixa a { font-weight: 800; color: #6f2aa8; }
.tg-parede .tg-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.vv-link-teste { display: block; margin-top: 10px; text-align: center; font-weight: 700; }
