/*
 * Linkify Basketball League — public styles.
 *
 * Colours, padding and radius come from CSS custom properties so Elementor
 * style controls (which set these variables on .bl-widget) always win.
 * Do not declare a property here that an Elementor control sets directly
 * (typography, border, box-shadow on .bl-widget).
 */
:root {
	--bl-accent: #E35205;
	--bl-box-bg: #ffffff;
	--bl-text: #1f2937;
	--bl-muted: #6b7280;
	--bl-line: #e5e7eb;
	--bl-th-bg: #111827;
	--bl-th-color: #ffffff;
	--bl-row-odd: #ffffff;
	--bl-row-even: #f9fafb;
	--bl-row-highlight: #fff7ed;
	--bl-day-bg: #f3f4f6;
	--bl-day-color: #374151;
	--bl-match-bg: #ffffff;
	--bl-score-color: #111827;
	--bl-title-color: #ffffff;
	--bl-title-align: left;
	--bl-cell-pad: 8px 10px;
	--bl-match-pad: 12px;
	--bl-box-pad: 0;
	--bl-radius: 8px;
	--bl-crest: 24px;
	--bl-win: #16a34a;
	--bl-loss: #dc2626;
}

.bl-widget {
	background: var(--bl-box-bg);
	color: var(--bl-text);
	padding: var(--bl-box-pad);
	border-radius: var(--bl-radius);
	overflow: hidden;
	margin: 0 0 1.5em;
	box-sizing: border-box;
}
.bl-widget *,
.bl-widget *::before,
.bl-widget *::after { box-sizing: border-box; }
.bl-widget .bl-widget { margin: 0; border-radius: 0; }

.bl-widget__header {
	background: var(--bl-title-bg, var(--bl-accent));
	padding: 10px 14px;
	text-align: var(--bl-title-align);
}
.bl-widget__title { margin: 0; color: var(--bl-title-color); }
.bl-subheading { margin: 1.2em 0 .5em; }
.bl-empty, .bl-note { color: var(--bl-muted); margin: .75em 0; }
.bl-note { font-size: .85em; }

/* ---------- Tables ---------- */
.bl-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bl-table { width: 100%; border-collapse: collapse; margin: 0; }
.bl-table th,
.bl-table td {
	padding: var(--bl-cell-pad);
	text-align: center;
	border: 0;
	border-bottom: 1px solid var(--bl-line);
	vertical-align: middle;
	white-space: nowrap;
}
.bl-table thead th { background: var(--bl-th-bg); color: var(--bl-th-color); }
.bl-table tbody tr:nth-child(odd) td { background: var(--bl-row-odd); }
.bl-table tbody tr:nth-child(even) td { background: var(--bl-row-even); }
.bl-table tbody tr.bl-row--highlight td { background: var(--bl-row-highlight); }
.bl-table .bl-col-team { text-align: left; white-space: normal; min-width: 110px; overflow-wrap: break-word; hyphens: auto; }
.bl-table .bl-col-pos { width: 2.5em; color: var(--bl-muted); }
.bl-table .bl-col-pts { color: var(--bl-accent); }
.bl-table a { color: inherit; text-decoration: none; }
.bl-table a:hover { text-decoration: underline; }
.bl-fouled-out td { opacity: .7; }
.bl-adj { color: var(--bl-loss); margin-left: 2px; }

.bl-form { white-space: nowrap; }
.bl-form__item {
	display: inline-block;
	width: 1.5em;
	line-height: 1.5em;
	margin: 0 1px;
	border-radius: 3px;
	color: #fff;
	text-align: center;
	font-size: .75em;
}
.bl-form__item--w { background: var(--bl-win); }
.bl-form__item--l { background: var(--bl-loss); }

/* ---------- Team label & crests ---------- */
.bl-team { display: inline-flex; align-items: center; gap: .5em; }
.bl-crest,
.bl-team img.bl-crest {
	width: var(--bl-crest);
	height: var(--bl-crest);
	object-fit: contain;
	flex: 0 0 auto;
}
.bl-crest--placeholder {
	display: inline-block;
	border-radius: 50%;
	background: var(--bl-line);
}

