/**
 * Exit-Intent Popup — Delancey Street lead capture
 *
 * Loaded only on MCA pages, listicles, and blog posts.
 * Markup: template-parts/exit-intent-popup.php
 * Behavior: assets/js/exit-intent.js
 */

.zg-eip-overlay[hidden] {
	display: none;
}

.zg-eip-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.72);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.zg-eip-overlay.is-visible {
	opacity: 1;
}

html.zg-eip-lock {
	overflow: hidden;
}

.zg-eip-modal {
	position: relative;
	width: 100%;
	max-width: 460px;
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 30px 70px -15px rgba(15, 23, 42, 0.55);
	transform: translateY(24px) scale(0.96);
	opacity: 0;
	transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
	font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.zg-eip-overlay.is-visible .zg-eip-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.zg-eip-accent {
	height: 6px;
	background: linear-gradient(90deg, #008254 0%, #00c875 100%);
}

.zg-eip-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.06);
	color: #475569;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.zg-eip-close:hover {
	background: rgba(15, 23, 42, 0.12);
	color: #1b2a4a;
}

.zg-eip-close:focus-visible {
	outline: 2px solid #008254;
	outline-offset: 2px;
}

.zg-eip-body {
	padding: 32px 30px 28px;
	text-align: center;
}

.zg-eip-eyebrow {
	display: inline-block;
	margin-bottom: 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #008254;
}

.zg-eip-title {
	margin: 0 0 12px;
	font-size: 23px;
	line-height: 1.3;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #1b2a4a;
}

.zg-eip-desc {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.6;
	color: #475569;
}

.zg-eip-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.zg-eip-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 20px;
	border: 2px solid transparent;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.zg-eip-btn svg {
	flex-shrink: 0;
}

.zg-eip-btn:active {
	transform: translateY(1px);
}

.zg-eip-btn:focus-visible {
	outline: 2px solid #008254;
	outline-offset: 2px;
}

.zg-eip-btn--primary {
	background: #008254;
	color: #ffffff;
	box-shadow: 0 8px 20px -6px rgba(0, 130, 84, 0.6);
}

.zg-eip-btn--primary:hover {
	background: #006e47;
	color: #ffffff;
}

.zg-eip-btn--secondary {
	background: #ffffff;
	color: #1b2a4a;
	border-color: #1b2a4a;
}

.zg-eip-btn--secondary:hover {
	background: #1b2a4a;
	color: #ffffff;
}

.zg-eip-fineprint {
	margin: 16px 0 0;
	font-size: 12.5px;
	color: #94a3b8;
}

@media (max-width: 480px) {
	.zg-eip-body {
		padding: 28px 22px 24px;
	}

	.zg-eip-title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zg-eip-overlay,
	.zg-eip-modal {
		transition: opacity 0.01s linear;
	}

	.zg-eip-modal {
		transform: none;
	}
}
