/*
 * Ads style. Applied to banners rendered by `inc/ads-manager.php`
 * (custom post type `wpst_ad`) as well as by customizer slots.
 *
 * Also styles the in-player popunder overlay added in
 * content-video-player.php.
 *
 *  @package wpst
 */

.wpst-ad,
.wpst-ad-slot {
	display: block;
	max-width: 100%;
	text-align: center;
	margin: 0 auto 1rem;
	line-height: 0;
}

.wpst-ad-slot--header-top {
	padding: 8px 0;
	border-bottom: 1px solid #242424;
	background: #0d0d0d;
}

.wpst-ad-slot--footer-bottom {
	padding: 8px 0;
	border-top: 1px solid #242424;
	background: #0d0d0d;
}

.wpst-ad-slot--single-video-above-player {
	margin: 1rem auto;
}

.wpst-ad-slot--single-video-below-tabs {
	margin: 1.5rem auto;
}

.wpst-ad-image img {
	max-width: 100%;
	height: auto;
	display: inline-block;
}

.wpst-ad-html > ins,
.wpst-ad-html > iframe {
	display: block;
	margin: 0 auto;
}

.wpst-ad-slot {
	background: transparent;
}

.wpst-ad-slot:empty,
.wpst-ad-slot--empty {
	display: none;
}

.happy-section,
.hero {
	margin: 1rem auto;
}

.column-wpst_ad_shortcode code {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
}

/*
 * In-player popunder overlay.
 *
 * Lives inside `.responsive-player.video-player` so it inherits the
 * responsive aspect-ratio container. The overlay is positioned
 * absolutely with `aspect-ratio: inherit`, covering the iframe area.
 *
 *   - default: visible (`pointer-events: auto`) so visitors must close
 *     it before interacting with the video.
 *   - dismissed: `.is-dismissed` class hides it and re-enables the
 *     underlying player controls.
 */
.wpst-player-popunder {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 8, 12, 0.86);
	color: #f5f5f5;
	padding: 1.5rem;
	text-align: center;
}

.wpst-player-popunder__content {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: auto;
}

.wpst-player-popunder__content ins,
.wpst-player-popunder__content iframe,
.wpst-player-popunder__content img,
.wpst-player-popunder__content > div,
.wpst-player-popunder__content > a {
	max-width: 100%;
}

.wpst-player-popunder__close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #111;
	font-size: 20px;
	line-height: 28px;
	cursor: pointer;
	font-weight: 700;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.wpst-player-popunder__close:hover,
.wpst-player-popunder__close:focus {
	background: #ffffff;
	color: #000;
}

.wpst-player-popunder.is-dismissed {
	display: none;
}

.responsive-player {
	position: relative;
}