/* ---------- Match list ---------- */
.bl-matches__day {
	background: var(--bl-day-bg);
	color: var(--bl-day-color);
	padding: 6px 12px;
	text-transform: capitalize;
}
.bl-match {
	background: var(--bl-match-bg);
	padding: var(--bl-match-pad);
	border-bottom: 1px solid var(--bl-line);
}
.bl-match__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .75em;
	color: var(--bl-muted);
	font-size: .8em;
	margin-bottom: 6px;
}
.bl-match__teams {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 10px;
}
.bl-match__team { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.bl-match__team--home { justify-self: end; text-align: right; }
.bl-match__team--home .bl-team { flex-direction: row-reverse; }
.bl-team__name { min-width: 0; }
.bl-match__team--away { justify-self: start; }
.bl-match__team.is-winner .bl-team__name { font-weight: 700; }
.bl-match__score { color: var(--bl-score-color); min-width: 5em; text-align: center; white-space: nowrap; }
.bl-score { font-weight: 700; }
.bl-score__sep { margin: 0 .3em; color: var(--bl-muted); }
.bl-vs { color: var(--bl-muted); text-transform: uppercase; }
.bl-match__quarters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .4em .9em;
	margin-top: 6px;
	color: var(--bl-muted);
	font-size: .8em;
}
.bl-q__label { opacity: .7; }
.bl-match__venue { text-align: center; color: var(--bl-muted); font-size: .8em; margin-top: 4px; }
.bl-match--live .bl-match__score { color: var(--bl-loss); }

.bl-badge {
	display: inline-block;
	padding: 0 .5em;
	border-radius: 3px;
	background: var(--bl-line);
	color: var(--bl-text);
}
.bl-badge--live { background: var(--bl-loss); color: #fff; }
.bl-badge--postponed { background: #fde68a; color: #78350f; }

/* ---------- Profiles ---------- */
.bl-profile { padding: 12px; }
.bl-profile__header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bl-profile__crest,
.bl-profile__photo { width: 96px; height: 96px; object-fit: contain; border-radius: var(--bl-radius); }
.bl-profile__name { margin: 0; }
.bl-profile__sub { color: var(--bl-muted); }
.bl-profile__stats { display: flex; flex-wrap: wrap; gap: 1em; margin-top: 8px; color: var(--bl-muted); font-size: .85em; }
.bl-profile__stats strong { color: var(--bl-accent); font-size: 1.3em; margin-right: .2em; }
.bl-profile__line span { color: var(--bl-muted); }
.bl-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.bl-list { margin: 0; padding-left: 1.2em; }

/* ---------- Match detail ---------- */
.bl-match-detail { padding: 12px; }
.bl-match-detail__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .9em; color: var(--bl-muted); font-size: .85em; }
.bl-match-detail__board {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	margin: 16px 0;
}
.bl-match-detail__team { min-width: 0; overflow-wrap: break-word; hyphens: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.bl-match-detail__crest { width: calc(var(--bl-crest) * 2.5); height: calc(var(--bl-crest) * 2.5); object-fit: contain; }
.bl-match-detail__crest.bl-crest--placeholder { display: inline-block; }
.bl-match-detail__name { font-weight: 600; }
.bl-match-detail__score { font-size: 2.2em; font-weight: 800; color: var(--bl-score-color); text-align: center; white-space: nowrap; }
.bl-match-detail__status { font-size: .35em; font-weight: 400; color: var(--bl-muted); text-transform: uppercase; letter-spacing: .05em; }
.bl-match-detail__info { margin-top: 12px; color: var(--bl-text); }
.bl-match-detail__info span { color: var(--bl-muted); }

@media (max-width: 600px) {
	.bl-hide-sm { display: none; }
	:root { --bl-cell-pad: 8px 5px; }
	.bl-table .bl-col-team { min-width: 0; }
	.bl-match__teams { gap: 6px; font-size: .92em; }
	.bl-match__score { min-width: 0; }
	.bl-team { gap: .35em; }
	.bl-match-detail__score { font-size: 1.6em; }
	.bl-match-detail__crest { width: calc(var(--bl-crest) * 1.8); height: calc(var(--bl-crest) * 1.8); }
}
