/* O TESTE GRATIS EM TELA CHEIA da pagina de vendas F (so ela).
   Ver `static/js/vendas_pcba_f_teste_overlay.js`. A camada cobre a viewport
   inteira (nao e um modal centralizado): uma barra fina com a marca e a saida,
   e o teste REAL (`/teste-gratis/?...&embed=1`, o proprio `core/feed.html`)
   num iframe que ocupa o resto. A pagina de vendas fica parada por baixo. */

.fxt {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* acima do cabecalho, da faixa da promocao e da barra fixa */
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: #1865f2; /* o azul da marca: e a cor do circulo que nasce no botao */
  color: #fff;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}
.fxt[hidden] { display: none !important; }

/* A expansao circular. O `clip-path` e escrito pelo JS (centro = o botao). */
.fxt--animando { transition: clip-path 600ms cubic-bezier(.65, 0, .35, 1); will-change: clip-path; }

.fxt__barra {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(14px + env(safe-area-inset-left));
  background: #060c1b;
  touch-action: none; /* arrastar a barra nao rola a pagina de tras (iOS) */
}
.fxt__marca { display: flex; align-items: center; min-width: 0; color: #fff; text-decoration: none; }
.fxt__marca svg, .fxt__marca img { max-height: 26px; width: auto; }
/* Celular estreito: o botao de saida tem prioridade; o logo fica so com o simbolo. */
@media (max-width: 440px) { .fxt__marca .fxm-logo__texto { display: none; } }
.fxt__fechar {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #060c1b;
  font: 700 14px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.fxt__fechar svg { width: 16px; height: 16px; }
.fxt__fechar:focus-visible { outline: 3px solid #7fb0ff; outline-offset: 2px; }

.fxt__palco { position: relative; flex: 1 1 auto; min-height: 0; }

/* Enquanto o teste carrega: so a marca numa superficie limpa (nada de feed falso). */
.fxt__carregando {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font: 600 15px/1.4 Inter, system-ui, sans-serif;
  color: rgba(255, 255, 255, .9);
}
.fxt__pontos { display: flex; gap: 8px; }
.fxt__pontos i { width: 9px; height: 9px; border-radius: 50%; background: #fff; opacity: .35; animation: fxt-ponto 1s infinite ease-in-out; }
.fxt__pontos i:nth-child(2) { animation-delay: .15s; }
.fxt__pontos i:nth-child(3) { animation-delay: .3s; }
@keyframes fxt-ponto { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* O teste de verdade. Sem margem em volta: ocupa o palco inteiro, e a borda de
   baixo respeita a area segura do iPhone. Aparece com um fade curto quando o
   circulo ja cobriu a tela E o iframe terminou de carregar. */
.fxt__iframe {
  position: absolute;
  inset: 0 0 env(safe-area-inset-bottom) 0;
  width: 100%;
  height: calc(100% - env(safe-area-inset-bottom));
  border: 0;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease;
}
.fxt--pronto .fxt__palco { background: #fff; }
.fxt--pronto .fxt__iframe { opacity: 1; visibility: visible; }
.fxt--pronto .fxt__carregando { visibility: hidden; }

/* POR QUE FECHOU: folha no rodape da pagina, depois que a camada fecha. */
.fxm-motivo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000; display: flex; justify-content: center; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.fxm-motivo__caixa { width: 100%; max-width: 420px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px rgba(20, 20, 43, .08), 0 18px 48px -12px rgba(6, 12, 27, .45); pointer-events: auto; transform: translateY(calc(100% + 24px)); transition: transform .25s ease; font-family: inherit; }
.fxm-motivo--aberta .fxm-motivo__caixa { transform: none; }
.fxm-motivo__caixa:focus { outline: none; }
.fxm-motivo__nome { display: block; margin-bottom: 3px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #1865f2; }
.fxm-motivo__titulo { margin: 0 0 12px; font-size: 16px; font-weight: 700; line-height: 1.35; color: #14142b; }
.fxm-motivo__opcoes { display: grid; gap: 8px; }
.fxm-motivo__opcoes[hidden] { display: none; }
.fxm-motivo__opcao { display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid #d7dee7; border-radius: 12px; background: #fff; color: #14142b; font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.fxm-motivo__opcao:hover, .fxm-motivo__opcao:focus-visible { border-color: #1865f2; color: #1865f2; outline: none; }
.fxm-motivo__pular { display: block; margin: 10px auto 0; padding: 6px 12px; border: 0; background: none; color: #424655; font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fxm-motivo__pular[hidden] { display: none; }

/* Sem movimento: nada de circulo, so um fade curto. */
@media (prefers-reduced-motion: reduce) {
  .fxt--animando { transition: opacity 120ms linear; }
  .fxt__pontos i { animation: none; opacity: .8; }
  .fxt__iframe { transition: none; }
  .fxm-motivo__caixa { transition: none; }
}
