/**
 * Creative Popup — WhatsApp Chat Template
 * Copia este archivo a views/css/whatsapp-chat.css o pégalo en el Style Editor del módulo.
 */

.cp-whatsapp-chat {
	--cp-wa-width: 700px;
	--cp-wa-height: 700px;
	--cp-wa-header-bg: #008069;
	--cp-wa-header-text: #ffffff;
	--cp-wa-incoming-bg: #ffffff;
	--cp-wa-outgoing-bg: #d9fdd3;
	--cp-wa-text: #111b21;
	--cp-wa-meta: #667781;
	--cp-wa-typing-bg: #ffffff;
	--cp-wa-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	--cp-wa-radius: 12px;
	--cp-wa-font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;

	box-sizing: border-box;
	width: var(--cp-wa-width);
	height: var(--cp-wa-height);
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	font-family: var(--cp-wa-font);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--cp-wa-radius);
	box-shadow: var(--cp-wa-shadow);
	background: #efeae2;
	position: relative;
}

.cp-whatsapp-chat *,
.cp-whatsapp-chat *::before,
.cp-whatsapp-chat *::after {
	box-sizing: border-box;
}

/* ── Header ── */
.cp-wa-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	background: var(--cp-wa-header-bg);
	color: var(--cp-wa-header-text);
	flex-shrink: 0;
	min-height: 60px;
}

.cp-wa-avatar-ring,
.cp-wa-notify-avatar-ring {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #ffffff;
	padding: 5px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.cp-wa-notify-avatar-ring {
	width: 48px;
	height: 48px;
	padding: 6px;
}

.cp-wa-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: contain;
	background: #ffffff;
	display: block;
	padding: 0;
	box-shadow: none;
	flex-shrink: 0;
}

.cp-wa-header-info {
	flex: 1;
	min-width: 0;
}

.cp-wa-name {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cp-wa-status {
	font-size: 13px;
	opacity: 0.85;
	line-height: 1.2;
}

.cp-wa-header-close {
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.9;
	padding: 0;
	flex-shrink: 0;
	transition: background 0.15s;
}

.cp-wa-header-close:hover {
	background: rgba(255, 255, 255, 0.15);
}

.cp-wa-header-close svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* ── Chat area ── */
.cp-wa-body {
	flex: 1;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
	background-color: #d9f0ec;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.cp-wa-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 16px 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	scroll-behavior: smooth;
}

.cp-wa-messages::-webkit-scrollbar {
	width: 6px;
}

.cp-wa-messages::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

/* ── Message rows ── */
.cp-wa-row,
.cp-wa-typing-row {
	display: flex;
	width: 100%;
	align-items: flex-end;
	gap: 6px;
	opacity: 0;
	transform: translateY(12px) scale(0.96);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.cp-wa-row.cp-wa-visible,
.cp-wa-typing-row.cp-wa-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.cp-wa-row.cp-wa-incoming,
.cp-wa-typing-row {
	justify-content: flex-start;
}

.cp-wa-row.cp-wa-outgoing {
	justify-content: flex-end;
}

.cp-wa-msg-avatar {
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
	margin-bottom: 2px;
	letter-spacing: -0.02em;
}

.cp-wa-msg-avatar-incoming {
	background: #008069;
	color: #ffffff;
}

.cp-wa-msg-avatar-outgoing {
	background: #8696a0;
	color: #ffffff;
}

.cp-wa-msg-content {
	display: flex;
	flex-direction: column;
	max-width: calc(75% - 34px);
}

.cp-wa-bubble {
	max-width: 100%;
	padding: 6px 8px 4px 9px;
	border-radius: 8px;
	position: relative;
	box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
	word-wrap: break-word;
	white-space: pre-wrap;
}

.cp-wa-incoming .cp-wa-bubble {
	background: var(--cp-wa-incoming-bg);
	border-top-left-radius: 0;
	color: var(--cp-wa-text);
}

.cp-wa-outgoing .cp-wa-bubble {
	background: var(--cp-wa-outgoing-bg);
	border-top-right-radius: 0;
	color: var(--cp-wa-text);
}

.cp-wa-bubble-text {
	font-size: 14.2px;
	line-height: 19px;
	padding-right: 4px;
}

.cp-wa-bubble-text-bold {
	font-weight: 700;
	line-height: 1.45;
}

.cp-wa-bubble-text-big {
	font-size: 1.45rem;
	font-weight: 700;
	text-align: center;
	color: #008069;
	line-height: 1.25;
	padding: 4px 2px;
}

.cp-wa-bubble-big {
	padding: 10px 12px 6px;
}

.cp-wa-bubble-bold-footer {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	font-size: 14.2px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--cp-wa-text);
	white-space: normal;
}

.cp-wa-bubble-big-footer {
	margin-top: 12px;
	padding-top: 4px;
	font-size: 1.45rem;
	font-weight: 700;
	text-align: center;
	color: #008069;
	line-height: 1.25;
	white-space: normal;
}

.cp-wa-bubble-meta {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
}

.cp-wa-time {
	font-size: 11px;
	color: var(--cp-wa-meta);
	line-height: 1;
}

/* ── Typing indicator ── */
.cp-wa-typing-row.cp-wa-visible {
	opacity: 1;
	transform: translateY(0);
}

.cp-wa-typing {
	background: var(--cp-wa-typing-bg);
	border-radius: 8px;
	border-top-left-radius: 0;
	padding: 12px 14px;
	box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
	display: flex;
	gap: 4px;
	align-items: center;
	min-width: 52px;
}

.cp-wa-typing span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #b3b3b3;
	animation: cp-wa-dot 1.4s infinite ease-in-out both;
}

