/**
 * fanorate/tournament-countdown-band
 *
 * Dark-navy section · two-column desktop layout (header left / match cards right)
 * · three light-gray match cards each carrying per-match countdown.
 *
 * JS hooks
 *   [data-tcb-pool]      – section — JSON pool of upcoming matches.
 *   [data-tcb-matches]   – matches wrapper — receives promoted cards.
 *   [data-utc]           – .tcb-match — UTC kick-off; drives countdown.
 *   [data-utc-date]      – .tcb-match__date — converted to local date by JS.
 *   [data-utc-time]      – .tcb-match__time — converted to local time by JS.
 *   [data-unit]          – .tcb-match__tile — unit key for JS timer.
 *   .tcb-match--out      – exit animation on expiry.
 *   .tcb-match--in       – enter animation on promotion.
 */

/* ── Section ────────────────────────────────────────────────────────────────── */
.section-tournament-countdown-band {
	background: var(--surface-inverse, #0a2240);
	padding: 52px 0 60px;
}

#tournament-countdown-band{
	padding: 50px 0;
}

/* ══ Single-column layout ══════════════════════════════════════════════════════ */
/* Header row at top, card grid below */
.section-tournament-countdown-band .tcb-layout {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* ══ Header row: title left, CTA right ══════════════════════════════════════════ */
.section-tournament-countdown-band .tcb-head {
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}

.section-tournament-countdown-band .tcb-head__text {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Eyebrow */
.section-tournament-countdown-band .tcb-head__eyebrow {
	display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font: var(--eyebrow);
    letter-spacing: var(--ls-eyebrow);
    text-transform: uppercase;
    color: var(--color-primary);
	margin: 0 0 14px;
}

.section-tournament-countdown-band .tcb-head__dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
    background: var(--color-primary);
	flex-shrink: 0;
	display: inline-block;
}

/* Heading */
.section-tournament-countdown-band .tcb-head__title {
	margin: 0;
}

/* CTA: inline text link with red underline */
.section-tournament-countdown-band .tcb-head__cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--font-ui, "Inter", sans-serif);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #0a2240;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid var(--color-primary, #e5253d);
	padding-bottom: 3px;
	flex-shrink: 0;
	align-self: flex-end;
}
.section-tournament-countdown-band .tcb-head__cta:hover {
	color: var(--color-primary, #e5253d);
}

/* "MATCHES." accent */
.section-tournament-countdown-band .tcb-head__title em,
.section-tournament-countdown-band .tcb-head__title .tcb-accent {
	font-style: normal;
	color: var(--color-primary, #e5253d);
}

/* Optional logo */
.section-tournament-countdown-band .tcb-head__logo img {
	display: block;
	width: 110px;
	height: auto;
	margin-top: 4px;
}

/* ══ Match cards: 3-column grid ═══════════════════════════════════════════════════ */
.section-tournament-countdown-band .tcb-matches {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-md);
}

/* ── Single match card ─────────────────────────────────────────────────────── */
.section-tournament-countdown-band .tcb-match {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--surface-card);
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	transition: transform var(--dur-fast) var(--ease-out),
		box-shadow var(--dur-fast) var(--ease-out),
		border-color var(--dur-fast) var(--ease-out),
		opacity 0.36s ease;
}

/* Inner grows to fill card, pinning preview link to the bottom */
.section-tournament-countdown-band .tcb-match__inner {
	flex: 1;
}

/* Same lift-on-hover as the match-schedule cards (.msch-card). */
.section-tournament-countdown-band .tcb-match:hover {
	transform: translateY(-2px);
	border-color: var(--border-default);
	box-shadow: var(--shadow-md);
}

/* Exit animation */
.section-tournament-countdown-band .tcb-match--out {
	opacity: 0;
	transform: translateY(-10px);
	pointer-events: none;
}

/* Enter animation */
.section-tournament-countdown-band .tcb-match--in {
	opacity: 0;
	transform: translateY(12px);
}

/* Kicked-off + frozen (a live match is showing in the hero): the match has
   started so its countdown is meaningless — hide it rather than show 00:00:00.
   The card is held in place until the hero's live match is over. */
.section-tournament-countdown-band .tcb-match--kicked .tcb-match__countdown {
	display: none;
}

/* Inner layout: vertical flex (badge → teams row → countdown) */
.section-tournament-countdown-band .tcb-match__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	padding: 20px;
}

/* ── Date + time badge at top of card ──────────────────────────────────────── */
.section-tournament-countdown-band .tcb-match__badge {
	display: flex;
	align-items: center;
	gap: 4px;
}

/* ── Teams row: home | VS | away ────────────────────────────────────────────── */
.section-tournament-countdown-band .tcb-match__teams-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.section-tournament-countdown-band .tcb-match__teams-row .tcb-match__team {
	flex: 1;
}

.section-tournament-countdown-band .tcb-match__teams-row .tcb-match__team--away {
	justify-content: flex-start;
    flex-direction: row-reverse;
}

/* ── Teams ──────────────────────────────────────────────────────────────────── */
.section-tournament-countdown-band .tcb-match__team {
	display: flex;
	align-items: center;
	gap: 12px;
}

.section-tournament-countdown-band .tcb-match__team--away {
	justify-content: flex-end;
}

.section-tournament-countdown-band .tcb-match__flag { flex-shrink: 0; }

