/* ========== BANDA DE BOLETÍN (StoriesAndNewsletter.jsx → NewsletterBand) ========== */

/* 1. Wrapper: azul UCA + textura de puntos */
.mwm-newsletter-band.mwm-section {
	padding-block: 96px;
	overflow: hidden;
	overflow: clip; /* «hidden» la convierte en contenedor de scroll y el navegador ignora scroll-margin-top */
	color: #fff;
	/* /#newsletter: que la cabecera fija no tape el inicio de la banda */
	scroll-margin-top: calc(var(--mwm-adminbar, 0px) + var(--mwm-header-h, 80px) + 16px);
}
.mwm-newsletter-band::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.06;
	background-image: radial-gradient(circle at 2px 2px, #fff 1px, transparent 1.4px);
	background-size: 24px 24px;
}

/* 2. Elementos */
.mwm-newsletter-band__grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 80px;
	align-items: center;
}
.mwm-newsletter-band__title {
	font-size: 48px;
	line-height: 1.05;
	letter-spacing: var(--mwm-ls-tight);
	font-weight: 900;
	color: #fff;
	margin: 12px 0 20px;
	text-wrap: balance;
}
.mwm-newsletter-band__lead {
	font-size: 17px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
	max-width: 440px;
}

/* 3. Formulario */
.mwm-newsletter-band__form { gap: 16px; }
.mwm-newsletter-band__field { display: grid; gap: 10px; }
.mwm-newsletter-band .mwm-form label.mwm-newsletter-band__label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}
.mwm-newsletter-band .mwm-form input[type="email"] {
	flex: 1;
	min-width: 0;
	font-size: 16px;
	padding: 14px 18px;
	border-color: rgba(255, 255, 255, 0.45);
}
.mwm-newsletter-band .mwm-form input[type="email"]:focus {
	border-color: #fff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.mwm-newsletter-band .mwm-form input[type="email"][aria-invalid="true"] {
	border-color: var(--mwm-error-inverse);
	box-shadow: 0 0 0 3px rgba(255, 180, 171, 0.2);
}
.mwm-newsletter-band__submit { flex-shrink: 0; }

/* Casilla de protección de datos: el enlace va fuera del <label> para que no marque la casilla */
.mwm-newsletter-band .mwm-newsletter-band__consent {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}
.mwm-newsletter-band .mwm-form .mwm-newsletter-band__consent input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	cursor: pointer;
}
.mwm-newsletter-band .mwm-form .mwm-newsletter-band__consent input[type="checkbox"]:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.mwm-newsletter-band .mwm-form .mwm-newsletter-band__consent input[type="checkbox"][aria-invalid="true"] {
	outline: 2px solid var(--mwm-error-inverse);
	outline-offset: 2px;
}
.mwm-newsletter-band .mwm-form .mwm-newsletter-band__consent label {
	display: inline;
	font-size: inherit;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
	cursor: pointer;
}
.mwm-newsletter-band .mwm-newsletter-band__consent a {
	display: inline-block;
	margin-top: 2px;
	color: #fff;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.mwm-newsletter-band .mwm-newsletter-band__consent a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Errores junto al campo */
.mwm-newsletter-band .mwm-newsletter-band__error {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--mwm-error-inverse);
}
.mwm-newsletter-band__error[hidden] { display: none; }

/* Región de estado (aria-live): vacía no ocupa sitio */
.mwm-newsletter-band__status { font-size: 15px; line-height: 1.5; outline: none; }
.mwm-newsletter-band__status:empty { display: none; }
.mwm-newsletter-band__status.is-success,
.mwm-newsletter-band__status.is-info,
.mwm-newsletter-band__status.is-error {
	padding: 14px 16px 14px 44px;
	border-radius: var(--mwm-radius-md);
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.1) no-repeat 16px 16px / 18px;
	color: #fff;
	font-weight: 700;
}
.mwm-newsletter-band__status.is-success {
	border-color: #9be3b4;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239be3b4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.mwm-newsletter-band__status.is-info {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
}
.mwm-newsletter-band__status.is-error {
	border-color: var(--mwm-error-inverse);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb4ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}
.mwm-newsletter-band__status.is-loading { color: rgba(255, 255, 255, 0.85); }

/* Enviando */
.mwm-newsletter-band__form.is-loading .mwm-newsletter-band__submit { cursor: progress; opacity: 0.75; }
.mwm-newsletter-band__form.is-loading .mwm-newsletter-band__submit-label::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 10px;
	vertical-align: -2px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: mwm-nl-spin 0.8s linear infinite;
}
@keyframes mwm-nl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.mwm-newsletter-band__form.is-loading .mwm-newsletter-band__submit-label::after { animation: none; }
}

/* Honeypot: fuera de la vista y del orden de tabulación */
.mwm-newsletter-band__hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	left: -9999px;
}

/* 5. Responsive */
@media (max-width: 1080px) {
	.mwm-newsletter-band__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.mwm-newsletter-band__title { font-size: 44px; }
	.mwm-newsletter-band__lead { max-width: 560px; }
	.mwm-newsletter-band__action { max-width: 640px; }
}

@media (max-width: 760px) {
	.mwm-newsletter-band.mwm-section { padding-block: var(--mwm-section-y); }
	.mwm-newsletter-band__grid { gap: 32px; }
	.mwm-newsletter-band__title { font-size: var(--mwm-fs-h2); }
	/* Botón largo: debajo del campo y a todo el ancho */
	.mwm-newsletter-band .mwm-newsletter-band__inline { flex-direction: column; }
	.mwm-newsletter-band .mwm-form__inline .mwm-newsletter-band__submit {
		width: 100%;
		white-space: normal;
		padding: 14px 20px;
		font-size: 16px;
	}
}