.cp-wa-typing span:nth-child(1) { animation-delay: 0s; }
.cp-wa-typing span:nth-child(2) { animation-delay: 0.2s; }
.cp-wa-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cp-wa-dot {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
	40% { transform: scale(1); opacity: 1; }
}

/* ── Footer / CTA ── */
.cp-wa-footer {
	padding: 10px 16px 14px;
	background: #f0f2f5;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	flex-shrink: 0;
}

.cp-wa-cta {
	display: block;
	width: 100%;
	padding: 12px 16px;
	background: #25d366;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s;
	font-family: inherit;
}

.cp-wa-cta:hover {
	background: #20bd5a;
	color: #fff;
	text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 740px) {
	.cp-whatsapp-chat {
		--cp-wa-width: 100%;
		--cp-wa-height: 100dvh;
		border-radius: 0;
		width: 100%;
		height: 100dvh;
		height: var(--cp-wa-mobile-vh, 100dvh);
		min-height: 100dvh;
		min-height: var(--cp-wa-mobile-vh, 100dvh);
		max-width: 100vw;
		max-height: 100dvh;
		max-height: var(--cp-wa-mobile-vh, 100dvh);
	}
}

/* ══════════════════════════════════════════
   Notificación lateral — "Nuevo mensaje"
   ══════════════════════════════════════════ */

.cp-wa-notify {
	--cp-wa-notify-bg: #ffffff;
	--cp-wa-notify-width: 340px;

	position: fixed;
	bottom: 24px;
	z-index: 9999998;
	width: var(--cp-wa-notify-width);
	max-width: calc(100vw - 32px);
	background: var(--cp-wa-notify-bg);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
	font-family: var(--cp-wa-font, "Segoe UI", sans-serif);
	cursor: pointer;
	opacity: 0;
	transform: translateX(calc(100% + 40px));
	transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
	overflow: hidden;
}

.cp-wa-notify.cp-wa-notify-left {
	left: 24px;
	transform: translateX(calc(-100% - 40px));
}

.cp-wa-notify.cp-wa-notify-right {
	right: 24px;
}

.cp-wa-notify.cp-wa-notify-visible {
	opacity: 1;
	transform: translateX(0);
	pointer-events: auto;
}

.cp-wa-notify.cp-wa-notify-hiding {
	opacity: 0;
	transform: translateX(calc(100% + 40px));
	pointer-events: none;
}

.cp-wa-notify.cp-wa-notify-left.cp-wa-notify-hiding {
	transform: translateX(calc(-100% - 40px));
}

.cp-wa-notify::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: #25d366;
	border-radius: 12px 0 0 12px;
}

.cp-wa-notify-close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 24px;
	height: 24px;
	border: none;
	background: transparent;
	color: #8696a0;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	z-index: 2;
	transition: background 0.15s, color 0.15s;
}

.cp-wa-notify-close:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #54656f;
}

.cp-wa-notify-inner {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 36px 14px 16px;
}

.cp-wa-notify-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: contain;
	background: #ffffff;
	display: block;
	padding: 0;
	box-shadow: none;
	flex-shrink: 0;
}

.cp-wa-notify-avatar-placeholder {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #008069;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 20px;
	font-weight: 600;
}

.cp-wa-notify-content {
	flex: 1;
	min-width: 0;
}

