/* Exit-intent popup (includes/exit-popup.php). Same ticket design as
   the shapedplugin-offer landing popup; resets keep theme styles out. */

.sp-op-exit {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: safe center;
	justify-content: center;
	box-sizing: border-box;
	padding: 24px;
	overflow-y: auto;
	background: rgba(3, 7, 18, 0.62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.4;
	text-align: left;
}

.sp-op-exit[hidden] {
	display: none;
}

.sp-op-exit *,
.sp-op-exit *::before,
.sp-op-exit *::after {
	box-sizing: border-box;
}

.sp-op-exit__dialog {
	position: relative;
	flex: none;
	width: min(440px, 100%);
	margin: auto 0;
	outline: none;
	filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6));
	animation: sp-op-exit-up 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sp-op-exit .sp-op-exit__dialog:focus,
.sp-op-exit .sp-op-exit__dialog:focus-visible {
	outline: none;
	box-shadow: none;
}

.sp-op-exit__card {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	-webkit-mask: radial-gradient(circle 14px at 0 244px, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 244px, #0000 98%, #000) right / 51% 100% no-repeat;
	mask: radial-gradient(circle 14px at 0 244px, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 14px at 100% 244px, #0000 98%, #000) right / 51% 100% no-repeat;
}

.sp-op-exit__top {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 244px;
	padding: 32px 28px 0;
	background: radial-gradient(80% 90% at 50% 0%, #8b5cf6, #5b21b6 70%, #3b0f8c);
	color: #fff;
	text-align: center;
}

.sp-op-exit__top::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
	background-size: 28px 28px;
	-webkit-mask-image: radial-gradient(90% 80% at 50% 0%, #000 30%, transparent 80%);
	mask-image: radial-gradient(90% 80% at 50% 0%, #000 30%, transparent 80%);
}

.sp-op-exit__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-op-exit__close svg {
	transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-op-exit__close:hover,
.sp-op-exit__close:focus-visible {
	background: rgba(255, 255, 255, 0.26);
	color: #fff;
	transform: scale(1.08);
}

.sp-op-exit__close:hover svg {
	transform: rotate(90deg);
}

.sp-op-exit__title {
	position: relative;
	margin: 4px 0 0;
	padding: 0;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
	text-wrap: balance;
}

.sp-op-exit__subtitle {
	display: block;
	color: #e9d5ff;
	font-weight: 600;
}

.sp-op-exit__deal {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 10px;
	margin-top: 20px;
}

.sp-op-exit__pre {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #e9d5ff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}

.sp-op-exit__big {
	color: #fff;
	font-size: clamp(56px, 13vw, 80px);
	font-weight: 800;
	line-height: 0.85;
	letter-spacing: -0.05em;
	white-space: nowrap;
}

.sp-op-exit__sub {
	position: relative;
	margin-top: 8px;
	color: #e9d5ff;
	font-size: 14px;
}

.sp-op-exit__rule {
	height: 0;
	margin: 0 22px;
	border-top: 2px dashed #ddd6fe;
	background: #fff;
}

.sp-op-exit__bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 22px 28px 18px;
	background: #fff;
	color: #1e2939;
}

.sp-op-exit__timer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-variant-numeric: tabular-nums;
}

.sp-op-exit__ends {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #be123c;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sp-op-exit__pulse {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fb7185;
	animation: sp-op-exit-pulse 1.6s ease-in-out infinite;
}

.sp-op-exit__units {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.sp-op-exit__unit {
	display: inline-flex;
	align-items: baseline;
	gap: 2px;
}

.sp-op-exit__num {
	color: #030712;
	font-size: 20px;
	font-weight: 700;
}

.sp-op-exit__lbl {
	color: #6a7282;
	font-size: 12px;
	font-weight: 500;
}

.sp-op-exit__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
}

.sp-op-exit a.sp-op-exit__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 54px;
	border-radius: 999px;
	background: #7c3aed;
	box-shadow: 0 14px 34px -12px rgba(124, 58, 237, 0.7);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.18s ease;
}

.sp-op-exit a.sp-op-exit__cta:hover,
.sp-op-exit a.sp-op-exit__cta:focus-visible {
	background: #6d28d9;
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px) scale(1.02);
}

.sp-op-exit__dismiss {
	height: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0 12px;
	border: none;
	background: transparent;
	box-shadow: none;
	color: #6a7282;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	text-transform: none;
	cursor: pointer;
	transition: color 0.2s ease;
}

.sp-op-exit__dismiss:hover,
.sp-op-exit__dismiss:focus-visible {
	background: transparent;
	color: #030712;
}

@keyframes sp-op-exit-up {

	from {
		opacity: 0;
		transform: translateY(16px) scale(0.97);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes sp-op-exit-pulse {

	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.6);
	}

	50% {
		box-shadow: 0 0 0 6px rgba(251, 113, 133, 0);
	}
}

@media (prefers-reduced-motion: reduce) {

	.sp-op-exit__dialog,
	.sp-op-exit__pulse {
		animation: none;
	}

	.sp-op-exit__close,
	.sp-op-exit__close svg,
	.sp-op-exit a.sp-op-exit__cta {
		transition: none;
	}
}
