/*
 * Video-Fenster (natives <dialog>, assets/js/video-fenster.js) – geteilt von
 * hero-video („Video ansehen“, 16:9) und testimonials (Kundenvideo, 9:16).
 * Wird von beiden Blöcken eingereiht. Nur Token-Variablen.
 */

.video-fenster {
	width: min(92vw, 68rem);
	max-width: none;
	padding: 0;
	border: 0;
	overflow: visible;
	background: transparent;
	color: var(--wp--preset--color--contrast-light);
}

.video-fenster::backdrop {
	background: color-mix(in srgb, var(--wp--preset--color--base-dark) 88%, transparent);
}

.video-fenster__player {
	aspect-ratio: 16 / 9;
	border-radius: var(--wp--custom--radius--md);
	overflow: hidden;
	background: var(--wp--preset--color--neutral-dark);
	box-shadow: 0 0 0 1px var(--wp--preset--color--neutral-dark);
}

.video-fenster__player wistia-player {
	display: block;
	width: 100%;
}

.video-fenster__zu {
	position: absolute;
	top: -3rem;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--neutral) 60%, transparent);
	border-radius: 50%;
	background: var(--wp--preset--color--base-dark);
	color: var(--wp--preset--color--contrast-light);
	cursor: pointer;
}

.video-fenster__zu:hover,
.video-fenster__zu:focus-visible {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* Hochformat (Kundenvideo): Fenster so breit, dass 9:16 in die Bildschirmhöhe passt */
.video-fenster--hoch {
	width: min(92vw, calc(86vh * 9 / 16));
}

.video-fenster--hoch .video-fenster__player {
	aspect-ratio: 9 / 16;
}

.video-fenster--hoch .nsm-fassade,
.video-fenster--hoch .nsm-fassade__start,
.video-fenster--hoch .nsm-fassade__poster,
.video-fenster--hoch wistia-player {
	width: 100%;
	height: 100%;
}

.video-fenster--hoch .nsm-fassade__poster {
	object-fit: cover;
}
