/**
 * Ventana emergente de formularios.
 */
.vt-lead,
.vt-lead * {
	box-sizing: border-box;
}

.vt-lead {
	width: min(560px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 40px 80px -30px rgba(17, 24, 39, 0.55);
	color: var(--wp--preset--color--ink, #000);
}

.vt-lead::backdrop {
	background: rgba(17, 24, 39, 0.55);
	backdrop-filter: blur(3px);
}

@media (prefers-reduced-motion: no-preference) {
	.vt-lead[open] {
		animation: vt-lead-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	@keyframes vt-lead-in {
		from {
			opacity: 0;
			transform: translateY(16px) scale(0.98);
		}
		to {
			opacity: 1;
			transform: none;
		}
	}
}

.vt-lead__form {
	position: relative;
	padding: 28px;
}

.vt-lead__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--surface, #f2f2f2);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.vt-lead__title {
	margin: 0 40px 6px 0;
	font-size: 24px;
	font-weight: 700;
}

.vt-lead__intro {
	margin: 0 0 14px;
	color: var(--wp--preset--color--muted, #555);
	line-height: 1.5;
}

.vt-lead__context {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 10px;
	background: rgba(31, 36, 102, 0.07);
	color: var(--wp--preset--color--navy, #1f2466);
	font-size: 14px;
	font-weight: 600;
}

.vt-lead__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.vt-lead__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 14px;
	font-weight: 600;
}

.vt-lead__field.is-wide {
	grid-column: 1 / -1;
}

.vt-lead__field[hidden] {
	display: none;
}

.vt-lead__field input,
.vt-lead__field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--wp--preset--color--line, #d8d8d8);
	border-radius: 10px;
	font: inherit;
	font-weight: 400;
	resize: vertical;
}

.vt-lead__field input:focus,
.vt-lead__field textarea:focus {
	border-color: var(--wp--preset--color--navy, #1f2466);
	outline: 2px solid rgba(31, 36, 102, 0.15);
}

.vt-lead__check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.4;
}

.vt-lead__check input {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	accent-color: var(--wp--preset--color--navy, #1f2466);
}

.vt-lead__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.vt-lead__error {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fdecec;
	color: #a11;
	font-size: 14px;
}

.vt-lead__submit {
	width: 100%;
	margin-top: 18px;
	padding: 14px;
	border: 0;
	border-radius: 10px;
	background: var(--wp--preset--color--yellow, #fcbc34);
	color: #000;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.vt-lead__submit:hover {
	filter: brightness(0.95);
}

.vt-lead__form.is-sending .vt-lead__submit {
	opacity: 0.6;
	pointer-events: none;
}

/* Estado "enviado": solo se ve el mensaje de confirmación. */
.vt-lead__form.is-done > :not(.vt-lead__done):not(.vt-lead__close) {
	display: none;
}

.vt-lead__done {
	padding: 24px 0 4px;
	text-align: center;
}

.vt-lead__done-title {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 700;
}

.vt-lead__done-title::before {
	content: "";
	display: block;
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #e3f8eb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2301a73d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 28px no-repeat;
}

.vt-lead__done-text {
	margin: 0;
	color: var(--wp--preset--color--muted, #555);
}

@media (max-width: 600px) {
	.vt-lead__form {
		padding: 22px 18px;
	}

	.vt-lead__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
