/*
 * Baby Bloom — Valoración online: sección CTA, modal accesible y formulario.
 * Usa los tokens del tema (tokens.css). Color de sección: Amor (rosa).
 */

/* ------------------------------------------------------------------ *
 * Sección CTA (cierre de la página de Estimulación temprana)
 * ------------------------------------------------------------------ */
/* CTA final: franja a todo lo ancho (sin tarjeta), pegada al footer. */
.bbv-cta {
	background: #F8DEEB; /* tinte de #DD6CA6 */
	padding-block: clamp(88px, 8vw, 112px);
	padding-inline: 24px;
	margin: 0;
	text-align: center;
}
.bbv-cta__inner {
	max-width: 800px;
	margin: 0 auto;
	display: grid;
	gap: 1.1rem;
	justify-items: center;
}
@media (max-width: 600px) {
	.bbv-cta {
		padding-block: 72px;
		padding-inline: 20px;
	}
}
.bbv-cta__heart {
	width: 56px;
	height: 56px;
}
.bbv-cta h2 {
	font-family: var(--bb-font-heading);
	font-size: var(--bb-text-3xl);
	line-height: 1.2;
	color: var(--bb-ink);
	margin: 0;
}
.bbv-cta__text {
	color: var(--bb-text-muted);
	margin: 0;
}
.bbv-cta__price {
	margin: 0;
	font-size: 1.05rem;
	color: var(--bb-ink);
}
.bbv-cta__price-label {
	color: var(--bb-text-muted);
}
.bbv-cta .bbv-open {
	margin-top: 0.4rem;
}

/* ------------------------------------------------------------------ *
 * Modal
 * ------------------------------------------------------------------ */
.bbv-modal[hidden] {
	display: none;
}
.bbv-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 1.5rem;
}
.bbv-modal__overlay {
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--bb-confianza-900) 62%, transparent);
	animation: bbv-fade 0.2s ease-out;
}
.bbv-modal__dialog {
	position: relative;
	background: var(--bb-surface-card);
	border-radius: var(--bb-radius-lg);
	box-shadow: var(--bb-shadow-lg);
	width: min(560px, 100%);
	max-height: min(88vh, 760px);
	overflow-y: auto;
	padding: clamp(1.5rem, 4vw, 2.4rem);
	animation: bbv-pop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.bbv-modal__close {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	border-radius: var(--bb-radius-full);
	font-size: 1.8rem;
	line-height: 1;
	color: var(--bb-text-muted);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.bbv-modal__close:hover {
	background: var(--bb-gris-100);
	color: var(--bb-ink);
}
.bbv-modal__close:focus-visible {
	outline: 2px solid var(--bb-focus-ring);
	outline-offset: 2px;
}
.bbv-modal__title {
	font-family: var(--bb-font-heading);
	font-size: var(--bb-text-2xl);
	color: var(--bb-ink);
	margin: 0 2rem 0.5rem 0;
	line-height: 1.2;
}
.bbv-modal__desc {
	color: var(--bb-text-muted);
	margin: 0 0 1rem;
	font-size: 0.95rem;
}
.bbv-modal__price {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	color: var(--bb-ink);
}
.bbv-modal__demo {
	margin: 0 0 1.2rem;
	padding: 0.6rem 0.85rem;
	border-radius: var(--bb-radius-sm);
	background: var(--bb-alegria-100);
	color: var(--bb-alegria-700);
	font-size: 0.85rem;
	font-weight: 500;
}

/* ------------------------------------------------------------------ *
 * Formulario
 * ------------------------------------------------------------------ */
.bbv-form {
	display: grid;
	gap: 1.05rem;
}
.bbv-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.bbv-field {
	display: grid;
	gap: 0.35rem;
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}
.bbv-field > label,
.bbv-field > legend {
	font-family: var(--bb-font-body);
	font-weight: 500;
	font-size: 0.92rem;
	color: var(--bb-ink);
	padding: 0;
}
.bbv-req {
	color: var(--bb-action-primary);
}
.bbv-optional {
	color: var(--bb-text-muted);
	font-weight: 400;
}
.bbv-field input[type="text"],
.bbv-field input[type="tel"],
.bbv-field input[type="email"],
.bbv-field input[type="number"],
.bbv-field textarea,
.bbv-field select {
	width: 100%;
	min-height: 44px;
	padding: 0.6rem 0.8rem;
	font: inherit;
	color: var(--bb-text-default);
	background: var(--bb-surface-input);
	border: 1.5px solid var(--bb-border-default);
	border-radius: var(--bb-radius-sm);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bbv-field textarea {
	resize: vertical;
	min-height: 72px;
}
.bbv-field input:focus-visible,
.bbv-field textarea:focus-visible,
.bbv-field select:focus-visible {
	outline: 2px solid var(--bb-focus-ring);
	outline-offset: 1px;
	border-color: var(--bb-confianza);
}
.bbv-age-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.6rem;
}
.bbv-age-row select {
	width: auto;
}
.bbv-field--radio legend {
	margin-bottom: 0.4rem;
}
.bbv-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-right: 1.4rem;
	font-weight: 400;
	font-size: 0.95rem;
}
.bbv-check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.55rem;
	align-items: start;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--bb-text-default);
	cursor: pointer;
}
.bbv-check input {
	margin-top: 0.15rem;
	width: 18px;
	height: 18px;
	accent-color: var(--bb-action-primary);
}
.bbv-check a {
	color: var(--bb-text-link);
	text-decoration: underline;
}

/* Errores: borde + fondo + icono de texto (nunca solo color) */
.bbv-error {
	display: none;
	font-size: 0.82rem;
	color: var(--bb-feedback-error);
	align-items: center;
	gap: 0.3rem;
}
.bbv-error::before {
	content: "▲";
	font-size: 0.7em;
}
.bbv-field.is-error .bbv-error {
	display: flex;
}
.bbv-field.is-error input,
.bbv-field.is-error textarea,
.bbv-field.is-error select {
	border-color: var(--bb-feedback-error);
	background: var(--bb-feedback-error-bg);
}

.bbv-actions {
	margin-top: 0.3rem;
}
.bbv-actions .bbv-submit {
	width: 100%;
}
.bbv-submit[disabled] {
	opacity: 0.7;
	cursor: progress;
}
.bbv-form__hint {
	margin: 0;
	font-size: 0.78rem;
	color: var(--bb-text-muted);
	text-align: center;
}

/* Confirmación */
.bbv-success {
	text-align: center;
	display: grid;
	gap: 0.8rem;
	justify-items: center;
	padding: 1rem 0;
}
.bbv-success__flor {
	width: 64px;
	height: 64px;
}
.bbv-success h3 {
	font-family: var(--bb-font-heading);
	font-size: var(--bb-text-2xl);
	color: var(--bb-ink);
	margin: 0;
}
.bbv-success p {
	color: var(--bb-text-muted);
	margin: 0;
	max-width: 38ch;
}
.bbv-success__folio strong {
	color: var(--bb-action-primary);
	font-family: var(--bb-font-heading);
	letter-spacing: 0.02em;
}

@keyframes bbv-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes bbv-pop {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

/* Móvil: panel a pantalla completa */
@media (max-width: 560px) {
	.bbv-modal {
		padding: 0;
	}
	.bbv-modal__dialog {
		width: 100%;
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bbv-modal__overlay,
	.bbv-modal__dialog {
		animation: none;
	}
	.bbv-modal__close,
	.bbv-field input,
	.bbv-field textarea,
	.bbv-field select {
		transition: none;
	}
}
