/**
 * CSL Game Card — Rich score card for BuddyBoss activity feed
 *
 * Rendered via bp_get_activity_content_body filter when activity
 * has csl_enriched_data meta. All classes prefixed .csl-gc- to
 * avoid collisions with BuddyBoss/BuddyPress styles.
 *
 * @since 4.8.0
 */

/* ── Card container ────────────────────────────────────────────── */
.csl-gc {
	background: #fff;
	border: 1px solid #e4e6ea;
	border-radius: 12px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.4;
	max-width: 520px;
}

/* ── Header bar (league pill + date + status) ──────────────────── */
.csl-gc-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #f8f9fa;
	border-bottom: 1px solid #e4e6ea;
	font-size: 12px;
	color: #65676b;
}
.csl-gc-league {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 6px;
	background: #080358;
	color: #F5C518;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}
.csl-gc-date {
	flex: 1;
}
.csl-gc-status {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 10px;
	border-radius: 6px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}
.csl-gc-status-final {
	background: #e8f5e9;
	color: #2e7d32;
}
.csl-gc-status-live {
	background: #fce4ec;
	color: #c62828;
}

/* ── Matchup row (badge + name + score for each team) ──────────── */
.csl-gc-matchup {
	padding: 16px;
}
.csl-gc-team-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
}
.csl-gc-badge {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: contain;
	background: #f5f5f5;
	padding: 3px;
	flex-shrink: 0;
}
.csl-gc-team-info {
	flex: 1;
	min-width: 0;
}
.csl-gc-team-name {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.csl-gc-team-record {
	font-size: 11px;
	color: #999;
}
.csl-gc-score {
	font-size: 28px;
	font-weight: 700;
	color: #333;
	min-width: 36px;
	text-align: right;
	line-height: 1;
}
.csl-gc-winner .csl-gc-team-name {
	color: #080358;
}
.csl-gc-winner .csl-gc-score {
	color: #080358;
}
.csl-gc-winner-mark {
	font-size: 10px;
	color: #F5C518;
	margin-left: 4px;
}

/* ── Linescore table ───────────────────────────────────────────── */
.csl-gc-linescore-wrap {
	border-top: 1px solid #e4e6ea;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.csl-gc-linescore {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}
.csl-gc-linescore th,
.csl-gc-linescore td {
	padding: 6px 0;
	text-align: center;
	min-width: 22px;
	color: #65676b;
}
.csl-gc-linescore th {
	font-weight: 600;
	font-size: 11px;
	color: #999;
	border-bottom: 1px solid #e4e6ea;
}
.csl-gc-linescore .csl-gc-ls-team {
	text-align: left;
	padding-left: 16px;
	font-weight: 600;
	color: #333;
	min-width: 36px;
	max-width: 60px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.csl-gc-linescore .csl-gc-ls-total {
	font-weight: 700;
	color: #1a1a1a;
	border-left: 1px solid #e4e6ea;
	padding: 6px 6px;
}
.csl-gc-linescore tbody tr:first-child td {
	border-bottom: 1px solid #f0f0f0;
}
.csl-gc-winner-row .csl-gc-ls-team,
.csl-gc-winner-row .csl-gc-ls-total:first-of-type {
	color: #080358;
}

/* ── Event thumbnail ───────────────────────────────────────────── */
.csl-gc-thumb {
	border-top: 1px solid #e4e6ea;
	padding: 0;
}
.csl-gc-thumb img {
	width: 100%;
	display: block;
}

/* ── Highlights bar ────────────────────────────────────────────── */
.csl-gc-highlight {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-top: 1px solid #e4e6ea;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s;
}
.csl-gc-highlight:hover {
	background: #f8f9fa;
	text-decoration: none;
	color: inherit;
}
.csl-gc-hl-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fce4ec;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.csl-gc-hl-icon svg {
	width: 14px;
	height: 14px;
	fill: #c62828;
}
.csl-gc-hl-text {
	flex: 1;
	font-size: 13px;
	color: #65676b;
}
.csl-gc-hl-text strong {
	color: #1a1a1a;
	display: block;
	font-size: 13px;
}
.csl-gc-hl-arrow {
	font-size: 16px;
	color: #999;
}

/* ── Meta row (venue, TV) ──────────────────────────────────────── */
.csl-gc-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 10px 16px;
	border-top: 1px solid #e4e6ea;
	font-size: 12px;
	color: #65676b;
}

/* ── Dark mode (BuddyBoss) ─────────────────────────────────────── */
.bb-dark-theme .csl-gc,
[data-theme="dark"] .csl-gc {
	background: #242526;
	border-color: #3a3b3c;
}
.bb-dark-theme .csl-gc-header,
[data-theme="dark"] .csl-gc-header {
	background: #2d2e2f;
	border-color: #3a3b3c;
}
.bb-dark-theme .csl-gc-date,
[data-theme="dark"] .csl-gc-date,
.bb-dark-theme .csl-gc-meta,
[data-theme="dark"] .csl-gc-meta {
	color: #b0b3b8;
}
.bb-dark-theme .csl-gc-team-name,
[data-theme="dark"] .csl-gc-team-name {
	color: #e4e6eb;
}
.bb-dark-theme .csl-gc-score,
[data-theme="dark"] .csl-gc-score {
	color: #e4e6eb;
}
.bb-dark-theme .csl-gc-winner .csl-gc-team-name,
[data-theme="dark"] .csl-gc-winner .csl-gc-team-name,
.bb-dark-theme .csl-gc-winner .csl-gc-score,
[data-theme="dark"] .csl-gc-winner .csl-gc-score {
	color: #F5C518;
}
.bb-dark-theme .csl-gc-badge,
[data-theme="dark"] .csl-gc-badge {
	background: #3a3b3c;
}
.bb-dark-theme .csl-gc-linescore th,
[data-theme="dark"] .csl-gc-linescore th,
.bb-dark-theme .csl-gc-linescore td,
[data-theme="dark"] .csl-gc-linescore td {
	color: #b0b3b8;
}
.bb-dark-theme .csl-gc-linescore .csl-gc-ls-team,
[data-theme="dark"] .csl-gc-linescore .csl-gc-ls-team {
	color: #e4e6eb;
}
.bb-dark-theme .csl-gc-linescore .csl-gc-ls-total,
[data-theme="dark"] .csl-gc-linescore .csl-gc-ls-total {
	color: #e4e6eb;
}
.bb-dark-theme .csl-gc-winner-row .csl-gc-ls-team,
[data-theme="dark"] .csl-gc-winner-row .csl-gc-ls-team,
.bb-dark-theme .csl-gc-winner-row .csl-gc-ls-total:first-of-type,
[data-theme="dark"] .csl-gc-winner-row .csl-gc-ls-total:first-of-type {
	color: #F5C518;
}
.bb-dark-theme .csl-gc-linescore-wrap,
[data-theme="dark"] .csl-gc-linescore-wrap,
.bb-dark-theme .csl-gc-linescore tbody tr:first-child td,
[data-theme="dark"] .csl-gc-linescore tbody tr:first-child td,
.bb-dark-theme .csl-gc-linescore th,
[data-theme="dark"] .csl-gc-linescore th,
.bb-dark-theme .csl-gc-linescore .csl-gc-ls-total,
[data-theme="dark"] .csl-gc-linescore .csl-gc-ls-total,
.bb-dark-theme .csl-gc-highlight,
[data-theme="dark"] .csl-gc-highlight,
.bb-dark-theme .csl-gc-meta,
[data-theme="dark"] .csl-gc-meta,
.bb-dark-theme .csl-gc-thumb,
[data-theme="dark"] .csl-gc-thumb {
	border-color: #3a3b3c;
}
.bb-dark-theme .csl-gc-highlight:hover,
[data-theme="dark"] .csl-gc-highlight:hover {
	background: #3a3b3c;
}
.bb-dark-theme .csl-gc-hl-text strong,
[data-theme="dark"] .csl-gc-hl-text strong {
	color: #e4e6eb;
}

/* ── Mobile adjustments ────────────────────────────────────────── */
@media (max-width: 480px) {
	.csl-gc-badge { width: 32px; height: 32px; }
	.csl-gc-score { font-size: 22px; }
	.csl-gc-team-name { font-size: 14px; }
	.csl-gc-linescore { font-size: 11px; }
	.csl-gc-linescore th,
	.csl-gc-linescore td { min-width: 18px; padding: 5px 0; }
}
