/* ---- Live hubs on the homepage and /live/ (ADR-158, inc/live-hub-home.php) ----
 * nationwidetimes on Oct. 13 at 19:30 UTC: "● LIVE NOW  All live coverage →" over the Guilfoyle and Omar hubs side by
 * side, each with its photo, pill and "Updated 1:54 PM", headline, newest three entries ("1:54 PM  UPDATE  Rep.
 * Gregory Meeks requested …"; a phone shows two), and "5 updates · since 11:14 AM   Follow live →". Under them, grey
 * "JUST ENDED" rows for hubs inside their editor's hours. Enqueued on a homepage that shows the band and on /live/.
 * Colours are the site's palette tokens with light fallbacks, so the dark scheme follows; the live red is fixed.
 */

.tms-live-band {
	border-top: 3px solid #dc2626;
	margin: 0 0 var(--tms-space-lg, 1.5rem);
	padding-top: var(--tms-space-sm, 0.75rem);
}

.tms-live-band--ended-only {
	border-top-color: var(--tms-color-border, #d1d5db);
}

.tms-live-band__head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	justify-content: space-between;
	margin-bottom: var(--tms-space-sm, 0.75rem);
}

.tms-live-band__title {
	align-items: center;
	color: #dc2626;
	display: inline-flex;
	font-family: var(--tms-font-body);
	font-size: 0.8125rem;
	font-weight: 800;
	gap: 8px;
	letter-spacing: 0.1em;
	margin: 0;
	text-transform: uppercase;
}

