/**
 * Video popup (template-parts/global/video-modal.php). The frame keeps the
 * video's shape: 16:9 as wide as the screen allows, or 9:16 (TikTok, Shorts)
 * as tall as it allows. Positioning and the blurred backdrop come from
 * events-modal.css's `.modal` / `.modal__backdrop`.
 *
 * @package lsb
 */

.video-modal__backdrop {
	background-color: color-mix(in srgb, var(--color-navy-ink) 82%, transparent);
}

.video-modal__dialog {
	position: relative;
	width: min(68.75rem, 100%, calc((100vh - 7rem) * 16 / 9));
}

.video-modal--vertical .video-modal__dialog {
	width: min(100%, calc((100vh - 9rem) * 9 / 16));
}

.video-modal__frame {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background-color: var(--color-navy-ink);
	box-shadow: var(--shadow-lg);
}

.video-modal--vertical .video-modal__frame {
	aspect-ratio: 9 / 16;
}

.video-modal__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.video-modal__close {
	position: absolute;
	inset-block-end: calc(100% + var(--space-3));
	inset-inline-end: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--color-on-dark-border);
	border-radius: var(--radius-full);
	background-color: color-mix(in srgb, var(--color-white) 12%, transparent);
	color: var(--color-white);
	cursor: pointer;
	transition: background-color var(--duration) var(--ease);
}

.video-modal__close:hover {
	background-color: color-mix(in srgb, var(--color-white) 24%, transparent);
}
