/**
 * Facebook-Videobeiträge im Frontend.
 *
 * Zunächst sichtbar ist nur das lokale Standbild mit Abspielknopf; das
 * Facebook-iframe entsteht erst nach einem Klick.
 */

.tob-video {
	margin: 0 0 1.5rem;
	padding: 0;
}

.tob-video__frame {
	position: relative;
	display: flex;
	justify-content: center;
	overflow: hidden;
	background: #10131a;
	border-radius: 10px;
}

/* Ohne Standbild gibt es nichts, was die Höhe vorgibt. */
.tob-video__frame--empty {
	aspect-ratio: 16 / 9;
}

/*
 * Das Standbild gibt die Höhe vor und behält sein eigenes Seitenverhältnis –
 * Reels sind hochformatig, Videos quer. Die Höhe ist begrenzt, damit ein
 * Hochformat den Beitrag nicht auseinanderzieht. Der Player legt sich später
 * darüber.
 */
.tob-video__still,
.tob-video__frame img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(80vh, 720px);
}

.tob-video__frame iframe {
	position: absolute;
	top: 0;
	left: 50%;
	width: 100%;
	height: 100%;
	border: 0;
	transform: translateX(-50%);
}

.tob-video__button {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0;
	color: #fff;
	background: rgba(9, 12, 18, 0.35);
	border: 0;
	cursor: pointer;
	transition: background 0.15s ease-in-out;
}

.tob-video__button:hover,
.tob-video__button:focus-visible {
	background: rgba(9, 12, 18, 0.5);
}

.tob-video__button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
}

.tob-video__icon {
	position: relative;
	display: block;
	width: 4.5rem;
	height: 4.5rem;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.tob-video__icon::after {
	position: absolute;
	top: 50%;
	left: 54%;
	content: "";
	border-color: transparent transparent transparent #10131a;
	border-style: solid;
	border-width: 0.85rem 0 0.85rem 1.4rem;
	transform: translate(-50%, -50%);
}

.tob-video__label {
	font-size: 0.95rem;
	font-weight: 600;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.tob-video__note {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	opacity: 0.75;
}

.tob-video-badge {
	position: relative;
	display: inline-block;
	width: 1.5rem;
	height: 1.5rem;
	vertical-align: middle;
	background: rgba(16, 19, 26, 0.85);
	border-radius: 50%;
}

.tob-video-badge::after {
	position: absolute;
	top: 50%;
	left: 55%;
	content: "";
	border-color: transparent transparent transparent #fff;
	border-style: solid;
	border-width: 0.3rem 0 0.3rem 0.5rem;
	transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: reduce) {

	.tob-video__button {
		transition: none;
	}
}
