/**
 * Banner de suscripción – estilos públicos.
 */

.sp-banner {
	--sp-bg-start: #26406f;
	--sp-bg-end: #0d1b34;
	--sp-text: #ffffff;
	--sp-btn-bg: #d93b3b;
	--sp-btn-color: #ffffff;
	--sp-field-bg: #ffffff;
	--sp-field-color: #1b2a4a;
	--sp-angle: 100deg;

	background: linear-gradient(var(--sp-angle), var(--sp-bg-start) 0%, var(--sp-bg-end) 100%);
	color: var(--sp-text);
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 44px clamp(20px, 6vw, 90px);
}

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

.sp-banner--boxed {
	border-radius: 18px;
	margin: 32px 0;
	padding: 40px clamp(20px, 4vw, 48px);
}

.sp-banner__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(24px, 5vw, 70px);
	max-width: 1320px;
	margin: 0 auto;
	width: 100%;
}

.sp-banner__text {
	flex: 1 1 420px;
	min-width: 0;
}

.sp-banner__title {
	margin: 0 0 12px;
	font-size: clamp(23px, 2.4vw, 34px);
	line-height: 1.18;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--sp-text);
	max-width: 20ch;
}

.sp-banner__subtitle {
	margin: 0;
	font-size: clamp(13px, 1.1vw, 15px);
	line-height: 1.6;
	color: var(--sp-text);
	opacity: 0.78;
	max-width: 46ch;
}

.sp-banner__form-wrap {
	flex: 1 1 520px;
	max-width: 600px;
	min-width: 0;
}

.sp-form {
	margin: 0;
	width: 100%;
}

.sp-field-group {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--sp-field-bg);
	border-radius: 999px;
	padding: 6px 6px 6px 10px;
	box-shadow: 0 10px 30px rgba(4, 12, 28, 0.18);
}

.sp-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--sp-field-color);
	font-size: 15px;
	line-height: 1.4;
	padding: 14px 12px 14px 14px;
	box-shadow: none;
	border-radius: 999px;
}

.sp-input::placeholder {
	color: #98a1b5;
	opacity: 1;
}

.sp-input:focus {
	outline: 0;
	box-shadow: none;
}

.sp-input--name {
	flex: 0 1 32%;
	border-right: 1px solid #e6e9f0;
}

.sp-submit {
	flex: 0 0 auto;
	border: 0;
	cursor: pointer;
	background: var(--sp-btn-bg);
	color: var(--sp-btn-color);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	padding: 15px 30px;
	border-radius: 999px;
	transition: filter 0.15s ease, transform 0.15s ease;
	white-space: nowrap;
}

.sp-submit:hover,
.sp-submit:focus {
	filter: brightness(1.08);
	color: var(--sp-btn-color);
}

.sp-submit:active {
	transform: translateY(1px);
}

.sp-submit[disabled] {
	opacity: 0.6;
	cursor: default;
}

.sp-form:focus-within .sp-field-group {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28), 0 10px 30px rgba(4, 12, 28, 0.18);
}

/* Honeypot: fuera de la vista, pero presente para los bots. */
.sp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sp-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 12px 4px 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--sp-text);
	opacity: 0.8;
}

.sp-consent input {
	margin-top: 2px;
}

.sp-message {
	margin: 12px 4px 0;
	min-height: 1em;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--sp-text);
}

.sp-message--error {
	color: #ffd2d2;
}

.sp-message--ok {
	color: #b8f5d0;
}

/* Variante apilada */
.sp-banner--stacked .sp-banner__inner {
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

/* En columna, flex-basis afectaría a la altura: lo neutralizamos. */
.sp-banner--stacked .sp-banner__text,
.sp-banner--stacked .sp-banner__form-wrap {
	flex: 0 0 auto;
	width: 100%;
}

.sp-banner--stacked .sp-banner__form-wrap {
	max-width: 600px;
}

/* Responsive */
@media (max-width: 900px) {
	.sp-banner {
		padding: 34px 24px;
	}

	.sp-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 22px;
	}

	.sp-banner__title {
		max-width: none;
	}

	.sp-banner__text,
	.sp-banner__form-wrap {
		flex: 0 0 auto;
		max-width: 100%;
	}
}

@media (max-width: 560px) {
	.sp-field-group {
		flex-direction: column;
		align-items: stretch;
		border-radius: 18px;
		padding: 8px;
		gap: 6px;
	}

	.sp-input {
		padding: 13px 14px;
		border: 0;
	}

	.sp-input--name {
		border-right: 0;
		border-bottom: 1px solid #e6e9f0;
	}

	.sp-submit {
		width: 100%;
		padding: 15px 20px;
	}
}

/* Aviso flotante de confirmación / baja */
.sp-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 99999;
	max-width: min(560px, calc(100vw - 32px));
	display: flex;
	align-items: center;
	gap: 14px;
	background: #0d1b34;
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
	padding: 14px 18px;
	border-radius: 12px;
	box-shadow: 0 14px 40px rgba(4, 12, 28, 0.3);
}

.sp-toast--error {
	background: #7a2020;
}

.sp-toast__close {
	background: none;
	border: 0;
	color: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.7;
	padding: 0 2px;
}

.sp-toast__close:hover {
	opacity: 1;
}


/* --- Compatibilidad con Elementor --- */
.elementor-widget-sp_suscripcion .sp-banner {
	margin: 0;
}

.elementor-widget-sp_suscripcion .sp-input,
.elementor-widget-sp_suscripcion .sp-submit {
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}

.elementor-editor-active .sp-form .sp-submit {
	cursor: default;
}
