/* QVS Formulario de captación
   Hereda el tipo de letra de la web. Los colores se pueden cambiar desde el theme
   redefiniendo las variables --qvsf-*. */

.qvsf {
	--qvsf-ink: #0c2b28;
	--qvsf-muted: #4d6763;
	--qvsf-line: #cfe0d7;
	--qvsf-soft: #eef7f1;
	--qvsf-accent: #ffd233;
	--qvsf-accent-ink: #0c2b28;
	--qvsf-focus: #0e9f6e;
	--qvsf-error: #c0341d;
	--qvsf-radius: 14px;
	color: var(--qvsf-ink);
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	text-align: left;
}

.qvsf *,
.qvsf *::before,
.qvsf *::after {
	box-sizing: border-box;
}

.qvsf__form {
	display: grid;
	gap: 22px;
	margin: 0;
}

.qvsf__form[hidden],
.qvsf__done[hidden],
.qvsf__alert[hidden] {
	display: none;
}

.qvsf__row {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.qvsf__field,
.qvsf__consent,
.qvsf__actions,
.qvsf__group {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.qvsf__field > label,
.qvsf__group > legend {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--qvsf-ink);
}

.qvsf__field input {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 12px 16px;
	border: 2px solid var(--qvsf-line);
	border-radius: var(--qvsf-radius);
	background: #fff;
	color: var(--qvsf-ink);
	font: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qvsf__field input:hover {
	border-color: #a9c6b8;
}

.qvsf__field input:focus {
	outline: none;
	border-color: var(--qvsf-focus);
	box-shadow: 0 0 0 4px rgba(14, 159, 110, 0.18);
}

.qvsf__options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.qvsf__options--stack {
	flex-direction: column;
}

.qvsf__option {
	position: relative;
	display: block;
	flex: 1 1 auto;
	margin: 0;
	cursor: pointer;
}

.qvsf__option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.qvsf__option span {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 12px 16px;
	border: 2px solid var(--qvsf-line);
	border-radius: var(--qvsf-radius);
	background: #fff;
	font-weight: 500;
	line-height: 1.35;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.qvsf__option span::before {
	content: "";
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border: 2px solid #9bb8ab;
	border-radius: 50%;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qvsf__option:hover span {
	border-color: #a9c6b8;
}

.qvsf__option input:checked + span {
	border-color: var(--qvsf-ink);
	background: var(--qvsf-soft);
}

.qvsf__option input:checked + span::before {
	border-color: var(--qvsf-ink);
	box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--qvsf-ink);
}

.qvsf__option input:focus-visible + span {
	border-color: var(--qvsf-focus);
	box-shadow: 0 0 0 4px rgba(14, 159, 110, 0.18);
}

.qvsf__consent label {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: 0.92rem;
	color: var(--qvsf-muted);
	cursor: pointer;
}

.qvsf__consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--qvsf-ink);
}

.qvsf__consent a {
	color: var(--qvsf-ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.qvsf__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 58px;
	padding: 14px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--qvsf-accent);
	color: var(--qvsf-accent-ink);
	font: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 0 var(--qvsf-ink);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.qvsf__submit:hover {
	transform: translateY(2px);
	box-shadow: 0 4px 0 var(--qvsf-ink);
}

.qvsf__submit:active {
	transform: translateY(6px);
	box-shadow: 0 0 0 var(--qvsf-ink);
}

.qvsf__submit:focus-visible {
	outline: 3px solid var(--qvsf-focus);
	outline-offset: 4px;
}

.qvsf__submit[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.qvsf__actions {
	padding-bottom: 6px;
}

.qvsf__error {
	display: block;
	margin-top: 6px;
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--qvsf-error);
}

.qvsf__error:empty {
	display: none;
}

.qvsf .is-invalid input[type="text"],
.qvsf .is-invalid input[type="tel"],
.qvsf .is-invalid input[type="email"],
.qvsf .is-invalid .qvsf__option span {
	border-color: var(--qvsf-error);
}

.qvsf__alert {
	margin: 0;
	padding: 12px 16px;
	border-radius: var(--qvsf-radius);
	background: #fdece8;
	color: var(--qvsf-error);
	font-weight: 500;
}

.qvsf__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.qvsf__done {
	padding: 36px 8px;
	text-align: center;
}

.qvsf__done:focus {
	outline: none;
}

.qvsf__done p {
	margin: 0 auto;
	max-width: 34ch;
	color: var(--qvsf-muted);
}

.qvsf__done .qvsf__done-title {
	margin-bottom: 8px;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--qvsf-ink);
}

.qvsf__done-icon {
	display: block;
	position: relative;
	width: 72px;
	height: 72px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--qvsf-accent);
	animation: qvsf-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.qvsf__done-icon::after {
	content: "";
	position: absolute;
	left: 26px;
	top: 17px;
	width: 18px;
	height: 30px;
	border: solid var(--qvsf-ink);
	border-width: 0 5px 5px 0;
	transform: rotate(45deg);
}

@keyframes qvsf-pop {
	from {
		transform: scale(0.4);
		opacity: 0;
	}
}

@media (max-width: 520px) {
	.qvsf__options {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qvsf *,
	.qvsf *::before,
	.qvsf *::after {
		animation: none !important;
		transition: none !important;
	}
}
