/*
 * Ad Popup Modal
 * Selectors are scoped and explicit so theme styles for buttons, links and headings don't leak in.
 * Override the colors with these variables in your theme's custom CSS.
 */
.apm-popup {
	--apm-accent: #01875f;
	--apm-text: #1f2328;
	--apm-muted: #555d66;
	--apm-bg: #ffffff;
	--apm-radius: 16px;

	position: fixed;
	inset: 0;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity .25s ease;
}

.apm-popup[hidden] {
	display: none !important;
}

.apm-popup.apm-visible {
	opacity: 1;
}

.apm-is-open,
.apm-is-open body {
	overflow: hidden !important;
}

.apm-popup .apm-overlay {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	background: rgba(10, 12, 16, .62);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.apm-popup .apm-dialog {
	position: relative;
	width: 100%;
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: var(--apm-bg);
	color: var(--apm-text);
	border-radius: var(--apm-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	box-sizing: border-box;
	text-align: center;
	outline: none;
	transform: translateY(16px) scale(.97);
	transition: transform .25s ease;
}

.apm-popup.apm-visible .apm-dialog {
	transform: none;
}

.apm-popup .apm-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #1f2328;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
	cursor: pointer;
	line-height: 1;
	transition: background .15s ease;
}

.apm-popup .apm-close:hover {
	background: #ffffff;
}

.apm-popup .apm-close:focus-visible,
.apm-popup .apm-cta:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 2px;
}

.apm-popup .apm-media,
.apm-popup .apm-media a {
	display: block;
	line-height: 0;
}

.apm-popup .apm-media img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	margin: 0;
	border-radius: var(--apm-radius) var(--apm-radius) 0 0;
}

.apm-popup .apm-dialog > .apm-media:last-child img {
	border-radius: var(--apm-radius);
}

.apm-popup .apm-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 32px auto 0;
	border-radius: 18px;
	background: var(--apm-accent);
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(1, 135, 95, .35);
}

.apm-popup .apm-body {
	padding: 22px 26px 28px;
}

.apm-popup .apm-title {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	color: var(--apm-text);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: normal;
}

.apm-popup .apm-title::before,
.apm-popup .apm-title::after {
	content: none;
	display: none;
}

.apm-popup .apm-content {
	color: var(--apm-muted);
	font-size: 15px;
	line-height: 1.6;
}

.apm-popup .apm-content p {
	margin: 0 0 10px;
}

.apm-popup .apm-content > :last-child {
	margin-bottom: 0;
}

.apm-popup .apm-play-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 18px 0 0;
	padding: 11px 22px 11px 16px;
	border: 1px solid #000000;
	border-radius: 10px;
	background: #000000;
	color: #ffffff !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none;
	transition: transform .15s ease, box-shadow .15s ease;
}

.apm-popup .apm-play-button:hover {
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}

.apm-popup .apm-play-icon {
	flex: 0 0 auto;
	display: block;
}

@media (max-width: 480px) {
	.apm-popup .apm-body {
		padding: 18px 18px 22px;
	}

	.apm-popup .apm-title {
		font-size: 19px;
	}

	.apm-popup .apm-play-button {
		display: flex;
		width: 100%;
		box-sizing: border-box;
	}
}

@media (prefers-reduced-motion: reduce) {
	.apm-popup,
	.apm-popup .apm-dialog,
	.apm-popup .apm-play-button {
		transition: none;
	}
}

/* Right-to-left sites */
[dir="rtl"] .apm-popup .apm-close,
.rtl .apm-popup .apm-close {
	right: auto;
	left: 10px;
}
