/**
 * Modal de vídeo dos anúncios (gl-video-modal.js), compartilhada entre
 * /site, /site-agenda e /site-catalogo. Usa as cores das landings estáticas
 * (--navy, --blue, --green) com fallback, porque a home não as define.
 */

/* Acima do cabeçalho fixo e do botão flutuante do WhatsApp (z-index 1100)
   das landings; a classe no body é posta pelo script enquanto a modal está aberta. */
.glv-modal {
  z-index: 1210;
}
body.glv-aberta .modal-backdrop {
  z-index: 1200;
}

.glv-modal .modal-content {
  position: relative;
  border: none;
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}

.glv-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.glv-close:hover {
  background: #dc2626;
}
.glv-close[hidden],
.glv-trava[hidden],
.glv-som[hidden] {
  display: none;
}

/* Contagem regressiva no lugar do X até o vídeo liberar o fechamento. */
.glv-trava {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Botão "Toque para ouvir" sobre o vídeo, enquanto ele toca mudo. */
.glv-som {
  position: absolute;
  left: 50%;
  bottom: 16%;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  animation: glv-pulso 1.8s ease-in-out infinite;
}
.glv-som:hover {
  background: rgba(15, 23, 42, 0.95);
}
@keyframes glv-pulso {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .glv-som { animation: none; }
}

.glv-etapa {
  padding: 2.1rem 2rem 1.9rem;
}
/* Espaço acima do título para a contagem / X vermelho não encostar nele. */
.glv-etapa-video {
  padding-top: 3rem;
}

.glv-head {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0 1.5rem;
}
.glv-head h4 {
  font-weight: 700;
  color: var(--navy, #202d4d);
  margin-bottom: 0.35rem;
}
.glv-head p {
  color: #64748b;
  margin: 0;
  font-size: 0.95rem;
}

.glv-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green, #20b86a), #16a34a);
  color: #fff;
  font-size: 1.7rem;
  margin-bottom: 0.9rem;
}

/* Player 16:9 */
.glv-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #0f172a;
}
.glv-player iframe,
.glv-player-alvo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Tela de fim do vídeo: cobre os vídeos sugeridos do YouTube. */
.glv-fim {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  text-align: center;
}
.glv-fim[hidden] {
  display: none;
}
.glv-fim p {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}
.glv-rever {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
}
.glv-rever:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Botões */
.glv-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.glv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.glv-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.glv-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}
.glv-btn-trial {
  background: var(--blue, #5064f7);
  color: #fff;
  box-shadow: 0 10px 24px rgba(80, 100, 247, 0.3);
}
.glv-btn-trial:hover {
  color: #fff;
}
.glv-btn-esp {
  background: var(--green, #20b86a);
  color: #fff;
  box-shadow: 0 10px 24px rgba(32, 184, 106, 0.28);
}
.glv-btn-neutro {
  background: #f1f5f9;
  color: #334155;
}

/* Formulário */
.glv-voltar {
  border: none;
  background: none;
  color: #64748b;
  font-size: 0.9rem;
  padding: 0;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.glv-voltar:hover {
  color: var(--navy, #202d4d);
}
.glv-form {
  max-width: 460px;
  margin: 0 auto;
}
.glv-campo {
  margin-bottom: 0.9rem;
}
.glv-campo label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy, #202d4d);
  margin-bottom: 0.3rem;
}
.glv-campo label span {
  font-weight: 400;
  color: #94a3b8;
}
.glv-campo input,
.glv-campo textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.glv-campo textarea {
  resize: vertical;
}
.glv-campo input:focus,
.glv-campo textarea:focus {
  outline: none;
  border-color: var(--blue, #5064f7);
  box-shadow: 0 0 0 3px rgba(80, 100, 247, 0.15);
}
.glv-campo .is-invalid {
  border-color: #ef4444;
}

/* Perguntas de múltipla escolha: cards (urgência) e opções (rádios). */
.glv-grupo {
  border: none;
  padding: 0;
  min-width: 0;
}
.glv-grupo legend {
  float: none;
  width: auto;
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy, #202d4d);
  margin-bottom: 0.4rem;
  padding: 0;
}
.glv-grupo legend span {
  font-weight: 400;
  color: #94a3b8;
}
.glv-card input,
.glv-opcao input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.glv-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.glv-card {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.glv-card-corpo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 100%;
  min-height: 86px;
  padding: 0.75rem 0.4rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  color: #334155;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: center;
  line-height: 1.2;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.glv-card-corpo > i {
  font-size: 1.6rem;
  color: var(--blue, #5064f7);
}
/* Check no canto do card marcado, como no onboarding do app. */
.glv-card-check {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue, #5064f7);
  color: #fff;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
}
.glv-card input:checked + .glv-card-corpo .glv-card-check {
  display: flex;
}
.glv-card:hover .glv-card-corpo {
  border-color: #c7d2fe;
}
.glv-card input:checked + .glv-card-corpo {
  border-color: var(--blue, #5064f7);
  background: rgba(80, 100, 247, 0.08);
  color: var(--navy, #202d4d);
}
.glv-opcoes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.glv-opcao {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.glv-opcao span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  color: #334155;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.glv-opcao span::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.15s, border-width 0.15s;
}
.glv-opcao input:checked + span {
  border-color: var(--blue, #5064f7);
  background: rgba(80, 100, 247, 0.06);
}
.glv-opcao input:checked + span::before {
  border-color: var(--blue, #5064f7);
  border-width: 5px;
}
.glv-card input:focus-visible + .glv-card-corpo,
.glv-opcao input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(80, 100, 247, 0.2);
}
.glv-sub {
  margin: 0.6rem 0 0 1rem;
  padding-left: 0.85rem;
  border-left: 2px solid #e2e8f0;
}
.glv-sub[hidden] {
  display: none;
}
.glv-grupo.is-invalid > legend {
  color: #dc2626;
}
.glv-grupo.is-invalid > .glv-cards .glv-card-corpo,
.glv-grupo.is-invalid > .glv-opcoes span {
  border-color: #fca5a5;
}

.glv-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.glv-erro {
  display: none;
  color: #dc2626;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}
.glv-erro.mostrar {
  display: block;
}
.glv-nota {
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
}

.glv-etapa-sucesso .glv-btn {
  max-width: 260px;
  margin: 0 auto;
  display: flex;
}
.glv-icon-ok {
  background: linear-gradient(135deg, var(--green, #20b86a), #16a34a);
}

@media (max-width: 575.98px) {
  .glv-etapa {
    padding: 1.6rem 1rem 1.25rem;
  }
  /* A contagem "Fechar em Xs" é mais larga que o X: ganha uma faixa própria
     acima do título em vez de cobri-lo. */
  .glv-etapa-video {
    padding-top: 3.2rem;
  }
  .glv-head {
    padding: 0 1.75rem;
  }
  .glv-head h4 {
    font-size: 1.15rem;
  }
  .glv-ctas {
    grid-template-columns: 1fr;
  }
  .glv-cards {
    gap: 0.45rem;
  }
  .glv-card-corpo {
    min-height: 78px;
    font-size: 0.8rem;
  }
}
