/* ==========================================================================
   Live coverage in an article: heading, key events, timeline of updates and
   the "new updates" button. The lamp and the breaking bar are in live-lamp.css.
   ========================================================================== */

.aeon-live {
	--live-red: #d62828;
	--live-red-ink: #b3261e;
	--live-ink: #161416;
	--live-muted: #6b6870;
	--live-line: #ecd9d7;
	--live-soft: #faf5f4;

	display: block;
	clear: both;
	margin: 36px 0 28px;
	padding-top: 14px;
	border-top: 3px solid var(--live-red);
	font-family: var(--aeon-ui-font, Roboto, Arial, sans-serif);
}

.aeon-live[data-state="ended"] {
	--live-red: #8a8590;
	--live-red-ink: #6b6870;
	--live-line: #e4e1dd;
	--live-soft: #f6f5f3;
}

.single-post-content .aeon-live__heading,
.aeon-live__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	font: 800 14px/1.2 var(--aeon-ui-font, Roboto, Arial, sans-serif);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--live-red);
}

.aeon-live__heading .aeon-live__lamp {
	color: var(--live-red);
	width: 9px;
	height: 9px;
}

/* Key events: a quiet card of anchors to the updates that matter. */
.aeon-live__key-events {
	margin: 0 0 26px;
	padding: 16px 20px 12px;
	background: var(--live-soft);
	border-radius: 4px;
}

.aeon-live__key-events:not(:has(li)) {
	display: none;
}

.single-post-content .aeon-live__key-events h3,
.aeon-live__key-events h3 {
	float: none;
	width: auto;
	margin: 0 0 8px;
	font: 700 12px/1.2 var(--aeon-ui-font, Roboto, Arial, sans-serif);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--live-muted);
}

.aeon-live__key-events ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aeon-live__key-events li {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	padding: 6px 0;
	font-size: 16px;
	line-height: 1.35;
	list-style: none;
}

.aeon-live__key-events li::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--live-red);
	transform: translateY(-2px);
}

.aeon-live .aeon-live__key-events a {
	color: var(--live-ink);
	text-decoration: none;
}

.aeon-live__key-events a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Timeline. */
.aeon-live__feed {
	display: grid;
	gap: 0;
	padding-left: 24px;
	border-left: 2px solid var(--live-line);
}

.aeon-live__update {
	position: relative;
	min-width: 0;
	padding: 0 0 30px;
	scroll-margin-top: 120px;
}

.aeon-live__update::before {
	content: "";
	position: absolute;
	top: 5px;
	left: -31px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 2px var(--live-red);
}

.aeon-live__update:target {
	animation: aeon-live-target 2.4s ease-out;
}

@keyframes aeon-live-target {
	0% { background: color-mix(in srgb, var(--live-red) 12%, transparent); }
	100% { background: transparent; }
}

.aeon-live__update--pinned {
	margin: 0 0 30px -12px;
	padding: 14px 16px 18px 12px;
	background: var(--live-soft);
	border-radius: 4px;
	box-shadow: inset 3px 0 0 var(--live-red);
}

.aeon-live__update--pinned::before {
	left: -19px;
	top: 19px;
	background: var(--live-red);
}

.aeon-live__time {
	display: block;
	margin: 0 0 4px;
	font: 700 13px/1.3 var(--aeon-ui-font, Roboto, Arial, sans-serif);
	font-variant-numeric: tabular-nums;
	color: var(--live-red-ink);
}

.single-post-content .aeon-live__update-title,
.aeon-live__update-title {
	float: none;
	width: auto;
	margin: 0 0 6px;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--live-ink);
}

.aeon-live__body {
	font-family: var(--aeon-body-font, "Publico Text Web", Georgia, serif);
}

.aeon-live__body > :first-child {
	margin-top: 0;
}

.aeon-live__body > :last-child {
	margin-bottom: 6px;
}

.aeon-live__body iframe,
.aeon-live__body img,
.aeon-live__body video {
	max-width: 100%;
	height: auto;
}

.aeon-live__author {
	display: block;
	font-size: 13px;
	color: var(--live-muted);
}

/* "N new updates": floats under the header without moving the reader. */
.aeon-live__new {
	position: sticky;
	top: 84px;
	z-index: 20;
	display: block;
	margin: 0 auto 16px;
	padding: 9px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--live-red);
	color: #fff;
	font: 700 14px/1 var(--aeon-ui-font, Roboto, Arial, sans-serif);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	cursor: pointer;
}

.aeon-live__new::before {
	content: "↑ ";
}

.aeon-live__new[hidden] {
	display: none;
}

.aeon-live__badge {
	display: inline-flex;
	align-items: center;
}

/* Editor box. */
.aeon-live__editor { display: grid; gap: 0.75rem; }
.aeon-live__editor-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

@media (max-width: 767px) {
	.aeon-live__feed {
		padding-left: 18px;
	}

	.aeon-live__update::before {
		left: -25px;
	}

	.aeon-live__update--pinned::before {
		left: -13px;
	}

	.aeon-live__new {
		top: 64px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aeon-live__update:target { animation: none; }
}

:is(html.aeon-dark-mode-active, body.dark-mode) .aeon-live {
	--live-red: #ef5350;
	--live-red-ink: #ff8a80;
	--live-ink: #f1eeea;
	--live-muted: #a19ca3;
	--live-line: #3a2a2a;
	--live-soft: #262022;
}

:is(html.aeon-dark-mode-active, body.dark-mode) .aeon-live[data-state="ended"] {
	--live-red: #8a8590;
	--live-red-ink: #a19ca3;
	--live-line: #2e2b2f;
	--live-soft: #232023;
}

:is(html.aeon-dark-mode-active, body.dark-mode) .aeon-live__update::before {
	background: var(--dm-bg-main-section, #1c1c1c);
}
