.nms-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.nms-popup.nms-popup--preview {
	position: absolute;
	inset: 0;
	min-height: 360px;
	z-index: 1;
}
.nms-popup-dialog {
	position: relative;
	background: #fff;
	border-radius: 0.5em;
	max-width: 520px;
	width: 100%;
	padding: 1.25rem;
	box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.25);
	overflow: clip;
}
.nms-close {
	position: absolute;
	width: 2rem;
	height: 2rem;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
	align-items: center;
	justify-content: center;
	display: flex;
}
.nms-close--top-right {
	top: 1em;
	right: 1em;
}
.nms-close--top-left {
	top: 1em;
	left: 1em;
}
.nms-close--bottom-right {
	bottom: 1em;
	right: 1em;
	top: auto;
}
.nms-close--bottom-left {
	bottom: 1em;
	left: 1em;
	top: auto;
}
.nms-snooze {
	margin-bottom: 0.5rem;
	position: absolute;
	bottom: 1em;
}
.nms-snooze-btn {
	font-size: 0.85rem;
	background: transparent;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 0.35rem 0.5rem;
	cursor: pointer;
}
.nms-popup-body { display: flex; flex-direction: column; gap: 0.75rem; }
.nms-block-heading { margin: 0; font-size: 1.25rem; }
.nms-block-paragraph { font-size: 0.95rem; line-height: 1.5; }
.nms-block.nms-block-list,
ul.nms-block.nms-block-list {
	margin: 0.25rem 0 0;
	padding: 0.7rem 1rem 0.75rem 1.15rem;
	list-style: none;
	background: linear-gradient(165deg, #fafbfc 0%, #f0f2f5 55%, #e8ebef 100%);
	border: 1px solid #dfe3e8;
	border-radius: 0.5em;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.75),
		0 1px 3px rgba(15, 23, 42, 0.06);
}
.nms-block-list li {
	position: relative;
	margin: 0;
	padding: 0.4rem 0 0.4rem 1.15rem;
	line-height: 1.5;
	font-size: 0.95rem;
	color: #1d2327;
	letter-spacing: 0.01em;
}
.nms-block-list li + li {
	border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.nms-block-list li::before {
	content: '';
	position: absolute;
	left: 0.15rem;
	top: 0.85em;
	width: 0.38em;
	height: 0.38em;
	border-radius: 50%;
	background: linear-gradient(145deg, #2271b1 0%, #135e96 100%);
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.12);
}
.nms-block-image img,
.nms-block-image-img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}
.nms-block-image-wrap {
	position: relative;
	display: block;
	min-height: clamp(120px, 28vw, 200px);
	border-radius: 0.5em;
	overflow: hidden;
	background: linear-gradient(145deg, #eef0f3 0%, #e4e6ea 100%);
}
.nms-block-image-wrap--ready {
	min-height: 0;
	background: transparent;
}
.nms-image-skeleton {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(110deg, #e8eaed 0%, #f2f3f5 22%, #e8eaed 44%, #f2f3f5 66%, #e8eaed 100%);
	background-size: 220% 100%;
	animation: nmsSkeletonShimmer 1.4s ease-in-out infinite;
	pointer-events: none;
	transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.nms-image-skeleton--empty {
	animation-duration: 1.8s;
	opacity: 0.92;
}
.nms-image-skeleton--loading {
	opacity: 1;
}
.nms-block-image-img {
	display: block;
	width: 100%;
	position: relative;
	z-index: 0;
	opacity: 0;
	transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.nms-block-image-img--visible {
	opacity: 1;
	z-index: 2;
}
@keyframes nmsSkeletonShimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}
.nms-block-countdown,
.nms-countdown {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 0.5rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	font-size: .9em;
	letter-spacing: 0.04em;
	padding: 0.65rem 1rem;
	border-radius: 0.5em;
	/* background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
	color: #e8f4fc; */
	box-shadow: inset 0 0 0.5em rgba(0, 0, 0, 0.25);
}
.nms-countdown__segment {
	display: inline-flex;
	align-items: baseline;
	gap: 0.15rem;
}
.nms-countdown__value {
	display: inline-block;
	min-width: 1.6em;
	text-align: center;
	font-size: 1.2em;
	text-shadow: 0 0 12px rgba(255, 255, 255, .5);
}
.nms-countdown--pulse-0 .nms-countdown__value {
	animation: nmsCountPulse 1s ease-in-out infinite;
}
.nms-countdown--pulse-1 .nms-countdown__value {
	animation: nmsCountGlow 1s ease-in-out infinite;
}
@keyframes nmsCountPulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.06); opacity: 0.92; }
}
@keyframes nmsCountGlow {
	0%, 100% { text-shadow: 0 0 12px rgba(223, 255, 108, .5); }
	50% { text-shadow: 0 0 12px rgb(223, 255, 108); }
}
.nms-countdown-expired {
	font-size: 1rem;
	font-weight: 600;
	color: #1d2327;
	padding: 0.75rem 1rem;
	border-radius: 0.5em;
	background: linear-gradient(90deg, #fff5f5, #ffe8e8);
	border: 1px solid #f0b0b0;
	text-align: center;
	animation: nmsExpiredFade 0.6s ease-out;
}
@keyframes nmsExpiredFade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
.nms-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding: 0.5rem 0.9rem;
	box-sizing: border-box;
	background: var(--global-palette-btn-bg, #2271b1);
	color: #fff;
	border-radius: 6px;
	text-decoration: none;
	border: none;
	cursor: pointer;
}
.nms-btn-sm {
	font-size: 0.85rem;
	padding: 0.35rem 0.6rem;
	width: auto;
	display: inline-block;
}
.nms-block-reco {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 0.75rem;
}
.nms-reco-card {
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 0.5rem;
	text-align: center;
}
.nms-reco-card img { width: 100%; height: auto; border-radius: 6px; }
.nms-reco-title { font-size: 0.85rem; margin: 0.35rem 0; }
.nms-block-email input[type="email"] {
	width: 100%;
	margin-bottom: 0.5rem;
	padding: 0.45rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
}
.nms-email-status { font-size: 0.85rem; margin-top: 0.35rem; }
.nms-autoclose-bar {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 4px;
	background: rgba(34, 113, 177, 0.35);
}

/* Popup shell: smooth enter / leave (backdrop + card) */
.nms-popup-shell-enter-active,
.nms-popup-shell-leave-active {
	transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.nms-popup-shell-enter-active .nms-popup-dialog,
.nms-popup-shell-leave-active .nms-popup-dialog {
	transition:
		opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}
.nms-popup-shell-enter-from,
.nms-popup-shell-leave-to {
	opacity: 0;
}
.nms-popup-shell-enter-from .nms-popup-dialog {
	opacity: 0;
	transform: scale(0.92) translateY(1rem);
}
.nms-popup-shell-leave-to .nms-popup-dialog {
	opacity: 0;
	transform: scale(0.94) translateY(-0.65rem);
}
.nms-popup-shell-enter-to,
.nms-popup-shell-leave-from {
	opacity: 1;
}
.nms-popup-shell-enter-to .nms-popup-dialog,
.nms-popup-shell-leave-from .nms-popup-dialog {
	opacity: 1;
	transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.nms-popup-shell-enter-active,
	.nms-popup-shell-leave-active,
	.nms-popup-shell-enter-active .nms-popup-dialog,
	.nms-popup-shell-leave-active .nms-popup-dialog {
		transition-duration: 0.01ms !important;
	}
	.nms-image-skeleton {
		animation: none;
	}
}

/* Admin (WP shell) */
.nms-admin-root {
	padding: 12px 16px 32px;
	max-width: 1280px;
}
.nms-err { color: #b32d2e; }
.nms-editor-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.nms-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
}
@media (max-width: 1100px) {
	.nms-grid { grid-template-columns: 1fr; }
}
.nms-col label { display: block; margin-bottom: 10px; }
.nms-target-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-bottom: 6px;
}
.nms-block-editor {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 10px;
	margin-bottom: 10px;
	background: #fff;
}
.nms-block-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}
.nms-preview-frame {
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	height: 100vh;
	background: #f6f7f7;
	position: relative;
	overflow: auto;
}
