/*
 * YouTube posters outside /filmer/ (that page keeps its own films.css rules).
 *
 * The poster covers the 16:9 box WPBakery already reserves, so nothing shifts
 * when the iframe loads. iframe[src] only matches once js/kf-video-embeds.js
 * has loaded the player — before that Cookiebot keeps the element hidden.
 */

/* Only boxes that actually got a poster — a Vimeo or other embed is left alone. */
.wpb_video_widget .wpb_video_wrapper:has(.kf-yt-poster),
.kf-video-facade {
	position: relative;
	background: #111;
	border-radius: 4px;
	overflow: hidden;
}

/* Raw HTML embeds have no aspect box of their own. */
.kf-video-facade {
	width: 100%;
	padding-top: 56.25%;
}

.wpb_video_widget .wpb_video_wrapper:has(.kf-yt-poster) iframe[src],
.kf-video-facade iframe[src] {
	position: absolute;
	top: 0;
	left: 0;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	border: 0;
}

.kf-yt-poster {
	position: absolute;
	inset: 0;
	z-index: 3;
	margin: 0;
	padding: 0;
	border: 0;
	width: 100%;
	height: 100%;
	background: #111;
	cursor: pointer;
}

.kf-yt-poster.is-hidden {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.kf-yt-poster img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.kf-yt-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	margin: -24px 0 0 -34px;
	border-radius: 14px;
	background: #f00;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

.kf-yt-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	width: 0;
	height: 0;
	margin: -10px 0 0 -6px;
	border-style: solid;
	border-width: 10px 0 10px 16px;
	border-color: transparent transparent transparent #fff;
}

.kf-yt-poster:hover .kf-yt-play,
.kf-yt-poster:focus .kf-yt-play {
	background: #cc0000;
}

@media (max-width: 767px) {
	.kf-yt-play {
		width: 60px;
		height: 42px;
		margin: -21px 0 0 -30px;
	}
}
