/**
 * MDA Site Tools: Video Hub popup player (assets/js/video-popup.js).
 */

.mda-video-popup {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px 20px;
	background: rgba(0, 0, 0, 0.85);
}

.mda-video-popup[hidden] {
	display: none;
}

.mda-video-popup__inner {
	position: relative;
	width: 100%;
	/* As wide as fits, keeping 16:9 within the screen height */
	max-width: min(1100px, calc((100vh - 140px) * 16 / 9));
}

.mda-video-popup__player {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	margin: 0 auto;
	background: #000;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mda-video-popup__player iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.mda-video-popup__close {
	position: absolute;
	top: -48px;
	right: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--the7-accent-bg-color, var(--the7-accent-color, #1e73be));
	color: #fff;
	font-size: 28px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
}

.mda-video-popup__close:hover,
.mda-video-popup__close:focus-visible {
	transform: scale(1.08);
}

.mda-video-popup__more {
	margin: 14px 0 0;
	text-align: center;
}

.mda-video-popup__more[hidden] {
	display: none;
}

.mda-video-popup__link,
.mda-video-popup__link:hover,
.mda-video-popup__link:focus {
	color: #fff !important;
	font-weight: 600;
	text-decoration: underline;
}

/* Page behind the popup doesn't scroll */
html.mda-video-popup-open,
html.mda-video-popup-open body {
	overflow: hidden;
}
