/* ===================================================================
   Complementos ao master.css para elementos dinâmicos que não existem no
   HTML estático original (erros do servidor, aviso do reCAPTCHA, loader).
   Não altera nenhum estilo do layout de referência.
=================================================================== */
.invalid-feedback {
  font-size: 16px;
  margin-top: -8px;
  margin-bottom: 8px;
}

/* Opt-in dos Termos de Uso / Política de Privacidade.
   O master.css esconde os labels do formulário (form label { display: none }); este precisa aparecer. */
form .aceite-termos {
  margin: 0 0 16px;
}

form .aceite-termos .form-check-label {
  display: inline;
  font-size: 14px;
  color: var(--branco);
  cursor: pointer;
}

form .aceite-termos .form-check-label a {
  color: var(--branco);
  text-decoration: underline;
}

form .aceite-termos .form-check-input {
  background-color: transparent;
  border: 1px solid var(--vermelho);
  cursor: pointer;
}

form .aceite-termos .form-check-input:focus {
  border-color: var(--branco);
  box-shadow: none;
}

form .aceite-termos .form-check-input:checked,
.was-validated form .aceite-termos .form-check-input:valid:checked,
form.was-validated .aceite-termos .form-check-input:valid:checked {
  background-color: var(--vermelho);
  border-color: var(--vermelho);
}

/* No estado válido o Bootstrap pinta o texto de verde: mantém o branco do layout. */
form.was-validated .aceite-termos .form-check-input:valid ~ .form-check-label {
  color: var(--branco);
}

form .aceite-termos .invalid-feedback {
  margin-top: 4px;
  margin-bottom: 0;
}

/* Formulário travado (link de quem já confirmou). */
form input.form-control:disabled {
  background: transparent;
  opacity: 0.45;
  cursor: not-allowed;
}

form button[type='submit']:disabled,
form button[type='submit']:disabled:hover {
  background: var(--branco);
  color: var(--vermelho);
  opacity: 0.45;
  cursor: not-allowed;
}

form .aceite-termos .form-check-input:disabled,
form .aceite-termos .form-check-input:disabled ~ .form-check-label {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Links dentro dos modais (fundo vermelho): o azul padrão do Bootstrap perde contraste.
   Branco sublinhado mantém a cor do texto do modal (contraste ~5:1 sobre #D8112D). */
.modal-content a {
  color: var(--branco);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: bold;
  word-break: break-word;
}

.modal-content a:hover {
  color: var(--branco);
  text-decoration-thickness: 2px;
}

.modal-content a:focus-visible {
  outline: 2px solid var(--branco);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Erro geral do envio (ex.: reCAPTCHA recusado). */
p.erro-envio {
  color: #ff5a6e;
  font-size: 16px;
  margin: 0 0 12px;
}

/* reCAPTCHA v3: o selo flutuante é ocultado e substituído pelo aviso textual (permitido pelos termos do Google). */
.grecaptcha-badge {
  visibility: hidden;
}

p.aviso-recaptcha {
  font-size: 11px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.55);
  margin: 12px 0 0;
}

p.aviso-recaptcha a {
  color: inherit;
  text-decoration: underline;
}

/* ===================================================================
   Loader (envio do formulário): disco girando sobre fundo escuro.
   Bloqueia cliques imediatamente; o visual aparece após ~0,3s.
=================================================================== */
.carregando {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  cursor: progress;
  animation: carregando-aparecer 0.25s ease 0.3s both;
}

.carregando[hidden] {
  display: none;
}

.carregando-indicador {
  width: 140px;
  height: 140px;
  max-width: 40vw;
  max-height: 40vw;
  background: url('../image/disco.png') center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(216, 17, 45, 0.35));
  animation: carregando-girar 1.8s linear infinite;
}

.carregando-texto {
  font-family: 'funnel_displayextrabold';
  text-transform: uppercase;
  font-size: 20px;
  color: var(--branco);
  text-align: center;
}

@keyframes carregando-aparecer {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes carregando-girar {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .carregando-indicador { animation-duration: 8s; }
}
