.wtnp-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
	pointer-events: none;
	opacity: 0;
	transition: opacity 180ms ease;
}

.wtnp-popup.is-visible {
	pointer-events: auto;
	opacity: 1;
}

.wtnp-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 14, 25, 0.48);
	backdrop-filter: blur(8px);
}

.wtnp-popup__panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(176px, 34%) minmax(0, 1fr);
	width: min(100%, 620px);
	min-height: 318px;
	overflow: hidden;
	border: 1px solid var(--wtapp-shell-line, rgba(100, 116, 139, 0.18));
	border-radius: 18px;
	background:
		radial-gradient(circle at top right, color-mix(in srgb, var(--wtapp-shell-brand, #3666f4) 14%, transparent), transparent 34%),
		linear-gradient(180deg, var(--wtapp-shell-surface-strong, #fff), var(--wtapp-shell-surface, #f1f5ff));
	box-shadow: var(--wtapp-shell-shadow, 0 24px 70px rgba(15, 23, 42, 0.22));
	color: var(--wtapp-shell-ink, #111827);
	font-family: var(--wtapp-font-ui, "Trebuchet MS", "Gill Sans", sans-serif);
	transform: translateY(12px) scale(0.98);
	transition: transform 180ms ease;
}

.wtnp-popup.is-visible .wtnp-popup__panel {
	transform: translateY(0) scale(1);
}

.wtnp-popup__panel--text-only {
	grid-template-columns: minmax(0, 1fr);
	width: min(100%, 500px);
	min-height: 0;
}

.wtnp-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid color-mix(in srgb, var(--wtapp-shell-brand, #3666f4) 24%, var(--wtapp-shell-line, rgba(100, 116, 139, 0.18)));
	border-radius: 50%;
	background: color-mix(in srgb, var(--wtapp-shell-surface-strong, #fff) 94%, transparent);
	color: var(--wtapp-shell-brand, #3666f4);
	font: inherit;
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
	transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.wtnp-popup__close:focus-visible,
.wtnp-popup__action:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--wtapp-shell-brand, #3666f4) 34%, transparent);
	outline-offset: 3px;
}

.wtnp-popup__media {
	display: grid;
	place-items: center;
	min-height: 100%;
	padding: 16px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
		color-mix(in srgb, var(--wtapp-shell-brand, #3666f4) 11%, var(--wtapp-shell-surface, #f1f5ff));
	border-right: 1px solid color-mix(in srgb, var(--wtapp-shell-line, rgba(100, 116, 139, 0.18)) 72%, transparent);
}

.wtnp-popup__media img {
	display: block;
	width: min(100%, 176px);
	max-height: 286px;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	object-position: center;
	border-radius: 12px;
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.wtnp-popup__body {
	display: grid;
	align-content: center;
	gap: 14px;
	padding: 38px 32px 32px;
}

.wtnp-popup__eyebrow {
	width: fit-content;
	max-width: 100%;
	padding: 6px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--wtapp-shell-brand, #3666f4) 12%, transparent);
	color: var(--wtapp-shell-brand, #3666f4);
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
}

.wtnp-popup__title {
	margin: 0;
	padding-right: 30px;
	color: var(--wtapp-shell-ink, #111827);
	font-family: var(--wtapp-font-display, "Palatino Linotype", "Book Antiqua", Palatino, serif);
	font-size: 1.55rem;
	line-height: 1.16;
	letter-spacing: 0;
}

.wtnp-popup__message {
	margin: 0;
	color: var(--wtapp-shell-muted, #4b5565);
	font-size: 1rem;
	line-height: 1.55;
}

.wtnp-popup__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 2px;
}

.wtnp-popup__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	max-width: 100%;
	padding: 11px 18px;
	border: 1px solid color-mix(in srgb, var(--wtapp-shell-brand-deep, #2148bc) 48%, transparent);
	border-radius: 12px;
	background: linear-gradient(135deg, var(--wtapp-shell-brand, #3666f4), var(--wtapp-shell-brand-deep, #2148bc));
	color: #fff;
	font-size: 0.96rem;
	font-weight: 800;
	line-height: 1.15;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	box-shadow: 0 10px 20px color-mix(in srgb, var(--wtapp-shell-brand, #3666f4) 24%, transparent);
	transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.wtnp-popup__action:hover {
	background: linear-gradient(135deg, var(--wtapp-shell-brand-deep, #2148bc), var(--wtapp-shell-brand, #3666f4));
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.wtnp-popup__close:hover {
	background: #fff;
	border-color: color-mix(in srgb, var(--wtapp-shell-brand, #3666f4) 42%, var(--wtapp-shell-line, rgba(100, 116, 139, 0.18)));
	transform: translateY(-1px);
}

@media (max-width: 640px) {
	.wtnp-popup {
		align-items: end;
		padding: 12px;
	}

	.wtnp-popup__panel {
		grid-template-columns: 1fr;
		width: 100%;
		min-height: 0;
		max-height: calc(100vh - 24px);
		overflow-y: auto;
		border-radius: 18px;
	}

	.wtnp-popup__media {
		min-height: 154px;
		padding: 12px;
		border-right: 0;
		border-bottom: 1px solid color-mix(in srgb, var(--wtapp-shell-line, rgba(100, 116, 139, 0.18)) 72%, transparent);
	}

	.wtnp-popup__media img {
		width: auto;
		max-width: min(42vw, 128px);
		max-height: 172px;
	}

	.wtnp-popup__body {
		align-content: start;
		gap: 12px;
		padding: 22px 20px 22px;
	}

	.wtnp-popup__title {
		font-size: 1.34rem;
	}

	.wtnp-popup__message {
		font-size: 0.96rem;
	}

	.wtnp-popup__actions {
		align-items: stretch;
	}

	.wtnp-popup__action {
		width: 100%;
		min-height: 46px;
		padding-inline: 14px;
	}
}
