/*
 * VWT YouTube Live — Frontend
 * Schrift und Textfarbe kommen vom Theme. Alle eigenen Werte sind Variablen
 * und lassen sich im Theme überschreiben, z. B.:
 *   .vwt-yt { --vwt-yt-live: #a2231d; }
 */

.vwt-yt {
	--vwt-yt-live: #c8342b;
	--vwt-yt-upcoming: #4a5568;
	--vwt-yt-surface: rgba(0, 0, 0, 0.04);
	--vwt-yt-radius: 10px;
	--vwt-yt-gap: 0.75rem;
}

.vwt-yt-card {
	display: flex;
	flex-direction: column;
	gap: var(--vwt-yt-gap);
	padding: 1.25rem;
	background: var(--vwt-yt-surface);
	border-radius: var(--vwt-yt-radius);
}

.vwt-yt-card > * {
	margin: 0;
}

.vwt-yt-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.vwt-yt-badge--live {
	color: var(--vwt-yt-live);
}

.vwt-yt-badge--upcoming {
	color: var(--vwt-yt-upcoming);
}

/* Der pulsierende Punkt ist das einzige Schmuckelement. */
.vwt-yt-dot {
	width: 0.6em;
	height: 0.6em;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 0 currentColor;
	animation: vwt-yt-pulse 2s ease-out infinite;
}

@keyframes vwt-yt-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(200, 52, 43, 0.55);
	}
	70% {
		box-shadow: 0 0 0 0.7em rgba(200, 52, 43, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(200, 52, 43, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.vwt-yt-dot {
		animation: none;
	}
}

.vwt-yt-title {
	font-size: 1.25rem;
	line-height: 1.3;
}

.vwt-yt-when,
.vwt-yt-viewers {
	font-size: 0.9375rem;
	opacity: 0.75;
}

.vwt-yt-player {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: calc(var(--vwt-yt-radius) - 2px);
	overflow: hidden;
	background: #000;
}

.vwt-yt-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.vwt-yt-thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: calc(var(--vwt-yt-radius) - 2px);
}

.vwt-yt-link {
	display: inline-block;
	font-weight: 600;
}

.vwt-yt-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.vwt-yt-offline {
	font-size: 0.9375rem;
	opacity: 0.7;
}

/* Offline-Anzeige: gleiche Karte, ruhender Punkt, gedämpfte Farbe. */
.vwt-yt-badge--offline {
	color: var(--vwt-yt-upcoming);
	opacity: 0.8;
}

.vwt-yt-dot--still {
	animation: none;
	box-shadow: none;
	opacity: 0.6;
}

.vwt-yt-card--offline {
	background: transparent;
	border: 1px solid rgba(0, 0, 0, 0.12);
}
