/**
 * Lead-magnet popup — book cover + signup, site black / lime look.
 */

.afj-popup {
	--afj-ink: #0a0a0a;
	--afj-lime: #d4ff00;
	--afj-bg: #050505;
	--afj-muted: rgba(255, 255, 255, 0.78);
	display: grid;
	grid-template-columns: minmax(160px, 0.92fr) minmax(240px, 1.15fr);
	gap: 0;
	align-items: stretch;
	font-family: var(--afj-font-body, "Plus Jakarta Sans", system-ui, sans-serif);
	text-align: left;
	color: #fff;
	background: #050505;
	box-sizing: border-box;
	overflow: hidden;
	border-radius: 1.25rem;
}

.pum-overlay.pum-active {
	background: rgba(5, 5, 5, 0.72) !important;
}

/* Allow close button to sit half outside the card */
.pum-container:has(.afj-popup),
.pum .pum-container:has(.afj-popup) {
	background: #050505 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 1.25rem !important;
	padding: 0 !important;
	overflow: visible !important;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	max-width: 640px !important;
	width: min(640px, calc(100vw - 2rem)) !important;
	position: relative !important;
}

.pum-content:has(.afj-popup) {
	overflow: visible !important;
	border-radius: 1.25rem;
	background: #050505;
}

.afj-popup__media {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem 0.75rem 1.5rem 1.35rem;
	background:
		radial-gradient(ellipse at 40% 60%, rgba(212, 255, 0, 0.12), transparent 55%),
		linear-gradient(160deg, #101010 0%, #050505 100%);
}

.afj-popup__cover {
	display: block;
	width: 100%;
	max-width: 220px;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
	transform: rotate(-2deg);
}

.afj-popup__body {
	padding: 1.85rem 1.65rem 1.5rem 1.15rem;
	min-width: 0;
}

.afj-popup__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0 0 0.85rem;
}

.afj-popup__eyebrow-text {
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	white-space: nowrap;
}

.afj-popup__eyebrow-line {
	display: block;
	flex: 1 1 auto;
	height: 1px;
	min-width: 2rem;
	background: rgba(255, 255, 255, 0.4);
}

.afj-popup__title {
	margin: 0 0 0.6rem;
	font-family: var(--afj-font-heading, "Plus Jakarta Sans", system-ui, sans-serif);
	font-size: clamp(1.55rem, 3.2vw, 1.9rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.035em;
	color: #fff;
}

.afj-popup__title-accent {
	color: #d4ff00;
}

.afj-popup__lead {
	margin: 0 0 0.95rem;
	font-size: 0.9rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.78);
}

.afj-popup__perks {
	margin: 0 0 1.1rem;
	padding: 0;
	list-style: none;
}

.afj-popup__perks li {
	position: relative;
	padding: 0.22rem 0 0.22rem 1.25rem;
	font-size: 0.86rem;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.9);
}

.afj-popup__perks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.58rem;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 999px;
	background: #d4ff00;
}

.afj-popup .afj-nl-form {
	margin: 0;
}

.afj-popup .afj-nl-form__row {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.55rem;
	margin: 0;
}

.afj-popup .afj-nl-form__input {
	display: block;
	flex: 0 0 auto !important;
	width: 100%;
	height: auto !important;
	min-height: 0 !important;
	box-sizing: border-box;
	padding: 0.8rem 1.15rem !important;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #0a0a0a;
	font: inherit;
	font-size: 0.92rem;
	line-height: 1.3;
}

.afj-popup .afj-nl-form__input::placeholder {
	color: #9a9a9a;
}

.afj-popup .afj-nl-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	width: 100%;
	padding: 0.85rem 1.25rem;
	border: 0;
	border-radius: 999px;
	background: #d4ff00;
	color: #0a0a0a;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
}

.afj-popup .afj-nl-form__note {
	margin: 0.65rem 0 0;
	color: rgba(255, 255, 255, 0.55);
	text-align: center;
	font-size: 0.74rem;
}

/* Close: half outside top-right corner */
.pum-container:has(.afj-popup) > .pum-close,
.pum-container:has(.afj-popup) .pum-close,
.pum.pum-overlay .pum-container:has(.afj-popup) .pum-close.popmake-close {
	position: absolute !important;
	top: -20px !important;
	right: -20px !important;
	left: auto !important;
	bottom: auto !important;
	width: 40px !important;
	height: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border-radius: 999px !important;
	border: 2px solid #fff !important;
	background: #111 !important;
	color: #fff !important;
	font-size: 24px !important;
	line-height: 1 !important;
	opacity: 1 !important;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
	z-index: 20 !important;
	cursor: pointer;
	transform: none !important;
}

.pum-container:has(.afj-popup) > .pum-close:hover,
.pum-container:has(.afj-popup) .pum-close:hover {
	background: #d4ff00 !important;
	color: #0a0a0a !important;
	border-color: #d4ff00 !important;
}

@media (max-width: 640px) {
	.afj-popup {
		grid-template-columns: 1fr;
	}

	.afj-popup__media {
		padding: 1.35rem 1.35rem 0.35rem;
	}

	.afj-popup__cover {
		max-width: 180px;
		transform: none;
	}

	.afj-popup__body {
		padding: 1rem 1.25rem 1.35rem;
	}

	.pum-container:has(.afj-popup) > .pum-close,
	.pum-container:has(.afj-popup) .pum-close {
		top: -14px !important;
		right: -12px !important;
		width: 36px !important;
		height: 36px !important;
	}
}
