/**
 * Exit-intent popup — aligned with Rising News / redamazonica (:root vars).
 */
.ra-exit-popup {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	font-family: inherit;
}

.ra-exit-popup.is-open {
	display: flex;
	animation: raExitPopupFade 0.28s ease-out;
}

.ra-exit-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 18, 14, 0.72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.ra-exit-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	background: var(--bg-clr, #fff);
	color: var(--clr-text, #1a1a1a);
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--border-clr, rgba(0, 0, 0, 0.07));
	padding: 2rem 1.6rem 1.45rem;
	text-align: center;
	animation: raExitPopupIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ra-exit-popup__close {
	position: absolute;
	top: 0.65rem;
	right: 0.65rem;
	width: 36px;
	height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-clr, rgba(0, 0, 0, 0.12));
	border-radius: 8px;
	background: var(--bg-clr, #fff);
	color: var(--clr-text, #333);
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	z-index: 2;
}

.ra-exit-popup__close:hover {
	background: color-mix(in srgb, var(--clr-text, #333) 6%, var(--bg-clr, #fff));
	border-color: color-mix(in srgb, var(--clr-text, #333) 22%, var(--border-clr, #ccc));
}

.ra-exit-popup__close svg {
	display: block;
	flex-shrink: 0;
}

.ra-exit-popup__close:focus-visible {
	outline: 2px solid var(--primary-color, #317a35);
	outline-offset: 2px;
}

.ra-exit-popup__ribbon {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 auto 1rem;
	padding: 0.38rem 0.95rem;
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: #5a4a00;
	background: linear-gradient(135deg, #ffe8a3 0%, #f0c85c 100%);
	border-radius: 999px;
	box-shadow: 0 4px 14px rgba(200, 160, 40, 0.35);
}

.ra-exit-popup__ribbon-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--primary-color, #317a35);
	animation: raExitPopupPulse 1.4s ease-in-out infinite;
}

.ra-exit-popup__header {
	margin-bottom: 1rem;
}

.ra-exit-popup__logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	margin-bottom: 0.85rem;
}

.ra-exit-popup__logo {
	max-width: 200px;
	max-height: 52px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.ra-exit-popup__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.74rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--primary-color, #317a35);
}

.ra-exit-popup__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.28;
	color: var(--clr-text, #1a1a1a);
}

.ra-exit-popup__subtitle {
	margin: 0.55rem 0 0;
	font-size: 0.86rem;
	color: var(--clr-text-light, #555);
}

.ra-exit-popup__promo {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	background: color-mix(in srgb, var(--primary-color, #317a35) 8%, transparent);
	border: 1px dashed color-mix(in srgb, var(--primary-color, #317a35) 35%, transparent);
	border-radius: 10px;
}

.ra-exit-popup__promo-label {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--clr-text-light, #666);
	margin-bottom: 0.45rem;
}

.ra-exit-popup__promo-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	flex-wrap: wrap;
}

.ra-exit-popup__code {
	font-family: ui-monospace, "Cascadia Code", "Courier New", monospace;
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: var(--primary-color, #317a35);
	background: var(--bg-clr, #fff);
	border: 1.5px solid color-mix(in srgb, var(--primary-color, #317a35) 35%, transparent);
	border-radius: 8px;
	padding: 0.45rem 0.85rem;
	min-width: 112px;
	text-align: center;
}

.ra-exit-popup__copy {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.48rem 0.9rem;
	font-size: 0.8rem;
	font-weight: 700;
	font-family: inherit;
	color: var(--primary-color, #317a35);
	background: var(--bg-clr, #fff);
	border: 1.5px solid var(--primary-color, #317a35);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.ra-exit-popup__copy:hover:not(:disabled) {
	background: var(--primary-color, #317a35);
	color: #fff;
}

.ra-exit-popup__copy:focus-visible {
	outline: 2px solid var(--primary-color, #317a35);
	outline-offset: 2px;
}

.ra-exit-popup__copy:disabled {
	cursor: default;
	pointer-events: none;
}

.ra-exit-popup__copy.is-copied {
	background: var(--primary-color, #317a35);
	border-color: var(--primary-color, #317a35);
	color: #fff;
}

.ra-exit-popup__perks {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	text-align: left;
}

.ra-exit-popup__perks li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.32rem 0;
	font-size: 0.86rem;
	color: var(--clr-text-light, #555);
	line-height: 1.35;
}

.ra-exit-popup__perks li svg {
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--primary-color, #317a35);
}

.ra-exit-popup__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	width: 100%;
	padding: 0.92rem 1rem;
	font-size: 0.95rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	color: #fff;
	background: var(--primary-color, #317a35);
	border-radius: 10px;
	box-shadow: 0 8px 22px color-mix(in srgb, var(--primary-color, #317a35) 45%, transparent);
	transition: filter 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.ra-exit-popup__cta:hover {
	color: #fff;
	filter: brightness(1.06);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px color-mix(in srgb, var(--primary-color, #317a35) 55%, transparent);
}

.ra-exit-popup__cta:focus-visible {
	outline: 2px solid var(--primary-color, #317a35);
	outline-offset: 3px;
}

.ra-exit-popup__disclaimer {
	margin: 0.75rem 0 0;
	font-size: 0.7rem;
	color: var(--clr-text-light, #777);
	line-height: 1.45;
}

@keyframes raExitPopupFade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes raExitPopupIn {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes raExitPopupPulse {
	0%,
	100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.35);
		opacity: 0.65;
	}
}

body.ra-exit-popup-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.ra-exit-popup__dialog {
		padding: 1.65rem 1.2rem 1.25rem;
		border-radius: 12px;
	}

	.ra-exit-popup__title {
		font-size: 0.98rem;
	}

	.ra-exit-popup__cta {
		font-size: 0.88rem;
		padding: 0.85rem 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ra-exit-popup.is-open,
	.ra-exit-popup__dialog,
	.ra-exit-popup__ribbon-dot {
		animation: none;
	}

	.ra-exit-popup__cta:hover {
		transform: none;
	}
}
