/* YouTube facade (inc/yt-facade.php, #950): preview + play button instead of the
   iframe until click. Not scoped to .muus-guide-page — the filter runs on any
   content; inside the 16/9 frame it fills the frame like the iframe did. */
.muus-yt-facade {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
	cursor: pointer;
}
/* Core YouTube embed block: under the SAME condition core reserves the box with
   `.wp-block-embed__wrapper::before { padding-top }` and positions the iframe
   absolutely — the facade takes the iframe's place, otherwise its own 16/9 box
   stacks under the spacer (double height, forever without JS). Mirroring core's
   selector instead of :has() — no browser fallback needed. */
.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper > .muus-yt-facade,
.muus-guide-page .muus-guide-video__frame > .muus-yt-facade {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
}
.muus-yt-facade__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover; /* hqdefault is 4:3 with letterbox bars — crop them */
}
.muus-yt-facade__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	margin: -24px 0 0 -34px;
	border-radius: 12px;
	background: rgba(0, 0, 0, .72);
	transition: background .15s;
}
.muus-yt-facade__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -7px;
	border-style: solid;
	border-width: 10px 0 10px 18px;
	border-color: transparent transparent transparent #fff;
}
.muus-yt-facade:hover .muus-yt-facade__play,
.muus-yt-facade:focus-visible .muus-yt-facade__play {
	background: #f00;
}
.muus-yt-facade:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #c8a97e);
	outline-offset: -2px;
}
