/* ==========================================================================
   Boletín WhatsApp Tostatronic — popup, franja de footer y formulario
   ========================================================================== */

/* --- Formulario (compartido) --- */

.ttn-wab-form {
	box-sizing: border-box;
	max-width: 420px;
	margin: 0 auto;
}

.ttn-wab-form *,
.ttn-wab-form *::before,
.ttn-wab-form *::after {
	box-sizing: inherit;
}

.ttn-wab-form__row {
	display: flex;
	gap: 8px;
}

.ttn-wab-form__phone {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 8px;
	font-size: 1rem;
}

.ttn-wab-form__submit {
	padding: 10px 16px;
	border: none;
	border-radius: 8px;
	background: #25d366;
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	white-space: nowrap;
	transition: filter 0.15s ease;
}

.ttn-wab-form__submit:hover {
	filter: brightness(0.92);
}

.ttn-wab-form__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.ttn-wab-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 10px;
	font-size: 0.8rem;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
}

.ttn-wab-form__consent input {
	margin-top: 2px;
	flex-shrink: 0;
}

/* Honeypot: fuera de la vista de humanos. */
.ttn-wab-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.ttn-wab-form__msg {
	margin: 10px 0 0;
	font-size: 0.9rem;
	font-weight: 600;
	min-height: 1.2em;
}

.ttn-wab-form__msg.is-error {
	color: #b32d2e;
}

.ttn-wab-form__msg.is-success {
	color: #1a7f37;
}

.ttn-wab-form__confirm {
	display: inline-block;
	margin-top: 8px;
	padding: 8px 14px;
	border-radius: 8px;
	background: #25d366;
	color: #fff !important;
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
}

/* --- Popup (página de inicio) --- */

.ttn-wab-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ttn-wab-overlay[hidden] {
	display: none;
}

.ttn-wab-modal {
	position: relative;
	background: #fff;
	border-radius: 16px;
	padding: 28px 24px 24px;
	max-width: 440px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ttn-wab-modal__title {
	margin: 0 0 8px;
	font-size: 1.35rem;
	line-height: 1.2;
}

.ttn-wab-modal__text {
	margin: 0 0 16px;
	font-size: 0.95rem;
	line-height: 1.45;
}

.ttn-wab-close {
	position: absolute;
	top: 8px;
	right: 12px;
	border: none;
	background: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 4px;
}

.ttn-wab-close:hover {
	color: #000;
}

/* --- Franja del footer --- */

.ttn-wab-footer {
	background: #075e54;
	color: #fff;
	padding: 24px 16px;
	clear: both;
}

.ttn-wab-footer__inner {
	max-width: 1000px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px 32px;
}

.ttn-wab-footer__intro {
	text-align: center;
}

.ttn-wab-footer__title {
	margin: 0 0 4px;
	color: #fff;
	font-size: 1.15rem;
}

.ttn-wab-footer__text {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.9;
}

.ttn-wab-footer .ttn-wab-form {
	margin: 0;
}

.ttn-wab-footer .ttn-wab-form__consent {
	color: #fff;
}

.ttn-wab-footer .ttn-wab-form__msg.is-success {
	color: #b9f6ca;
}

.ttn-wab-footer .ttn-wab-form__msg.is-error {
	color: #ffcdd2;
}

@media (min-width: 768px) {
	.ttn-wab-footer__intro {
		text-align: left;
	}
}

/* --- Móvil: versión compacta --- */

@media (max-width: 600px) {
	/* Campo y botón apilados, cada uno a todo lo ancho. */
	.ttn-wab-form__row {
		flex-direction: column;
		gap: 10px;
	}

	.ttn-wab-form__phone,
	.ttn-wab-form__submit {
		width: 100%;
	}

	.ttn-wab-form__phone {
		text-align: center;
		font-size: 16px; /* evita que iOS haga zoom al enfocar el campo */
	}

	/* Popup más ligero y con scroll si no cabe. */
	.ttn-wab-overlay {
		padding: 14px;
	}

	.ttn-wab-modal {
		padding: 22px 16px 16px;
		border-radius: 14px;
		max-height: 85vh;
		overflow-y: auto;
	}

	.ttn-wab-modal__title {
		font-size: 1.1rem;
	}

	.ttn-wab-modal__text {
		font-size: 0.85rem;
		margin-bottom: 12px;
	}

	.ttn-wab-form__consent {
		font-size: 0.72rem;
		gap: 6px;
	}

	/* Franja del footer más compacta. */
	.ttn-wab-footer {
		padding: 18px 14px;
	}

	.ttn-wab-footer__inner {
		flex-direction: column;
		gap: 12px;
	}

	.ttn-wab-footer__title {
		font-size: 1rem;
	}

	.ttn-wab-footer__text {
		font-size: 0.82rem;
	}

	.ttn-wab-footer .ttn-wab-form {
		width: 100%;
		max-width: 420px;
	}
}
