/* Styles: loop = Loop */
/* core/video, style "loop" (prototype loopVideo): a muted, looping clip with no controls that plays only while it is on
   screen and never under reduced motion (assets/js/video-play.js; inc/blocks/core-video.php sets the attributes).
   The poster is the still for anyone who gets no video.
   A button linking to a video file opens it in .video-dialog: a near-full-screen <dialog> player (prototype video
   lightbox, cmc.css "The video lightbox"): the clip with controls, a round close button on its top-right corner. */
.wp-block-video.is-style-loop {
	margin: 0;
}

.wp-block-video.is-style-loop video {
	display: block;
	width: 100%;
}

.video-dialog {
	width: min(96vw, 1600px);
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}

.video-dialog::backdrop {
	background: color-mix(in srgb, var(--wp--preset--color--charcoal) 90%, transparent);
	backdrop-filter: blur(4px);
}

@starting-style {
	.video-dialog[open] {
		opacity: 0;
		transform: scale(0.98);
	}
}

.video-dialog[open] {
	opacity: 1;
	transform: none;
	transition: opacity 260ms var(--wp--custom--ease), transform 260ms var(--wp--custom--ease);
}

.video-dialog__frame {
	position: relative;
}

.video-dialog video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--black);
}

.video-dialog__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--charcoal) 70%, transparent);
	color: var(--wp--preset--color--white);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--white) 30%, transparent);
	backdrop-filter: blur(6px);
	cursor: pointer;
	transition: background-color 300ms var(--wp--custom--ease);
}

.video-dialog__close:is(:hover, :focus-visible) {
	background: var(--wp--preset--color--charcoal);
}

.video-dialog__close svg {
	display: block;
	width: 20px;
	height: 20px;
}

@media (prefers-reduced-motion: reduce) {
	.video-dialog[open],
	.video-dialog__close {
		transition: none;
	}
}
