.plyr,
.plyr__video-wrapper,
.evp-video-wrap,
.mejs-container,
.mejs__container {
	position: relative !important;
}

.evpsa-overlay {
	position: absolute;
	z-index: 2147483000;
	inset: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.92);
	touch-action: manipulation;
}

.evpsa-preroll-overlay {
	isolation: isolate;
}

.evpsa-preroll-video {
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	cursor: pointer;
}

.evpsa-skip {
	position: absolute;
	z-index: 20;
	right: 12px;
	bottom: 46px;
	max-width: calc(100% - 24px);
	padding: 9px 14px;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font: 14px/1.3 Arial, sans-serif;
	text-align: center;
	user-select: none;
	-webkit-user-select: none;
	cursor: default;
}

.evpsa-skip.evpsa-can-skip {
	cursor: pointer;
	background: rgba(0, 0, 0, 0.94);
}

.evpsa-autoplay-fallback {
	position: absolute;
	z-index: 30;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(88%, 380px);
	padding: 18px;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.78);
	text-align: center;
}

.evpsa-autoplay-message {
	margin: 0 0 12px;
	color: #fff;
	font: 13px/1.4 Arial, sans-serif;
}

.evpsa-ad-play-button,
.evpsa-banner-action {
	min-height: 42px;
	padding: 9px 18px;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.82);
	border-radius: 5px;
	background: rgba(10, 10, 10, 0.96);
	color: #fff;
	font: 600 14px/1.2 Arial, sans-serif;
	cursor: pointer;
	touch-action: manipulation;
}

.evpsa-ad-play-button:focus-visible,
.evpsa-banner-action:focus-visible,
.evpsa-banner-close:focus-visible,
.evpsa-skip:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.evpsa-banner-overlay {
	padding: 12px;
	background: rgba(0, 0, 0, 0.82);
}

.evpsa-banner-box {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;

	/*
	 * The box itself is always constrained to the actual player overlay.
	 * This prevents large creatives from defining their own oversized width.
	 */
	width: 94%;
	height: 94%;
	max-width: 94%;
	max-height: 94%;
	min-width: 0;
	min-height: 0;
	box-sizing: border-box;
}

.evpsa-banner-topbar {
	flex: 0 0 36px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	min-width: 0;
	margin: 0 0 6px;
	box-sizing: border-box;
}

.evpsa-banner-link {
	/*
	 * The image area consumes only the remaining player space after
	 * the close bar and Resume/Replay button.
	 */
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	overflow: hidden;
	line-height: 0;
	text-align: center;
}

.evpsa-banner-image {
	display: block;

	/*
	 * Never stretch. Scale down on whichever axis reaches the player
	 * boundary first, while preserving the creative's aspect ratio.
	 */
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center center;
}

.evpsa-banner-close {
	position: relative;
	z-index: 40;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 0;
	box-sizing: border-box;
	border: 0;
	border-radius: 7px;
	background: rgba(0, 0, 0, 0.52);
	color: transparent;
	font-size: 0;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.evpsa-banner-close::before,
.evpsa-banner-close::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	transform-origin: center;
}

.evpsa-banner-close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.evpsa-banner-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}


.evpsa-banner-action {
	flex: 0 0 auto;
	align-self: center;
	margin-top: 10px;
}

@media (hover: hover) and (pointer: fine) {
	.evpsa-skip.evpsa-can-skip:hover,
	.evpsa-ad-play-button:hover,
	.evpsa-banner-action:hover,
	.evpsa-banner-close:hover {
		background: #000;
	}
}

@media (max-width: 600px) {
	.evpsa-skip {
		right: 8px;
		bottom: 38px;
		max-width: calc(100% - 16px);
		padding: 7px 10px;
		font-size: 12px;
	}

	.evpsa-banner-overlay {
		padding: 8px;
	}

	.evpsa-banner-box {
		width: 98%;
		height: 98%;
		max-width: 98%;
		max-height: 98%;
	}

	.evpsa-banner-topbar {
		min-height: 36px;
		margin-bottom: 5px;
	}

	.evpsa-banner-close {
		width: 36px;
		height: 36px;
	}

	.evpsa-autoplay-fallback {
		width: 90%;
		padding: 14px;
	}
}
