/* Home page live-stream takeover (see live-stream.js). Hidden unless the body has .is-live. */
#live-stream {
	display: none;
	grid-column: 1 / span 2;
	margin-top: 20px;
	padding: 10px;
	background-color: #FFF;
}

.is-live #live-stream {
	display: block;
}

.is-live #comic-wrap,
.is-live.live-show-comic #live-stream .live-player {
	display: none;
}

.is-live.live-show-comic #comic-wrap {
	display: block;
}

.live-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1em;
	margin-bottom: 10px;
	font-family: 'Dosis', sans-serif;
	font-size: 1.3rem;
}

.live-dot {
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background-color: #e91916;
	animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
	50% { opacity: 0.3; }
}

.live-toggle {
	padding: 4px 14px;
	border: 0;
	border-radius: 20px;
	background-color: #4a74c9;
	color: #FFF;
	font: inherit;
	font-size: 1rem;
	cursor: pointer;
}

.live-toggle:hover,
.live-toggle:focus {
	background-color: #1c378e;
}

.live-open {
	margin-left: auto;
	font-size: 1rem;
}

.live-player {
	aspect-ratio: 16 / 9;
}

.live-player iframe {
	display: block;
}

@media all and ( min-width: 601px ) {
	/* Tall comics sit beside the sidebar in row 1; put the stream above them. */
	.is-live.tall-comic #live-stream {
		grid-column: 1 / 2;
		grid-row: 1 / 2;
		border-radius: 0 20px 0 0;
	}

	.is-live.tall-comic #comic-wrap {
		grid-row: 2 / 3;
	}

	.is-live.tall-comic #primary {
		grid-row: 3 / 4;
	}

	.is-live.tall-comic #secondary {
		grid-row: 1 / 4;
	}
}

@media all and ( min-width: 1000px ) {
	/* Video plus chat: use the height rather than a 16:9 box. */
	.live-player {
		aspect-ratio: auto;
		height: min( 70vh, 720px );
	}
}

@media all and ( min-width: 1501px ) {
	#live-stream {
		border-radius: 20px 20px 20px 0;
	}
}

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