/* Componentes do prêmio (formulários, vencedores, WhatsApp). Usa as variáveis do theme.json. */

/* Formulários: grade de 12 colunas; a largura de cada campo vem do editor (cx-w-*). */
.cx-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem 1rem; max-width: 960px; }
.cx-form > * { grid-column: span 12; margin: 0; min-width: 0; }
.cx-form > .cx-w-75 { grid-column: span 9; }
.cx-form > .cx-w-67 { grid-column: span 8; }
.cx-form > .cx-w-50 { grid-column: span 6; }
.cx-form > .cx-w-33 { grid-column: span 4; }
.cx-form > .cx-w-25 { grid-column: span 3; }
@media (max-width: 640px) { .cx-form > [class*="cx-w-"] { grid-column: span 12; } }
.cx-campo { display: grid; gap: .4rem; align-content: start; }
.cx-ajuda { color: #5b6b7a; font-size: .875rem; }
.cx-form h2, .cx-form h3, .cx-form .cx-secao { margin-top: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--wp--preset--color--verde); color: var(--wp--preset--color--azul); font-size: 1.15rem; }
/* Editor: prévia fiel e área de inserção de campos */
.cx-form-editor .cx-campo input, .cx-form-editor .cx-campo select, .cx-form-editor .cx-campo textarea { pointer-events: none; }
.cx-form-editor .cx-rotulo { font-weight: 600; color: var(--wp--preset--color--azul); }
.cx-form-editor > .block-list-appender { grid-column: span 12; }
.cx-opcoes-previa { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.cx-campo label, .cx-campo legend { font-weight: 600; color: var(--wp--preset--color--azul); }
.cx-campo input[type=text], .cx-campo input[type=email], .cx-campo input[type=tel], .cx-campo input[type=date],
.cx-campo input[type=file], .cx-campo select, .cx-campo textarea {
	width: 100%; padding: .7rem .8rem; border: 1px solid #b9c3cc; border-radius: 6px; background: #fff;
	font: inherit; color: var(--wp--preset--color--texto);
}
.cx-campo :focus-visible { outline: 3px solid var(--wp--preset--color--verde-claro); outline-offset: 1px; }
.cx-campo small { color: #5b6b7a; }
.cx-opcoes { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.cx-opcoes legend { width: 100%; margin-bottom: .4rem; }
.cx-opcoes label, .cx-aceite label { font-weight: 400; color: inherit; display: flex; gap: .5rem; align-items: baseline; }
.cx-secao { margin-top: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--wp--preset--color--verde); color: var(--wp--preset--color--azul); font-size: 1.15rem; }
.cx-req { color: #b42318; }
.cx-com-erro input, .cx-com-erro select, .cx-com-erro textarea { border-color: #b42318; }
.cx-msg-erro { color: #b42318; font-size: .9rem; }
.cx-erro-geral, .cx-sucesso, .cx-aviso { padding: 1rem 1.25rem; border-radius: 6px; margin-bottom: 1rem; }
.cx-erro-geral { background: #fef3f2; border: 1px solid #fda29b; color: #912018; }
.cx-sucesso { background: #ecfdf3; border: 1px solid #6ce9a6; color: #05603a; }
.cx-aviso { background: #f0f6fa; border: 1px solid #b7d3e4; color: var(--wp--preset--color--azul); }
.cx-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cx-obrigatorios { font-size: .85rem; color: #5b6b7a; margin: 0; }
.cx-enviar { justify-self: start; }
.cx-enviar[disabled] { opacity: .6; cursor: progress; }

/* Vencedores */
.cx-edicoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.cx-edicoes a, .cx-estados a {
	display: inline-block; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--wp--preset--color--azul);
	color: var(--wp--preset--color--azul); text-decoration: none; font-weight: 600;
}
.cx-edicoes a[aria-current], .cx-estados a[aria-current], .cx-edicoes a:hover, .cx-estados a:hover {
	background: var(--wp--preset--color--azul); color: #fff;
}
.cx-pilares { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.5rem; }
.cx-pilar { background: #fff; border-radius: 10px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(14, 75, 108, .12); }
.cx-pilar h3 { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; font-size: 1.05rem; color: var(--wp--preset--color--azul); }
.cx-pilar h3 img { border-radius: 8px; flex: none; }
.cx-pilar table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.cx-pilar th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #5b6b7a; padding-bottom: .4rem; }
.cx-pilar td { padding: .5rem 0; border-top: 1px solid #e6ebef; vertical-align: top; }
.cx-pilar td:last-child { font-weight: 600; padding-left: 1rem; }
.cx-estados { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.cx-titulo-estados { margin-top: 3rem; }
.cx-voltar a { color: var(--wp--preset--color--verde); }

/* WhatsApp */
.cx-whatsapp {
	position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 56px; height: 56px; border-radius: 50%;
	display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.cx-whatsapp:focus-visible { outline: 3px solid var(--wp--preset--color--azul); outline-offset: 3px; }
