/* Texicor Leads — formulario unificado y pop-up. Hereda la tipografia del tema. */
.txf,
.txf-popup,
.txf-thanks {
	--txf-accent: #1139bb; /* azul de cabecera y pie del sitio */
	--txf-accent-dark: #0c2a8c;
	--txf-border: #c9ced8;
	--txf-error: #b3261e;
	--txf-text: #1c2230;
	--txf-whatsapp: #128c4a;
	box-sizing: border-box;
	color: var(--txf-text);
}
.txf *,
.txf-popup * { box-sizing: border-box; }

.txf { max-width: 640px; margin: 0 auto; text-align: left; }
.txf-title { font-size: 1.25em; font-weight: 700; margin: 0 0 .75em; }
.txf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.txf-field { margin: 0 0 14px; }
.txf-field label { display: block; font-size: .875em; font-weight: 600; margin-bottom: 4px; }
.txf input[type="text"],
.txf input[type="email"],
.txf input[type="tel"],
.txf select,
.txf textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	font: inherit;
	font-size: 16px; /* menos de 16px hace zoom al enfocar en iOS */
	color: inherit;
	background: #fff;
	border: 1px solid var(--txf-border);
	border-radius: 6px;
}
.txf textarea { min-height: 88px; resize: vertical; }
.txf input:focus-visible,
.txf select:focus-visible,
.txf textarea:focus-visible,
.txf-submit:focus-visible,
.txf-popup-close:focus-visible,
.txf-whatsapp:focus-visible { outline: 3px solid var(--txf-accent); outline-offset: 2px; }
.txf [aria-invalid="true"] { border-color: var(--txf-error); }
.txf-error { display: block; font-size: .8125em; color: var(--txf-error); }
.txf-error:empty { display: none; }
.txf-error-form { margin: 0 0 10px; }

/* Campo trampa: fuera de pantalla, no display:none (algunos bots lo detectan). */
.txf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Obligatoria (Ley 1581 y contrato del CRM), pero con peso de letra pequena, no de campo. */
.txf-consent { margin: 2px 0 12px; font-size: 12px; line-height: 1.4; color: #6b7280; }
.txf-consent label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.txf-consent input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--txf-accent); }
.txf-consent a { color: var(--txf-accent); text-decoration: underline; }

.txf-captcha { margin: 0 0 12px; max-height: 80px; overflow: hidden; transition: max-height .25s ease, margin .25s ease, opacity .2s ease; }
.txf-captcha:empty { display: none; }
/* Verificado: se pliega (altura 0, no display:none, para no romper el iframe de Turnstile). */
.txf-captcha.txf-captcha-ok { max-height: 0; margin: 0; opacity: 0; }
.txf-actions { margin: 0; }
/* Mas especificidad que el reset de Elementor ([type=submit], button:hover), que carga despues. */
.txf button.txf-submit {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 20px;
	font: inherit;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--txf-accent);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
.txf button.txf-submit:hover,
.txf button.txf-submit:focus { color: #fff; background: var(--txf-accent-dark); }
.txf button.txf-submit[disabled] { opacity: .65; cursor: progress; }

.txf-thanks { max-width: 640px; margin: 0 auto; padding: 24px; text-align: center; border: 1px solid var(--txf-border); border-radius: 8px; background: #fff; }
.txf-thanks:focus { outline: none; }
.txf-thanks-title { font-size: 1.25em; font-weight: 700; margin: 0 0 8px; }
.txf-whatsapp {
	display: inline-block;
	margin-top: 12px;
	padding: 12px 22px;
	font-weight: 700;
	color: #fff !important;
	background: var(--txf-whatsapp);
	border-radius: 6px;
	text-decoration: none !important;
}

/* Pop-up */
.txf-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(12, 18, 32, .6);
	overflow-y: auto;
}
.txf-popup[hidden] { display: none; }
.txf-popup-box {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px 24px 24px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.txf-popup-title { font-size: 1.125em; font-weight: 700; line-height: 1.3; text-align: center; margin: 0 28px 16px; }
.txf-popup button.txf-popup-close,
.txf-popup button.txf-popup-close:hover,
.txf-popup button.txf-popup-close:focus {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 44px;
	height: 44px;
	font-size: 28px;
	line-height: 1;
	color: var(--txf-text);
	background: transparent;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
html.txf-popup-open { overflow: hidden; }

@media (max-width: 560px) {
	.txf-grid { grid-template-columns: 1fr; }
	.txf-popup-box { padding: 24px 16px 16px; }
}
@media (prefers-reduced-motion: no-preference) {
	.txf-popup:not([hidden]) .txf-popup-box { animation: txf-in .18s ease-out; }
	@keyframes txf-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
