/* vnEsports Lịch thi đấu — uses the theme's colour variables when present. */
.vne-sched,
.sched-box {
	--s-text: var(--color-text, #1f2329);
	--s-muted: var(--color-text-secondary, #6b7280);
	--s-strong: var(--color-text-dark, #111);
	--s-accent: var(--color-primary, #e11d48);
	--s-accent-soft: var(--color-primary-light, rgba(225, 29, 72, 0.4));
	--s-pill: var(--color-pill, #f1f2f4);
	--s-panel: var(--color-white, #fff);
	--s-hover: var(--color-surface-hover, #f6f7f9);
	--s-border: var(--color-border, #e5e7eb);
	--s-radius: var(--radius, 4px);
}

.vne-sched { margin: 8px 0 0; text-align: left; }
.vne-sched ul, .vne-sched ol { margin: 0; padding: 0; list-style: none; }
.vne-sched a { color: inherit; text-decoration: none; }
.entry-content .vne-sched h2, .entry-content .vne-sched h3 { margin: 0; scroll-margin-top: 0; }

.sched-box {
	margin: 0 0 16px;
	padding: 14px 16px;
	text-align: left;
	color: var(--s-text);
	background: var(--s-panel);
	border: 1px solid var(--s-border);
	border-radius: var(--s-radius);
}
.sched-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sched-box-title { font-size: 18px; line-height: 26px; color: var(--s-strong); }
.sched-more { flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--s-accent) !important; }
.sched-more:hover { text-decoration: underline; }
.sched-sub { margin: 10px 0 0; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--s-muted); }
.sched-empty { margin: 8px 0 0; color: var(--s-muted); }
.sched-day + .sched-day { margin-top: 10px; }
.sched-day-title { margin: 10px 0 0 !important; font-size: 14px !important; line-height: 20px !important; color: var(--s-accent); }

.sched-row {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) minmax(110px, 160px) 92px;
	align-items: center;
	gap: 12px;
	margin: 0 !important;
	padding: 10px 0;
	border-bottom: 1px solid var(--s-border);
}
.sched-row:last-child { border-bottom: 0; }
.sched-when { display: flex; flex-direction: column; font-size: 14px; line-height: 18px; font-weight: 700; }
.sched-date { font-size: 12px; font-weight: 400; color: var(--s-muted); }
.sched-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.sched-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 400; color: var(--s-text); }
.sched-team--1 { justify-content: flex-end; text-align: right; }
.sched-team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Links (team / tournament pages) are red and regular weight so they read as links. */
.sched-box a.sched-team, .sched-box a.sched-tour { font-weight: 400; color: var(--s-accent); }
.sched-box a.sched-team:hover .sched-team-name, .sched-box a.sched-tour:hover { text-decoration: underline; }
.sched-team.is-tbd { color: var(--s-muted); }
.sched-team.is-loser { opacity: 0.55; }
.sched-logo { flex: 0 0 22px; width: 22px !important; height: 22px !important; margin: 0 !important; object-fit: contain; border-radius: 4px; }
.sched-score {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-width: 60px; padding: 3px 8px;
	font-size: 16px; line-height: 22px; font-weight: 700;
	background: var(--s-pill);
	border-radius: var(--s-radius);
}
.sched-score i { font-style: normal; color: var(--s-muted); }
.sched-score--vs { font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--s-muted); }
.sched-event { font-weight: 700; }
.sched-info { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 18px; color: var(--s-muted); }
.sched-box span.sched-tour { font-weight: 700; color: var(--s-strong); }
.sched-status { font-size: 12px; line-height: 16px; text-align: right; color: var(--s-muted); }
.sched-row--live .sched-status { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; font-weight: 700; color: var(--s-accent); }
.sched-row--live .sched-status::before { content: ""; width: 7px; height: 7px; background: var(--s-accent); border-radius: 50%; animation: vne-sched-pulse 1.4s infinite; }
.sched-row--live .sched-score { color: var(--s-accent); }
@keyframes vne-sched-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .sched-row--live .sched-status::before { animation: none; } }

.sched-podium { counter-reset: none; }
.sched-podium-item { display: flex; align-items: center; gap: 12px; margin: 0 !important; padding: 8px 0; border-bottom: 1px solid var(--s-border); }
.sched-podium-item:last-child { border-bottom: 0; }
.sched-podium-place { display: grid; place-items: center; flex: 0 0 28px; height: 28px; font-weight: 700; background: var(--s-pill); border-radius: 50%; }
.sched-podium-item--1 .sched-podium-place { color: #1a1300; background: #f5c542; }
.sched-podium-item--2 .sched-podium-place { color: #111; background: #c9ced6; }
.sched-podium-item--3 .sched-podium-place { color: #fff; background: #b8743c; }

.sched-credit { margin: 4px 0 0 !important; font-size: 13px; line-height: 18px; color: var(--s-muted); }

/* Narrow boxes (sidebars) and phones: time on the left, details stacked. */
.sched-box--aside .sched-row,
.sched-box--aside .sched-list .sched-row { grid-template-columns: 40px minmax(0, 1fr); gap: 2px 10px; }
.sched-box--aside .sched-when { grid-row: span 3; align-self: start; padding-top: 2px; }
.sched-box--aside .sched-info { flex-direction: row; flex-wrap: wrap; gap: 2px 8px; }
.sched-box--aside .sched-status { text-align: left; }
.sched-box--aside .sched-teams { gap: 6px; font-size: 14px; }
.sched-box--aside .sched-score { min-width: 42px; padding: 1px 6px; font-size: 14px; }

@media (max-width: 767px) {
	.sched-box { padding: 12px; }
	.sched-row { grid-template-columns: 44px minmax(0, 1fr); gap: 2px 10px; }
	.sched-when { grid-row: span 3; align-self: start; padding-top: 2px; }
	.sched-info { flex-direction: row; flex-wrap: wrap; gap: 2px 8px; }
	.sched-status { text-align: left; }
	.sched-row--live .sched-status { justify-content: flex-start; }
	.sched-teams { gap: 6px; }
	.sched-score { min-width: 48px; padding: 2px 6px; font-size: 15px; }
}
