/* ---------- Bottom-of-article CTA ---------- */
.chx-post-cta {
	margin: 40px 0 20px;
	clear: both;
}

.chx-post-cta .et_pb_section {
	/* Library sections often carry full-page padding; tighten inside an article. */
	padding-top: 0;
	padding-bottom: 0;
}

.chx-post-cta .et_pb_row {
	width: 100%;
	max-width: 100%;
}

/* ---------- Email list popup ---------- */
.chx-popup[hidden] {
	display: none;
}

.chx-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.chx-popup.is-visible {
	opacity: 1;
}

.chx-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.chx-popup__box {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	transform: translateY(16px);
	transition: transform 0.2s ease;
	outline: none;
}

.chx-popup.is-visible .chx-popup__box {
	transform: none;
}

.chx-popup__close {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 10; /* Divi columns use z-index: 2 */
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	/* Light chip so it's visible on both dark and light popup designs. */
	background: rgba(255, 255, 255, 0.92);
	color: #0a0a0a;
	font-size: 26px;
	line-height: 36px;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.chx-popup__close:hover,
.chx-popup__close:focus-visible {
	background: #fff;
}

.chx-popup .et-l {
	position: relative;
	z-index: 1;
}

.chx-popup .et_pb_section {
	padding: 0;
	background-color: transparent;
}

.chx-popup .et_pb_row {
	width: 100%;
	max-width: 100%;
	padding: 0;
}

.chx-popup .et_pb_newsletter {
	margin-bottom: 0 !important;
}

/* Divi silently blocks submit when a shown field is empty/invalid; make that obvious. */
.et_pb_newsletter input.et_pb_signup_error {
	border: 2px solid #e02b20 !important;
	box-shadow: 0 0 0 3px rgba(224, 43, 32, 0.25) !important;
}

html.chx-popup-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.chx-popup {
		padding: 12px;
	}
}
