/**
 * Block „Video (Hoch/Quer)" – Frontend und Editor.
 *
 * Die Hülle enthält zwei Plätze mit je einem Player. Sind beide belegt,
 * zeigt das CSS nur den, der zur Ausrichtung des Viewports passt.
 */

/*
 * Breite: so breit wie der Container, aber nie höher als 88 % des Viewports.
 * Ohne die Obergrenze wäre ein Hochkant-Video auf einem Tablet höher als
 * der Bildschirm.
 */
.dms42-player__slot {
	margin-left: auto;
	margin-right: auto;
	width: min(100%, calc(88vh * 16 / 9));
	width: min(100%, calc(88svh * 16 / 9));
}

.dms42-player__slot.is-portrait {
	width: min(100%, calc(88vh * 9 / 16));
	width: min(100%, calc(88svh * 9 / 16));
}

/* Beide Fassungen vorhanden: je nach Ausrichtung eine ausblenden. */
.dms42-player.has-both > .dms42-player__slot.is-portrait {
	display: none;
}

@media (orientation: portrait) {
	.dms42-player.has-both > .dms42-player__slot.is-portrait {
		display: block;
	}

	.dms42-player.has-both > .dms42-player__slot.is-landscape {
		display: none;
	}
}

/*
 * FluentPlayer nimmt ohne eigene Einstellung 16:9 an. Im Hochformat-Platz
 * gilt deshalb 9:16, solange am Medium kein Hochformat eingestellt ist.
 * !important, weil FluentPlayer das Verhältnis per ID-Selektor setzt.
 */
.dms42-player__slot.is-portrait .fluent-player:not(.fp-portrait) {
	aspect-ratio: 9 / 16 !important;
}

/* Player im DMS42-Rahmen. */
.dms42-player__slot .fluent-player,
.dms42-player__slot .wp-block-video video {
	border-radius: 8px;
	box-shadow: 0 20px 44px rgba(38, 45, 92, 0.25);
	overflow: hidden;
}

.dms42-player__slot .wp-block-video {
	margin: 0;
}

.dms42-player__slot .wp-block-video video {
	display: block;
	width: 100%;
}

/* ---------------------------------------------------------
   Nur im Editor: beide Plätze untereinander, mit Beschriftung
   --------------------------------------------------------- */

.dms42-player.is-editor {
	border: 1px dashed #cfd6ea;
	border-radius: 8px;
	display: grid;
	gap: 1.5rem;
	padding: 12px;
}

.dms42-player.is-editor .dms42-player__slot {
	margin-top: 0;
}

.dms42-player__slot-label {
	color: #3a4374;
	display: grid;
	font-size: 12px;
	gap: 2px;
	line-height: 1.4;
	margin-bottom: 8px;
}

.dms42-player__slot-label strong {
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.dms42-player__slot-label span {
	color: #7983a4;
}

.dms42-player__slot-note {
	color: #7983a4;
	font-size: 12px;
	margin: 0 0 8px;
}
