.wam-pro-ad {
	position: relative;
	clear: both;
	box-sizing: border-box;
	width: 100%;
	margin: 22px auto;
	padding: 0;
	text-align: center;
	line-height: 1.4;
}

.wam-pro-ad *,
.wam-pro-ad *::before,
.wam-pro-ad *::after {
	box-sizing: border-box;
}

.wam-pro-ad-body {
	position: relative;
	max-width: 100%;
	overflow: hidden;
}

.wam-pro-ad img,
.wam-pro-ad video {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.wam-pro-ad iframe {
	max-width: 100%;
	border: 0;
}

.wam-pro-label {
	display: block;
	margin: 0 0 5px;
	color: #7a7a7a;
	font: 10px/1.2 system-ui, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.wam-pro-close {
	position: absolute;
	z-index: 20;
	right: 6px;
	top: 6px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.96);
	color: #1d2327;
	font: 700 22px/1 system-ui, sans-serif;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
	transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.wam-pro-close:hover {
	background: #fff;
	transform: scale(1.06);
	box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
}

.wam-pro-close:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 2px;
}

.wam-pro-format-sticky_header {
	position: fixed;
	z-index: 99990;
	top: 0;
	left: 0;
	right: 0;
	margin: 0;
	padding: 8px;
	background: #fff;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

body.admin-bar .wam-pro-format-sticky_header {
	top: 32px;
}

.wam-pro-format-sticky_footer {
	position: fixed;
	z-index: 99990;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0;
	padding: 8px;
	background: #fff;
	box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.12);
}

.wam-pro-format-left_rail,
.wam-pro-format-right_rail,
.wam-pro-placement-left_rail,
.wam-pro-placement-right_rail {
	position: fixed;
	z-index: 9990;
	top: 50%;
	width: 160px;
	margin: 0;
	transform: translateY(-50%);
}

.wam-pro-format-left_rail,
.wam-pro-placement-left_rail {
	left: 8px;
}

.wam-pro-format-right_rail,
.wam-pro-placement-right_rail {
	right: 8px;
}

.wam-pro-format-floating,
.wam-pro-placement-floating {
	position: fixed;
	z-index: 99940;
	right: 18px;
	bottom: 18px;
	width: min(360px, calc(100vw - 36px));
	margin: 0;
	padding: 8px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

/* Responsive popup dialog. */
.wam-pro-format-popup,
.wam-pro-placement-popup {
	position: fixed;
	z-index: 99998;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none !important;
	height: 100%;
	min-height: 100dvh !important;
	margin: 0;
	padding: clamp(14px, 3vw, 34px);
	background: rgba(5, 12, 24, 0.72);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	text-align: left !important;
	opacity: 0;
	visibility: hidden;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.wam-pro-format-popup.is-visible,
.wam-pro-placement-popup.is-visible {
	display: flex;
	opacity: 1;
	visibility: visible;
}

.wam-pro-popup-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(var(--wam-popup-width, 720px), 100%);
	max-height: calc(100dvh - clamp(28px, 6vw, 68px));
	margin: auto;
	background: #fff;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 16px;
	box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
	overflow: hidden;
	transform: translateY(16px) scale(0.985);
	transition: transform 200ms ease;
}

.wam-pro-format-popup.is-visible .wam-pro-popup-dialog,
.wam-pro-placement-popup.is-visible .wam-pro-popup-dialog {
	transform: translateY(0) scale(1);
}

.wam-pro-format-popup .wam-pro-label,
.wam-pro-placement-popup .wam-pro-label {
	position: absolute;
	z-index: 2;
	top: 13px;
	left: 18px;
	margin: 0;
	padding: 4px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.88);
	color: #50575e;
}

.wam-pro-format-popup .wam-pro-ad-body,
.wam-pro-placement-popup .wam-pro-ad-body {
	width: 100%;
	max-height: calc(100dvh - 70px);
	padding: 48px clamp(14px, 3vw, 24px) clamp(14px, 3vw, 24px);
	background: #fff;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.wam-pro-format-popup .wam-pro-ad-body img,
.wam-pro-placement-popup .wam-pro-ad-body img,
.wam-pro-format-popup .wam-pro-ad-body video,
.wam-pro-placement-popup .wam-pro-ad-body video {
	max-height: calc(100dvh - 110px);
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

.wam-pro-format-popup .wam-pro-ad-body iframe,
.wam-pro-placement-popup .wam-pro-ad-body iframe {
	display: block;
	width: 100%;
	max-height: calc(100dvh - 110px);
}

.wam-pro-format-popup .wam-pro-close,
.wam-pro-placement-popup .wam-pro-close {
	position: absolute;
	z-index: 10;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	font-size: 26px;
}

body.wam-pro-popup-open {
	overflow: hidden !important;
}

/* Flying Carpet / parallax format. */
.wam-pro-format-flying_carpet,
.wam-pro-placement-flying_carpet {
	position: relative;
	isolation: isolate;
	height: clamp(300px, var(--wam-carpet-height, 46vw), 520px);
	min-height: 0 !important;
	overflow: hidden;
	background: #101318;
	contain: paint;
}

.wam-pro-format-flying_carpet > .wam-pro-label,
.wam-pro-placement-flying_carpet > .wam-pro-label {
	position: absolute;
	z-index: 5;
	top: 8px;
	left: 50%;
	margin: 0;
	padding: 4px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.48);
	color: #fff;
	transform: translateX(-50%);
}

.wam-pro-format-flying_carpet .wam-pro-ad-body,
.wam-pro-placement-flying_carpet .wam-pro-ad-body {
	position: absolute;
	z-index: 1;
	left: 0;
	top: -18%;
	display: grid;
	place-items: center;
	width: 100%;
	height: 136%;
	max-width: none;
	overflow: hidden;
	transform: translate3d(0, var(--wam-parallax-y, 0px), 0);
	will-change: transform;
	backface-visibility: hidden;
}

.wam-pro-format-flying_carpet .wam-pro-ad-body > a,
.wam-pro-placement-flying_carpet .wam-pro-ad-body > a,
.wam-pro-format-flying_carpet .wam-pro-ad-body > picture,
.wam-pro-placement-flying_carpet .wam-pro-ad-body > picture {
	display: block;
	width: 100%;
	height: 100%;
}

.wam-pro-format-flying_carpet img,
.wam-pro-placement-flying_carpet img,
.wam-pro-format-flying_carpet video,
.wam-pro-placement-flying_carpet video,
.wam-pro-format-flying_carpet iframe,
.wam-pro-placement-flying_carpet iframe {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.wam-pro-format-flying_carpet:not(.is-parallax-ready) .wam-pro-ad-body,
.wam-pro-placement-flying_carpet:not(.is-parallax-ready) .wam-pro-ad-body {
	transform: translate3d(0, 0, 0);
}

.wam-pro-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.wam-pro-video iframe,
.wam-pro-video video {
	width: 100%;
	height: 100%;
}

.wam-pro-slider {
	position: relative;
	overflow: hidden;
}

.wam-pro-slides {
	position: relative;
}

.wam-pro-slide {
	display: none;
}

.wam-pro-slide.is-active {
	display: block;
}

.wam-pro-slide-prev,
.wam-pro-slide-next {
	position: absolute;
	z-index: 4;
	top: 50%;
	width: 35px;
	height: 35px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.58);
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	transform: translateY(-50%);
}

.wam-pro-slide-prev {
	left: 10px;
}

.wam-pro-slide-next {
	right: 10px;
}

.wam-pro-adblock-message {
	position: fixed;
	z-index: 100000;
	left: 50%;
	bottom: 25px;
	width: min(520px, calc(100vw - 30px));
	padding: 20px 45px 20px 20px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
	font-family: system-ui, sans-serif;
	transform: translateX(-50%);
}

.wam-pro-ad-bait {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
}

.wam-pro-format-reward {
	max-width: 720px;
	padding: 14px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 14px 45px rgba(0, 0, 0, 0.14);
}

.wam-pro-reward-status {
	margin-top: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	background: #f2f5f9;
	color: #3b4655;
	font: 600 13px/1.4 system-ui, sans-serif;
}

.wam-pro-format-reward.is-reward-complete .wam-pro-reward-status {
	background: #e8f7ed;
	color: #176b39;
}

@media (max-width: 1280px) {
	.wam-pro-format-left_rail,
	.wam-pro-format-right_rail,
	.wam-pro-placement-left_rail,
	.wam-pro-placement-right_rail {
		display: none !important;
	}
}

@media (max-width: 782px) {
	body.admin-bar .wam-pro-format-sticky_header {
		top: 46px;
	}

	.wam-pro-format-flying_carpet,
	.wam-pro-placement-flying_carpet {
		height: clamp(260px, var(--wam-carpet-height, 72vw), 380px);
	}
}

@media (max-width: 600px) {
	.wam-pro-format-popup,
	.wam-pro-placement-popup {
		align-items: flex-end;
		padding: 8px 8px 0;
	}

	.wam-pro-popup-dialog {
		width: 100%;
		max-height: calc(100dvh - 8px);
		margin: auto 0 0;
		border-radius: 18px 18px 0 0;
		transform: translateY(24px);
	}

	.wam-pro-format-popup .wam-pro-ad-body,
	.wam-pro-placement-popup .wam-pro-ad-body {
		max-height: calc(100dvh - 58px);
		padding: 54px 12px 16px;
	}

	.wam-pro-format-popup .wam-pro-ad-body img,
	.wam-pro-placement-popup .wam-pro-ad-body img,
	.wam-pro-format-popup .wam-pro-ad-body video,
	.wam-pro-placement-popup .wam-pro-ad-body video,
	.wam-pro-format-popup .wam-pro-ad-body iframe,
	.wam-pro-placement-popup .wam-pro-ad-body iframe {
		max-height: calc(100dvh - 92px);
	}

	.wam-pro-format-popup .wam-pro-close,
	.wam-pro-placement-popup .wam-pro-close {
		top: 8px;
		right: 8px;
		width: 44px;
		height: 44px;
	}

	.wam-pro-format-popup .wam-pro-label,
	.wam-pro-placement-popup .wam-pro-label {
		top: 17px;
		left: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wam-pro-ad *,
	.wam-pro-ad *::before,
	.wam-pro-ad *::after {
		scroll-behavior: auto !important;
		animation: none !important;
		transition: none !important;
	}

	.wam-pro-format-flying_carpet .wam-pro-ad-body,
	.wam-pro-placement-flying_carpet .wam-pro-ad-body {
		top: 0;
		height: 100%;
		transform: none !important;
		will-change: auto;
	}
}