.cp-wa-notify-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 2px;
}

.cp-wa-notify-name {
	font-size: 15px;
	font-weight: 600;
	color: #111b21;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cp-wa-notify-time {
	font-size: 12px;
	color: #25d366;
	flex-shrink: 0;
	font-weight: 500;
}

.cp-wa-notify-preview {
	font-size: 14px;
	color: #667781;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cp-wa-notify-badge {
	position: absolute;
	bottom: 14px;
	right: 14px;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	background: #25d366;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.cp-wa-notify:hover {
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
	.cp-wa-notify {
		--cp-wa-notify-width: calc(100vw - 32px);
		bottom: 16px;
	}

	.cp-wa-notify.cp-wa-notify-right { right: 16px; }
	.cp-wa-notify.cp-wa-notify-left  { left: 16px; }
}

/* ══════════════════════════════════════════
   Preview — animación en wrapper (no en el chat)
   ══════════════════════════════════════════ */

.cp-wa-preview-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999990;
	display: flex;
	background: rgba(0, 0, 0, 0);
	backdrop-filter: blur(0);
	-webkit-backdrop-filter: blur(0);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.35s ease, visibility 0.35s ease, background 0.35s ease, backdrop-filter 0.35s ease;
	pointer-events: none;
}

.cp-wa-preview-overlay.is-open,
.cp-wa-preview-overlay.is-closing {
	visibility: visible;
	pointer-events: auto;
}

