/* ── Newsletter Popup — TiendaPocket Addon 11 ─────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────────────
   Footer newsletter — estado de éxito inline
───────────────────────────────────────────────────────────────────────────── */

.tp-nl-footer-success {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tp-nl-footer-success__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

.tp-nl-footer-success__icon svg {
	width: 18px;
	height: 18px;
	stroke: #fff;
}

.tp-nl-footer-success__msg {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.tp-nl-footer-coupon {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
}

.tp-nl-footer-coupon__label {
	font-size: 11px;
	opacity: .7;
	margin: 0;
}

.tp-nl-footer-coupon__pill {
	display: inline-block;
	align-self: flex-start;
}

.tp-nl-footer-msg {
	font-size: 13px;
	margin: 6px 0 0;
}

.tp-nl-footer-msg--error {
	color: #c0392b;
}

/* Overlay de fondo */
.tp-nl-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: tp-nl-fadein .35s ease;
}

@keyframes tp-nl-fadein {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Modal contenedor */
.tp-nl-modal {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	width: 100%;
	max-width: 820px;
	max-height: 90vh;
	animation: tp-nl-slidein .35s ease;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

@keyframes tp-nl-slidein {
	from { transform: translateY(24px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

/* Botón cerrar */
.tp-nl-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	color: #666;
	z-index: 10;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color .2s, background .2s;
}
.tp-nl-close:hover {
	color: #111;
	background: rgba(0,0,0,.06);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout 1: Split (imagen izquierda · formulario derecha)
───────────────────────────────────────────────────────────────────────────── */

.tp-nl-modal.tp-nl-split {
	display: flex;
	flex-direction: row;
	align-items: stretch;
}

.tp-nl-split .tp-nl-image-col {
	flex: 0 0 45%;
	background: #f3f3f3;
	overflow: hidden;
	display: flex;
	align-items: center;
}

.tp-nl-split .tp-nl-image-col img {
	width: 100%;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
	display: block;
}

.tp-nl-split .tp-nl-image-col.tp-nl-no-image {
	background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
}

.tp-nl-split .tp-nl-content-col {
	flex: 1;
	padding: 48px 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	text-align: left;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout 2: Centrado (imagen arriba · texto centrado)
───────────────────────────────────────────────────────────────────────────── */

.tp-nl-modal.tp-nl-centered {
	display: flex;
	flex-direction: column;
	max-width: 420px;
}

.tp-nl-centered .tp-nl-image-col {
	width: 100%;
	background: #f3f3f3;
	overflow: hidden;
	flex-shrink: 0;
}

.tp-nl-centered .tp-nl-image-col img {
	width: 100%;
	height: auto;
	max-height: 55vh;
	object-fit: contain;
	display: block;
}

.tp-nl-centered .tp-nl-image-col.tp-nl-no-image {
	background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
	height: 80px;
}

.tp-nl-centered .tp-nl-content-col {
	padding: 36px 40px 40px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Contenido del formulario (compartido por ambos layouts)
───────────────────────────────────────────────────────────────────────────── */

.tp-nl-site-name {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #999;
	margin: 0 0 12px;
}

.tp-nl-headline {
	font-size: 15px;
	color: #444;
	margin: 0 0 4px;
	font-weight: 400;
	line-height: 1.4;
}

.tp-nl-discount-badge {
	font-size: clamp(42px, 8vw, 72px);
	font-weight: 900;
	color: #111;
	line-height: 1;
	margin: 8px 0;
	letter-spacing: -.02em;
}

.tp-nl-subtext {
	font-size: 14px;
	color: #555;
	margin: 0 0 24px;
}

.tp-nl-form {
	width: 100%;
	max-width: 340px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tp-nl-split .tp-nl-form {
	max-width: 100%;
}

.tp-nl-input {
	width: 100%;
	padding: 13px 16px;
	border: 1.5px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	outline: none;
	transition: border-color .2s;
	box-sizing: border-box;
}

.tp-nl-input:focus {
	border-color: #111;
}

.tp-nl-btn {
	width: 100%;
	padding: 14px 16px;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	cursor: pointer;
	transition: background .2s;
}

.tp-nl-btn:hover {
	background: #333;
}

.tp-nl-btn:disabled {
	background: #999;
	cursor: not-allowed;
}

.tp-nl-error {
	font-size: 12px;
	color: #c0392b;
	margin: 0;
	display: none;
}

.tp-nl-error.visible {
	display: block;
}

/* Estado de éxito */
.tp-nl-success {
	display: none;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	padding: 8px 0;
}

.tp-nl-centered .tp-nl-success {
	width: 100%;
}

.tp-nl-success.visible {
	display: flex;
}

.tp-nl-success-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #111;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tp-nl-success-icon svg {
	width: 26px;
	height: 26px;
	stroke: #fff;
	stroke-width: 2.5;
	fill: none;
}

.tp-nl-success-text {
	font-size: 15px;
	font-weight: 600;
	color: #111;
	margin: 0;
}

.tp-nl-coupon-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}

.tp-nl-coupon-label {
	font-size: 12px;
	color: #666;
	margin: 0;
}

.tp-nl-coupon-pill {
	background: #f0f0f0;
	border: 2px dashed #bbb;
	border-radius: 6px;
	padding: 10px 20px;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: .1em;
	color: #111;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}

.tp-nl-coupon-pill:hover {
	background: #e8e8e8;
	border-color: #888;
}

.tp-nl-copy-confirm {
	font-size: 12px;
	color: #2e7d32;
	font-weight: 600;
	opacity: 0;
	transition: opacity .2s;
}

.tp-nl-copy-confirm.visible {
	opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Slideshow
───────────────────────────────────────────────────────────────────────────── */

.tp-nl-image-col {
	position: relative;
	overflow: hidden;
}

/* En desktop las slides son absolutas y se superponen dentro del contenedor
   que ya tiene altura por el flex stretch del layout split. */
.tp-nl-image-col.tp-nl-has-slideshow {
	position: relative;
}

.tp-nl-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
	transition: opacity .4s ease;
}

.tp-nl-slide.active {
	opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Responsive
───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	.tp-nl-modal.tp-nl-split {
		flex-direction: column;
		max-height: 95vh;
		overflow-y: auto;
	}

	.tp-nl-split .tp-nl-image-col,
	.tp-nl-centered .tp-nl-image-col {
		flex: none;
		width: 100%;
		height: 55vw;
		min-height: 180px;
		max-height: 280px;
	}

	.tp-nl-split .tp-nl-image-col img,
	.tp-nl-centered .tp-nl-image-col img {
		width: 100%;
		height: 100%;
		max-height: none;
		object-fit: cover;
		object-position: center top;
	}

	/* Slideshow en mobile: mismo contenedor con altura, slides absolutas. */
	.tp-nl-image-col.tp-nl-has-slideshow {
		height: 55vw;
		min-height: 180px;
		max-height: 280px;
	}

	.tp-nl-has-slideshow .tp-nl-slide {
		object-fit: cover;
		object-position: center top;
	}

	.tp-nl-split .tp-nl-content-col {
		padding: 28px 24px 32px;
		align-items: center;
		text-align: center;
	}

	.tp-nl-centered .tp-nl-content-col {
		padding: 28px 24px 32px;
	}

	.tp-nl-modal.tp-nl-centered {
		max-width: 100%;
	}

	.tp-nl-discount-badge {
		font-size: 52px;
	}
}