.section-tournament-countdown-band .tcb-flag-img {
	display: block;
	width: 36px;
	height: 26px;
	object-fit: cover;
	border-radius: 3px;
}

.section-tournament-countdown-band .tcb-flag-emoji {
	font-size: 24px;
	line-height: 1;
}
/* When WordPress swaps the flag glyph for its emoji image, size it to the chip. */
.section-tournament-countdown-band .tcb-flag-emoji img.emoji,
.section-tournament-countdown-band .tcb-flag-emoji img.wp-smiley {
	width: 1em;
	height: auto;
	margin: 0;
	vertical-align: middle;
}

.section-tournament-countdown-band .tcb-match__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.section-tournament-countdown-band .tcb-match__info--away {
	text-align: right;
}

.section-tournament-countdown-band .tcb-match__name {
	font-family: var(--font-display, "Anton", sans-serif);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: #0a2240;
	line-height: 1;
}

.section-tournament-countdown-band .tcb-match__sub {
	font-family: var(--font-ui, "Inter", sans-serif);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #6b7c93;
}

/* ── Center: date / VS / time ───────────────────────────────────────────────── */
.section-tournament-countdown-band .tcb-match__center {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	text-align: center;
}

.section-tournament-countdown-band .tcb-match__date {
	font-family: var(--font-ui, "Inter", sans-serif);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #6b7c93;
}

.section-tournament-countdown-band .tcb-match__vs {
	font-family: var(--font-display, "Anton", sans-serif);
	font-size: 20px;
	font-weight: 400;
	letter-spacing: .04em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--color-primary, #e5253d);
	flex-shrink: 0;
}

.section-tournament-countdown-band .tcb-match__time {
	font-family: var(--font-ui, "Inter", sans-serif);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	color: #6b7c93;
}

/* ── Per-match countdown ────────────────────────────────────────────────────── */
.section-tournament-countdown-band .tcb-match__countdown {
	display: flex;
	align-items: center;
	gap: 16px;
	border-top: 1px solid rgba(10, 34, 64, 0.10);
	padding-top: 14px;
	display: none;
}

.section-tournament-countdown-band .tcb-match__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	min-width: 36px;
}

.section-tournament-countdown-band .tcb-match__tile-val {
	font-family: var(--font-display, "Anton", sans-serif);
	font-size: 32px;
	font-weight: 400;
	line-height: 1;
	color: #0a2240;
}

.section-tournament-countdown-band .tcb-match__tile-lbl {
	font-family: var(--font-ui, "Inter", sans-serif);
	font-size: 8px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #6b7c93;
}

/* Seconds tile: brand red */
.section-tournament-countdown-band .tcb-match__tile--secs .tcb-match__tile-val,
.section-tournament-countdown-band .tcb-match__tile--secs .tcb-match__tile-lbl {
	color: var(--color-primary, #e5253d);
}

/* ── Per-tile "Match preview →" link ────────────────────────────────────────── */
/* A slim footer strip under each card. Sits above the full-card overlay (z-index)
   so it is the keyboard/focus target, while the overlay handles whole-card clicks. */
.section-tournament-countdown-band .tcb-match__preview {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	margin-top: auto;
	/* padding: 9px 24px; */
	/* border-top: 1px solid rgba(10, 34, 64, 0.10); */
	font-family: var(--font-ui, "Inter", sans-serif);
	font-size: 13px;
	font-weight: 600;
	/* letter-spacing: .14em;
	text-transform: uppercase; */
	color: var(--text-primary);
	text-decoration: none;
}
.section-tournament-countdown-band .tcb-match__preview:hover {
	color: var(--color-primary-dark, #b5172a);
}
.section-tournament-countdown-band .tcb-match__preview-arrow {
	display: inline-block;
	transition: transform 120ms ease;
}
.section-tournament-countdown-band .tcb-match:hover .tcb-match__preview-arrow {
	transform: translateX(3px);
}
@media (prefers-reduced-motion: reduce) {
	.section-tournament-countdown-band .tcb-match__preview-arrow { transition: none; }
}

/* ── Full-card link overlay ─────────────────────────────────────────────────── */
.section-tournament-countdown-band .tcb-match__link-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ── No-matches fallback ────────────────────────────────────────────────────── */
.section-tournament-countdown-band .tcb-no-matches {
	font-family: var(--font-ui, "Inter", sans-serif);
	font-size: 14px;
	color: rgba(255, 255, 255, 0.55);
	margin: 0;
	padding: 12px 0;
}

/* ══ Responsive ══════════════════════════════════════════════════════════════════ */

/* Tablet: 2-column card grid */
@media (max-width: 960px) {
	.section-tournament-countdown-band {
		padding: 40px 0 48px;
	}

	.section-tournament-countdown-band .tcb-matches {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: horizontal scroll strip */
@media (max-width: 640px) {
	.section-tournament-countdown-band .tcb-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.section-tournament-countdown-band .tcb-head__logo { display: none; }

	.section-tournament-countdown-band .tcb-matches {
		display: flex;
		flex-direction: row;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 12px;
		padding-bottom: 4px;
	}

	.section-tournament-countdown-band .tcb-matches::-webkit-scrollbar {
		display: none;
	}

	.section-tournament-countdown-band .tcb-match {
		min-width: 70vw;
		flex-shrink: 0;
		scroll-snap-align: start;
	}
}
