/*
 * Formulários de e-mail (newsletter e e-book, bloco ddv/formulario) e páginas do fluxo de confirmação (bloco
 * ddv/confirmacao). Igual à prévia (previa-tema/html/estilo.css). Comportamento em plugins/ddv-formularios/blocks/formulario/view.js.
 * Fora do "CSS usado" do WP Rocket (inc/busca.php): os estados (erro, sugestão, enviando, cartão) só existem depois de
 * a pessoa interagir, e a análise da página cortaria essas regras.
 */
/* ---------- Formulários de e-mail (newsletter e e-book): validação e fluxo depois do envio (formularios.js) ----------
 * Rótulo dentro do campo que sobe ao digitar (o rótulo nunca some, ao contrário do placeholder sozinho).
 * Erro em vermelho com ícone e texto (não só cor), sugestão em amarelo, ✓ quando o e-mail está certo.
 * Funciona em fundo claro e escuro: avisos e cartão de sucesso têm fundo próprio.
 */
form.ddv-form-email { display: grid; gap: 10px; width: 100%; max-width: 560px; text-align: left; }
.ddv-form-email__linha { display: flex; gap: 8px; }
.ddv-form-email__campo { position: relative; flex: 1; min-width: 0; }
.ddv-form-email__input { box-sizing: border-box; width: 100%; height: 52px; padding: 20px 40px 4px 14px; border: 1.5px solid var(--wp--preset--color--border-subtle); border-radius: var(--wp--custom--radius--lg); background: #fff; color: var(--wp--preset--color--text-primary); font: inherit; font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease; }
.ddv-form-email__input:focus { outline: 0; border-color: var(--wp--preset--color--surface-brand-strong); box-shadow: 0 0 0 3px rgb(7 37 80 / 14%); }
.ddv-rodape .ddv-form-email__input:focus, .ddv-ebook-topo .ddv-form-email__input:focus, .ddv-confirmacao .ddv-form-email__input:focus, .ddv-topo .ddv-form-email__input:focus { border-color: #fff; box-shadow: 0 0 0 3px var(--wp--preset--color--surface-accent); }
.ddv-form-email__rotulo { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--wp--preset--color--text-muted); font-size: 15px; pointer-events: none; transition: top .15s ease, font-size .15s ease, color .15s ease; }
.ddv-form-email__input:focus + .ddv-form-email__rotulo, .ddv-form-email__input:not(:placeholder-shown) + .ddv-form-email__rotulo { top: 14px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--wp--preset--color--text-secondary); }
.ddv-form-email__campo.com-erro .ddv-form-email__input { border-color: #c61d1d; }
.ddv-form-email__campo.com-erro .ddv-form-email__input:focus { box-shadow: 0 0 0 3px rgb(198 29 29 / 22%); }
.ddv-form-email__campo.certo::after { content: "✓"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #189538; font-weight: 800; font-size: 18px; }
.ddv-form-email__botao { min-height: 52px; padding-inline: 22px; flex: none; cursor: pointer; font: inherit; font-weight: 700; }
.ddv-form-email__girando { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ddv-form-email-girar .8s linear infinite; }
.ddv-form-email.enviando .ddv-form-email__girando { display: inline-block; }
.ddv-form-email.enviando .ddv-form-email__botao { cursor: progress; opacity: .9; }
@keyframes ddv-form-email-girar { to { transform: rotate(360deg); } }
.ddv-form-email__msg:empty { display: none; }
.ddv-form-email__aviso { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.ddv-form-email__aviso p { margin: 0; }
.ddv-form-email__aviso--erro { background: #fdecec; color: #8f1414; }
.ddv-form-email__aviso--erro > span { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #c61d1d; color: #fff; font-size: 13px; font-weight: 800; }
.ddv-form-email__aviso--sugestao { flex-wrap: wrap; justify-content: space-between; background: #fff4cc; color: var(--wp--preset--color--text-primary); }
.ddv-form-email__aviso-acoes { display: flex; gap: 16px; }
.ddv-form-email__link { padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ddv-form-email__link--fraco { font-weight: 500; }
.ddv-form-email__link:disabled { opacity: .65; text-decoration: none; cursor: default; }
.ddv-form-email__link:focus-visible, .ddv-form-email__webmail:focus-visible { outline: 2px solid var(--wp--preset--color--surface-brand-strong); outline-offset: 2px; }
.ddv-form-email__opcao { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; color: var(--wp--preset--color--text-primary); cursor: pointer; }
.ddv-form-email__opcao input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--wp--preset--color--surface-brand-strong); }
.ddv-form-email__lgpd { margin: 0; font-size: 12px; line-height: 1.5; color: var(--wp--preset--color--text-secondary); }
.ddv-ebook-topo .ddv-form-email__opcao, .ddv-confirmacao .ddv-form-email__opcao, .ddv-topo .ddv-form-email__opcao { color: #fff; }
.ddv-ebook-topo .ddv-form-email__lgpd, .ddv-ebook-topo .ddv-form-email__lgpd a, .ddv-rodape .ddv-form-email__lgpd, .ddv-rodape .ddv-form-email__lgpd a, .ddv-confirmacao .ddv-form-email__lgpd, .ddv-confirmacao .ddv-form-email__lgpd a, .ddv-topo .ddv-form-email__lgpd, .ddv-topo .ddv-form-email__lgpd a { color: rgb(255 255 255 / 75%); }
/* Depois do envio: o formulário vira o cartão. */
.ddv-form-email.enviado > :not(.ddv-form-email__sucesso) { display: none; }
.ddv-form-email__sucesso { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-radius: var(--wp--custom--radius--xl); background: #fff; color: var(--wp--preset--color--text-primary); box-shadow: var(--wp--custom--elevacao--md); animation: ddv-form-email-entrar .25s ease; }
.ddv-form-email__sucesso:focus { outline: 0; }
.ddv-form-email__selo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--wp--preset--color--surface-accent); font-size: 22px; }
.ddv-form-email__corpo p { margin: 0 0 6px; font-size: 15px; line-height: 1.5; color: var(--wp--preset--color--text-secondary); }
.ddv-form-email__corpo strong { color: var(--wp--preset--color--text-primary); }
.ddv-form-email__corpo .ddv-form-email__titulo { margin-bottom: 4px; font-size: 17px; font-weight: 800; color: var(--wp--preset--color--text-primary); }
.ddv-form-email__acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 12px 0 4px; }
.ddv-form-email .ddv-form-email__webmail.wp-element-button, .ddv-form-ebook .ddv-form-email .ddv-form-email__webmail { padding: 10px 16px; background: var(--wp--preset--color--surface-brand-strong); color: #fff; }
.ddv-form-email__corpo .ddv-form-email__nota { margin-top: 8px; font-size: 13px; color: var(--wp--preset--color--text-muted); }
.ddv-form-email__corpo .ddv-form-email__previa { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--wp--preset--color--border-subtle); font-size: 12px; }
@keyframes ddv-form-email-entrar { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
	.ddv-form-email__linha { flex-direction: column; }
	.ddv-form-email__botao { width: 100%; }
	.ddv-form-email__sucesso { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
	.ddv-form-email__acoes { flex-direction: column; align-items: stretch; }
	.ddv-form-email__acoes .wp-element-button { justify-content: center; }
	.ddv-form-email__acoes .ddv-form-email__link { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
	.ddv-form-email__sucesso { animation: none; }
	.ddv-form-email__girando { animation-duration: 2s; }
	.ddv-form-email__input, .ddv-form-email__rotulo { transition: none; }
}

/* ---------- Páginas do fluxo de confirmação (bloco ddv/confirmacao) ---------- */
.ddv-confirmacao__titulo { color: #fff; margin: 12px 0 16px; }
.ddv-confirmacao__desc { color: rgb(255 255 255 / 85%); }
.ddv-confirmacao__selo { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 999px; background: rgb(24 149 56 / 20%); color: #d6f5de; font-size: 14px; font-weight: 700; }
.ddv-confirmacao__selo span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #189538; color: #fff; font-size: 13px; }
.ddv-confirmacao__selo--aviso { background: rgb(244 216 74 / 18%); color: #fff3bf; }
.ddv-confirmacao__selo--aviso span { background: none; }
.ddv-confirmacao__acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 28px 0 0; }
.ddv-confirmacao__link { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.ddv-confirmacao__extra { margin: 24px 0 0; padding: 12px 16px; border-radius: 12px; background: rgb(255 255 255 / 10%); font-size: 15px; }
.ddv-confirmacao__extra a { color: var(--wp--preset--color--surface-accent); font-weight: 700; }
.ddv-confirmacao__dica { margin: 24px 0 0; font-size: 14px; line-height: 1.6; color: rgb(255 255 255 / 78%); }
.ddv-confirmacao .ddv-form-email { margin-top: 24px; }
@media (max-width: 760px) {
	.ddv-confirmacao .ddv-ebook-capa { margin-inline: auto; }
	.ddv-confirmacao__acoes .wp-element-button { width: 100%; }
}

/* Página de confirmação: faixa azul do topo, com textura, e o mesmo espaço lateral do site. */
.ddv-confirmacao { background: var(--wp--preset--color--surface-brand-strong); } /* Azul liso, como o topo do site. */
.ddv-confirmacao__dentro { box-sizing: border-box; width: min(100%, var(--wp--style--global--wide-size)); margin-inline: auto; padding-inline: var(--wp--style--root--padding-left, 30px); display: grid; grid-template-columns: minmax(0, 720px); justify-content: center; gap: 56px; align-items: center; padding-block: 72px; color: #fff; }
.ddv-confirmacao__dentro--capa { grid-template-columns: auto minmax(0, 1fr); justify-content: stretch; }
.ddv-confirmacao__titulo { margin: 12px 0 16px; color: #fff; font-size: var(--wp--preset--font-size--xxx-large); line-height: 1.15; }
.ddv-confirmacao__desc { margin: 0; font-size: var(--wp--preset--font-size--medium); line-height: 1.6; }
.ddv-confirmacao .ddv-ebook-capa--g { width: 300px; }
@media (max-width: 760px) {
	.ddv-confirmacao__dentro, .ddv-confirmacao__dentro--capa { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 48px; }
	.ddv-confirmacao__titulo { font-size: var(--wp--preset--font-size--xx-large); }
}

/* Caixa branca dentro de um topo azul (resumo da Planeje): texto escuro de novo e foco azul. */
.ddv-pilar-resumo .ddv-form-email__opcao { color: var(--wp--preset--color--text-primary); }
.ddv-pilar-resumo .ddv-form-email__lgpd, .ddv-pilar-resumo .ddv-form-email__lgpd a { color: var(--wp--preset--color--text-secondary); }
.ddv-pilar-resumo .ddv-form-email__input:focus { border-color: var(--wp--preset--color--surface-brand-strong); box-shadow: 0 0 0 3px rgb(7 37 80 / 14%); }
