/* Your live match card (UV, 18 Nov; scripts/live-match.js): the home page's Get the
   app card's glass with a yellow glow inside, the glow of an active scorecard session
   (league.css .cs-session.is-active). On the home page (index.html places its box) and
   above the page's card on every tab of a league season's page (#league-live). */

.live-card {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-width: 0;
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	background: color-mix(in srgb, var(--bg-base) 35%, transparent);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
	/* The site's card shadow, cast by the page light (UV, 18 Nov) */
	box-shadow: var(--nm-card), inset 0 1px 0 rgba(255, 255, 255, 0.08),
		inset 0 0 14px color-mix(in srgb, var(--color-warning) 35%, transparent);
	color: var(--text-primary);
}
/* The link takes the card but its ✕ (UV, 18 Nov), as the Get the app card's */
.live-card-link {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	color: inherit;
	text-decoration: none;
}
/* Unset first: a page's own button styles (the league page's raised controls) must
   not reach it */
.live-cards .live-card-x {
	all: unset;
	box-sizing: border-box;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-right: calc(-1 * var(--space-2));
	color: var(--text-muted);
	font-size: 1rem;
	cursor: pointer;
}
.live-cards .live-card-x:focus-visible { outline: 2px solid var(--color-primary); border-radius: var(--radius-round); }
.live-face {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-round);
	display: grid;
	place-items: center;
	overflow: hidden;
	font-size: 0.8rem;
	color: var(--text-muted);
}
/* Initials in a sunken circle; a team's hexagon casts its own (as the Matches card) */
.live-face:not(:has(img, .tdc-shaped)) { box-shadow: var(--nm-sunken-small); }
.live-face img { width: 100%; height: 100%; object-fit: cover; }
.live-face-team { color: var(--color-primary); }
.live-card-words { flex: 1 1 auto; min-width: 0; }
.live-card-title,
.live-card-sub {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.live-card-title { font-weight: 600; }
.live-card-sub { font-size: 0.85rem; color: var(--text-muted); }
.live-card-go { flex: 0 0 auto; font-size: 1.4rem; color: var(--text-muted); }

/* Stacked, one card per match */
.live-cards {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

/* The league page: above the page's card, as wide as it (UV, 18 Nov). The widths
   follow .tdc-card.wide's (forms.css, design.css); change them together. The card's
   own top margin is the gap between them. */
.league-live {
	box-sizing: border-box;
	width: calc(100% - 2 * var(--space-4));
	max-width: 860px;
	margin: var(--space-4) auto 0;
}
/* .live-cards' flex beats the hidden attribute; with no live match its margin would
   push the page's card down */
.league-live[hidden] { display: none; }
@media (max-width: 991px) and (orientation: landscape) {
	.league-live {
		max-width: none;
		width: calc(100% - 2 * max(var(--space-4), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)));
	}
}
@media (min-width: 992px) {
	.league-live { max-width: none; width: calc(100% * 10 / 12); }
}

/* Join this league (UV, 24 Nov; live-match.js joinCard): the same card, on the
   Standings tab only; a tap opens the Season tab. */
body:not(:has(.league-panel[data-tab="standings"]:not([hidden]))) .league-join { display: none; }