.cp-wa-preview-overlay.is-open {
	opacity: 1;
	background: rgba(0, 0, 0, 0.48);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.cp-wa-preview-overlay.is-closing {
	opacity: 0;
	background: rgba(0, 0, 0, 0);
	backdrop-filter: blur(0);
	-webkit-backdrop-filter: blur(0);
	pointer-events: none;
}

.cp-wa-preview-stage {
	position: absolute;
	display: flex;
	padding: 24px;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.cp-wa-preview-panel {
	pointer-events: auto;
	will-change: transform, opacity;
	width: 700px;
	height: 700px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
}

.cp-wa-preview-panel .cp-whatsapp-chat {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}

.cp-wa-preview-stage-br {
	align-items: flex-end;
	justify-content: flex-end;
}

.cp-wa-preview-stage-bl {
	align-items: flex-end;
	justify-content: flex-start;
}

.cp-wa-preview-stage-center {
	align-items: center;
	justify-content: center;
}

/* Panel oculto cuando el overlay está cerrado */
.cp-wa-preview-overlay:not(.is-open):not(.is-closing) .cp-wa-preview-panel {
	opacity: 0;
	visibility: hidden;
}

/* Entrada limpia: slide up suave, sin rebote ni scale raro */
.cp-wa-preview-stage-br .cp-wa-preview-panel.cp-wa-panel-enter {
	animation: cp-wa-panel-enter-br 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cp-wa-preview-stage-bl .cp-wa-preview-panel.cp-wa-panel-enter {
	animation: cp-wa-panel-enter-bl 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cp-wa-preview-stage-center .cp-wa-preview-panel.cp-wa-panel-enter {
	animation: cp-wa-panel-enter-center 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cp-wa-panel-enter-br {
	from {
		opacity: 0;
		transform: translateY(48px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes cp-wa-panel-enter-bl {
	from {
		opacity: 0;
		transform: translateY(48px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes cp-wa-panel-enter-center {
	from {
		opacity: 0;
		transform: translateY(36px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Salida */
.cp-wa-preview-panel.cp-wa-panel-exit {
	animation: cp-wa-panel-exit 0.32s ease forwards;
}

@keyframes cp-wa-panel-exit {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(32px);
	}
}

/* Notificación → popup */
.cp-wa-notify.cp-wa-notify-launching {
	opacity: 0 !important;
	transform: scale(0.92) translateY(12px) !important;
	transition: opacity 0.25s ease, transform 0.28s ease !important;
	pointer-events: none !important;
}

@media (max-width: 740px) {
	.cp-wa-preview-overlay.is-open,
	.cp-wa-preview-overlay.is-open .cp-wa-preview-stage {
		height: 100dvh;
		height: var(--cp-wa-mobile-vh, 100dvh);
		min-height: 100dvh;
		min-height: var(--cp-wa-mobile-vh, 100dvh);
	}

	.cp-wa-preview-panel {
		width: 100%;
		height: 100%;
		height: 100dvh;
		height: var(--cp-wa-mobile-vh, 100dvh);
		max-width: 100vw;
		max-height: 100dvh;
		max-height: var(--cp-wa-mobile-vh, 100dvh);
		min-height: 100dvh;
		min-height: var(--cp-wa-mobile-vh, 100dvh);
	}

	.cp-wa-preview-stage {
		padding: 0;
		align-items: stretch !important;
		justify-content: stretch !important;
	}

	.cp-wa-preview-stage-br .cp-wa-preview-panel.cp-wa-panel-enter,
	.cp-wa-preview-stage-bl .cp-wa-preview-panel.cp-wa-panel-enter {
		animation-name: cp-wa-panel-enter-mobile;
	}

	@keyframes cp-wa-panel-enter-mobile {
		from {
			opacity: 0;
			transform: translateY(100%);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

/* Pantalla clickeable mientras la notificación está visible */
.cp-wa-notify-screen {
	position: fixed;
	inset: 0;
	z-index: 999990;
	background: transparent;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.35s ease;
}

.cp-wa-notify-screen.cp-wa-notify-screen-visible {
	opacity: 1;
}

.cp-wa-notify.cp-wa-notify-no-close {
	cursor: pointer;
}

.cp-wa-notify.cp-wa-notify-no-close .cp-wa-notify-inner {
	padding-right: 12px;
}

/* Chat bloqueado — sin cerrar hasta el banner */
.cp-whatsapp-chat.cp-wa-locked .cp-wa-header-close {
	display: none !important;
}

body.cp-wa-chat-locked .cp-popup-overlay {
	cursor: default;
}

/* Ocultar botón cerrar nativo de Creative Popup mientras el chat está bloqueado */
.cp-popup-visible:has(.cp-whatsapp-chat.cp-wa-locked) .cp-popup-close-button,
body.cp-wa-chat-locked .cp-popup-close-button {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	opacity: 0 !important;
}

.cp-wa-preview-overlay.cp-wa-chat-hiding,
.cp-popup-overlay.cp-wa-cp-banner-mode {
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	background: transparent !important;
	pointer-events: none;
}

.cp-wa-preview-overlay.cp-wa-chat-hiding .cp-wa-preview-panel,
.cp-whatsapp-chat.cp-wa-chat-hiding {
	opacity: 0;
	transform: scale(0.88) translateY(24px);
	transition:
		opacity 0.38s ease,
		transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

/* Banner final — por encima de todo (Creative Popup usa z-index 9999999) */
.cp-wa-banner-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	pointer-events: none;
	isolation: isolate;
}

.cp-wa-banner-overlay.is-open {
	pointer-events: auto;
}

.cp-wa-banner-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 20, 24, 0.62);
	opacity: 0;
	transition: opacity 0.45s ease;
}

.cp-wa-banner-overlay.is-open .cp-wa-banner-backdrop {
	opacity: 1;
}

.cp-wa-banner-panel {
	position: relative;
	z-index: 1;
	width: min(calc(100vw - 32px), 700px);
	height: min(calc(100vh - 32px), 700px);
	border-radius: 16px;
	overflow: hidden;
	box-shadow:
		0 24px 80px rgba(0, 0, 0, 0.45),
		0 0 0 1px rgba(255, 255, 255, 0.08);
	transform: scale(0.55) translateY(48px);
	opacity: 0;
	transition:
		transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.48s ease;
}

.cp-wa-banner-overlay.is-open .cp-wa-banner-panel {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.cp-wa-banner-panel img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #f9f7f2;
	filter: none;
}

.cp-wa-banner-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.cp-wa-banner-close:hover {
	background: rgba(0, 0, 0, 0.75);
	transform: scale(1.06);
}

/* Bloqueo scroll solo en preview local (Creative Popup ya bloquea en popups reales) */
html.cp-wa-scroll-lock,
body.cp-wa-scroll-lock {
	overflow: hidden;
}

/* ══════════════════════════════════════════
   Móvil — pantalla completa estilo WhatsApp
   ══════════════════════════════════════════ */
@media (max-width: 740px) {
	/* Notificación tipo push nativa */
	.cp-wa-notify {
		--cp-wa-notify-width: calc(100vw - 24px);
		bottom: max(12px, env(safe-area-inset-bottom));
		border-radius: 14px;
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
	}

	.cp-wa-notify.cp-wa-notify-right {
		right: max(12px, env(safe-area-inset-right));
	}

	.cp-wa-notify.cp-wa-notify-left {
		left: max(12px, env(safe-area-inset-left));
	}

	.cp-wa-notify-screen {
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
	}

	/* Preview local: chat a pantalla completa */
	.cp-wa-preview-overlay.is-open {
		background: #efeae2;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		height: 100dvh;
		height: var(--cp-wa-mobile-vh, 100dvh);
		min-height: 100dvh;
		min-height: var(--cp-wa-mobile-vh, 100dvh);
	}

	.cp-wa-preview-panel {
		width: 100%;
		height: 100dvh;
		height: var(--cp-wa-mobile-vh, 100dvh);
		max-width: 100vw;
		max-height: 100dvh;
		max-height: var(--cp-wa-mobile-vh, 100dvh);
		min-height: 100dvh;
		min-height: var(--cp-wa-mobile-vh, 100dvh);
		border-radius: 0;
	}

	.cp-wa-preview-panel .cp-whatsapp-chat {
		border-radius: 0;
		box-shadow: none;
		height: 100%;
		height: 100dvh;
		height: var(--cp-wa-mobile-vh, 100dvh);
		min-height: 100dvh;
		min-height: var(--cp-wa-mobile-vh, 100dvh);
		padding-top: env(safe-area-inset-top);
		padding-bottom: env(safe-area-inset-bottom);
	}

	/* Creative Popup en tienda: forzar fullscreen solo en popups WhatsApp */
	.cp-popup-visible:has(.cp-whatsapp-chat) {
		position: fixed !important;
		inset: 0 !important;
		left: 0 !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100vw !important;
		height: 100dvh !important;
		height: var(--cp-wa-mobile-vh, 100dvh) !important;
		min-height: 100dvh !important;
		min-height: var(--cp-wa-mobile-vh, 100dvh) !important;
		max-width: none !important;
		max-height: none !important;
		margin: 0 !important;
		transform: none !important;
	}

	.cp-popup-visible:has(.cp-whatsapp-chat) .cp-popup-inner,
	.cp-popup-visible:has(.cp-whatsapp-chat) form.cp-ps-container,
	.cp-popup-visible:has(.cp-whatsapp-chat) .cp-ps-container,
	.cp-popup-visible:has(.cp-whatsapp-chat) .cp-container,
	.cp-popup-visible:has(.cp-whatsapp-chat) .cp-layers,
	.cp-popup-visible:has(.cp-whatsapp-chat) .cp-slide {
		position: absolute !important;
		inset: 0 !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		width: 100% !important;
		height: 100% !important;
		height: 100dvh !important;
		height: var(--cp-wa-mobile-vh, 100dvh) !important;
		min-height: 100% !important;
		max-width: none !important;
		max-height: none !important;
		margin: 0 !important;
		margin-left: 0 !important;
		margin-top: 0 !important;
		transform: none !important;
	}

	.cp-popup-visible:has(.cp-whatsapp-chat) .cp-whatsapp-chat {
		width: 100% !important;
		height: 100% !important;
		height: 100dvh !important;
		height: var(--cp-wa-mobile-vh, 100dvh) !important;
		min-height: 100dvh;
		min-height: var(--cp-wa-mobile-vh, 100dvh);
		border-radius: 0;
		box-shadow: none;
		padding-top: env(safe-area-inset-top);
		padding-bottom: env(safe-area-inset-bottom);
	}

	/* Ocultar botón cerrar nativo de CP (usamos el del chat / banner) */
	.cp-popup-visible:has(.cp-whatsapp-chat.cp-wa-locked) .cp-popup-close-button {
		display: none !important;
	}

	/* regla global arriba — mantener en móvil por compatibilidad */

	/* Banner final a pantalla completa */
	.cp-wa-banner-overlay {
		padding: 0;
		align-items: stretch;
		justify-content: stretch;
	}

	.cp-wa-banner-panel {
		width: 100%;
		height: 100%;
		max-width: 100vw;
		max-height: 100dvh;
		border-radius: 0;
		box-shadow: none;
		transform: scale(0.92) translateY(100%);
	}

	.cp-wa-banner-overlay.is-open .cp-wa-banner-panel {
		transform: scale(1) translateY(0);
	}

	.cp-wa-banner-panel img {
		object-fit: contain;
		padding:
			max(12px, env(safe-area-inset-top))
			max(12px, env(safe-area-inset-right))
			max(12px, env(safe-area-inset-bottom))
			max(12px, env(safe-area-inset-left));
	}

	.cp-wa-banner-close {
		top: max(12px, env(safe-area-inset-top));
		right: max(12px, env(safe-area-inset-right));
		width: 40px;
		height: 40px;
	}
}