.tms-live-band--ended-only .tms-live-band__title {
	color: var(--tms-color-muted, #6b7280);
}

.tms-live-band__dot {
	animation: tms-live-dot-pulse 1.6s ease-in-out infinite;
	background: #dc2626;
	border-radius: 50%;
	flex: none;
	height: 9px;
	width: 9px;
}

.tms-live-band__all {
	color: var(--tms-color-text, #111827);
	font-size: 0.8125rem;
	font-weight: 700;
	text-decoration: none;
}

.tms-live-band__all:hover,
.tms-live-band__all:focus-visible {
	text-decoration: underline;
}

.tms-live-band__cards {
	display: grid;
	gap: var(--tms-space-md, 1rem) var(--tms-space-lg, 1.5rem);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 801px) {
	.tms-live-band--count-2 .tms-live-band__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Three live: the newest-updated as a hero across the row, two compact cards under it. */
	.tms-live-band--count-3 .tms-live-band__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tms-live-band--count-3 .tms-live-card--hero {
		grid-column: 1 / -1;
	}
}

/* ---- a hub's card ---- */
.tms-live-card {
	display: flex;
	flex-direction: column;
	gap: var(--tms-space-sm, 0.75rem);
	min-width: 0;
}

.tms-live-card__media {
	display: block;
}

.tms-live-card__image,
.tms-live-card__media img {
	aspect-ratio: 16 / 9;
	display: block;
	height: auto;
	max-width: 100%;
	object-fit: cover;
	width: 100%;
}

.tms-live-card .tms-live-status {
	align-items: center;
	color: var(--tms-color-muted, #6b7280);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.75rem;
	font-weight: 700;
	gap: 0.35rem 0.6rem;
	margin: 0 0 0.35rem;
}

.tms-live-card .tms-live-pill {
	align-items: center;
	background: #dc2626;
	border-radius: 3px;
	color: #fff;
	display: inline-flex;
	font-size: 0.6875rem;
	font-weight: 800;
	gap: 0.4rem;
	letter-spacing: 0.08em;
	line-height: 1;
	padding: 4px 7px 3px;
	text-transform: uppercase;
}

.tms-live-card .tms-live-pill__dot {
	animation: tms-live-dot-pulse 1.6s ease-in-out infinite;
	background: currentColor;
	border-radius: 50%;
	flex: none;
	height: 6px;
	width: 6px;
}

.tms-live-card .tms-live-status--ended {
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tms-live-card__title {
	font-family: var(--tms-font-headline);
	font-size: 1.25rem;
	line-height: 1.2;
	margin: 0;
	text-wrap: balance;
}

.tms-live-card__title a {
	color: var(--tms-color-text, #111827);
	text-decoration: none;
}

.tms-live-card__title a:hover,
.tms-live-card__title a:focus-visible {
	text-decoration: underline;
}

.tms-live-card--hero .tms-live-card__title {
	font-size: 1.75rem;
}

.tms-live-card--compact .tms-live-card__title {
	font-size: 1.0625rem;
}

@media (min-width: 801px) {
	.tms-live-card--hero {
		display: grid;
		gap: var(--tms-space-lg, 1.5rem);
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	}

	.tms-live-card--hero .tms-live-card__lead {
		display: flex;
		flex-direction: column;
		gap: var(--tms-space-sm, 0.75rem);
	}
}

.tms-live-card__summary {
	border-left: 3px solid #dc2626;
	font-size: 0.9375rem;
	line-height: 1.45;
	margin: 0 0 var(--tms-space-sm, 0.75rem);
	padding: 0 0 0 0.85rem;
}

.tms-live-card__summary li + li {
	margin-top: 0.35rem;
}

/* The newest entries: the time and the tag on one row, the text under them across the whole column (owner,
 * Oct. 13: on /live/ the Guilfoyle hub's "2:01 PM BREAKING Greece's opposition PASOK party called …" wrapped into
 * a narrow column beside its time). The band and /live/ share it (owner call C). */
.tms-live-card__timeline {
	border-left: 1px solid var(--tms-color-border, #e5e7eb);
	list-style: none;
	margin: 0;
	padding: 0 0 0 0.85rem;
}

.tms-live-card__line {
	display: grid;
	font-size: 0.875rem;
	gap: 0.1rem 0.5rem;
	grid-template-columns: auto minmax(0, 1fr);
	line-height: 1.35;
	padding: 0.3rem 0;
	position: relative;
}

.tms-live-card__line::before {
	background: var(--tms-color-border, #d1d5db);
	border-radius: 50%;
	content: "";
	height: 7px;
	left: calc(-0.85rem - 4px);
	position: absolute;
	top: 0.65rem;
	width: 7px;
}

.tms-live-card__line:first-child::before {
	background: #dc2626;
}

.tms-live-card__when {
	color: var(--tms-color-muted, #6b7280);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	white-space: nowrap;
}

.tms-live-card__tag {
	color: var(--tms-color-muted, #6b7280);
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	padding-top: 0.1rem;
	text-transform: uppercase;
	white-space: nowrap;
}

.tms-live-card__tag--breaking,
.tms-live-card__tag--correction {
	color: #dc2626;
}

.tms-live-card__text {
	-webkit-box-orient: vertical;
	grid-column: 1 / -1;
	color: var(--tms-color-text, #111827);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.tms-live-card__foot {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.8125rem;
	gap: 0.35rem 1rem;
	justify-content: space-between;
	margin: 0.5rem 0 0;
}

.tms-live-card__count {
	color: var(--tms-color-muted, #6b7280);
}

.tms-live-card__follow {
	color: #dc2626;
	font-weight: 800;
	text-decoration: none;
}

.tms-live-card__follow:hover,
.tms-live-card__follow:focus-visible {
	text-decoration: underline;
}

/* ---- Just ended ---- */
.tms-live-band__ended {
	border-top: 1px solid var(--tms-color-border, #e5e7eb);
	list-style: none;
	margin: var(--tms-space-md, 1rem) 0 0;
	padding: 0;
}

.tms-live-band--ended-only .tms-live-band__ended {
	border-top: 0;
	margin-top: 0;
}

.tms-live-band__ended-item {
	align-items: baseline;
	background: var(--tms-color-surface, #f3f4f6);
	display: grid;
	gap: 0.25rem 0.85rem;
	grid-template-columns: auto minmax(0, 1fr) auto;
	margin-top: 0.5rem;
	padding: 0.6rem 0.85rem;
}

.tms-live-band__ended-label {
	color: var(--tms-color-muted, #6b7280);
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.tms-live-band__ended-title {
	color: var(--tms-color-text, #111827);
	font-family: var(--tms-font-headline);
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
}

.tms-live-band__ended-title:hover,
.tms-live-band__ended-title:focus-visible {
	text-decoration: underline;
}

.tms-live-band__ended-when {
	color: var(--tms-color-muted, #6b7280);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ---- /live/ ---- */
.tms-live-page {
	padding-block: var(--tms-space-lg, 1.5rem);
}

.tms-live-page__head {
	border-bottom: 3px solid #dc2626;
	margin-bottom: var(--tms-space-lg, 1.5rem);
	padding-bottom: var(--tms-space-sm, 0.75rem);
}

.tms-live-page__title {
	font-family: var(--tms-font-headline);
	font-size: 2.25rem;
	line-height: 1.1;
	margin: 0 0 0.35rem;
}

.tms-live-page__intro {
	color: var(--tms-color-muted, #6b7280);
	margin: 0;
}

.tms-live-page__section {
	margin-bottom: var(--tms-space-lg, 1.5rem);
}

.tms-live-page__section .tms-live-band__title {
	margin-bottom: var(--tms-space-sm, 0.75rem);
}

.tms-live-page__cards {
	display: grid;
	gap: var(--tms-space-lg, 1.5rem);
}

.tms-live-card--row {
	border-bottom: 1px solid var(--tms-color-border, #e5e7eb);
	padding-bottom: var(--tms-space-lg, 1.5rem);
}

@media (min-width: 801px) {
	.tms-live-card--row {
		display: grid;
		gap: var(--tms-space-lg, 1.5rem);
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	}

	.tms-live-card--row .tms-live-card__body {
		grid-column: 2;
	}
}

.tms-live-page__empty {
	background: var(--tms-color-surface, #f3f4f6);
	margin: 0 0 var(--tms-space-lg, 1.5rem);
	padding: var(--tms-space-md, 1rem) var(--tms-space-lg, 1.5rem);
}

.tms-live-page__recent-title {
	font-family: var(--tms-font-body);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	margin: 0 0 var(--tms-space-sm, 0.75rem);
	text-transform: uppercase;
}

.tms-live-page__recent {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tms-live-page__recent-item {
	align-items: baseline;
	border-top: 1px solid var(--tms-color-border, #e5e7eb);
	display: grid;
	gap: 0.85rem;
	grid-template-columns: auto minmax(0, 1fr);
	padding: 0.75rem 0;
}

.tms-live-page__recent-label {
	color: var(--tms-color-muted, #6b7280);
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tms-live-page__recent-link {
	color: var(--tms-color-text, #111827);
	font-family: var(--tms-font-headline);
	font-size: 1.0625rem;
	font-weight: 700;
	text-decoration: none;
}

.tms-live-page__recent-meta {
	color: var(--tms-color-muted, #6b7280);
	font-size: 0.8125rem;
	margin: 0.2rem 0 0;
}

/* ---- phones: one column, two timeline lines (owner call D) ---- */
@media (max-width: 640px) {
	.tms-live-card__line--wide {
		display: none;
	}

	.tms-live-card--hero .tms-live-card__title {
		font-size: 1.375rem;
	}

	.tms-live-band__ended-item {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.tms-live-band__ended-title {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.tms-live-page__title {
		font-size: 1.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tms-live-band__dot,
	.tms-live-card .tms-live-pill__dot {
		animation: none;
	}
}
