/* Loop videos (inc/loop-video.php). Portrait clips (9:16) get the height of the 3:4 shoot photos they replace. */

.wp-block-video.dh-loop {
	position: relative;
	max-width: min( 495px, 100% ) !important;
	margin-inline: auto !important;
}

.wp-block-video.dh-loop video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	background: var( --wp--preset--color--nude, #e5e0da );
}

.hacker-loop__toggle {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid rgb( 255 255 255 / 0.8 );
	border-radius: 50%;
	background: rgb( 0 0 0 / 0.35 );
	color: #fff;
	cursor: pointer;
}

/* Pause icon (two bars); play triangle when paused. */
.hacker-loop__toggle::before {
	content: "";
	width: 0.75rem;
	height: 0.875rem;
	border-inline: 0.25rem solid currentColor;
	box-sizing: border-box;
}

.dh-loop.is-paused .hacker-loop__toggle::before {
	width: 0;
	height: 0;
	border-block: 0.4375rem solid transparent;
	border-inline-start: 0.75rem solid currentColor;
	border-inline-end: 0;
	margin-inline-start: 0.2rem;
}

.hacker-loop__toggle:hover {
	background: rgb( 0 0 0 / 0.55 );
}

.hacker-loop__toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgb( 0 0 0 / 0.6 );
}

/* Same rhythm as the shoot photos in the page content (content.css, .dh-shoot). */
.dh-content > .wp-block-video.dh-loop {
	margin-block: var( --wp--preset--spacing--70 ) !important;
}
