/* Basketball rows and controls; shared hub visuals require the explicit body opt-in. */
.livescore.basketball-calendar {
	container: basketball-calendar / inline-size;
	box-sizing: border-box;
	padding: 20px;
	border-radius: 20px;
	background: #eef2f7;
	color: #203342;
	font-family: inherit;
}
.basketball-calendar *, .basketball-calendar *::before, .basketball-calendar *::after { box-sizing: border-box; }
.basketball-calendar [hidden] { display: none !important; }
.basketball-calendar [data-basketball-group][id] { scroll-margin-top: 100px; }
.basketball-calendar [data-basketball-group][id]:focus-visible { outline: 2px solid #2456a6; outline-offset: 3px; }
/* The tournament navigation lives beside the board, inside the basketball sidebar. */
.sidebar-odds.sitis-basketball-sidebar .basketball-navigation { display: block; min-width: 0; padding: 4px; }
.sidebar-odds.sitis-basketball-sidebar .basketball-navigation[hidden] { display: none !important; }
.sidebar-odds.sitis-basketball-sidebar .basketball-navigation .odds-league-item {
	display: block; padding: 12px; border-radius: 3px; color: #fff; font-size: 14px; line-height: 1.4;
	text-decoration: none; overflow-wrap: anywhere;
}
.sidebar-odds.sitis-basketball-sidebar .basketball-navigation .odds-league-item::before { content: none; }
.sidebar-odds.sitis-basketball-sidebar .basketball-navigation .odds-league-item:hover,
.sidebar-odds.sitis-basketball-sidebar .basketball-navigation .odds-league-item[aria-current="location"] { background: #3b4b58; color: #ffd200; }
.sidebar-odds.sitis-basketball-sidebar .basketball-navigation .odds-league-item:focus-visible { outline: 2px solid #ffd200; outline-offset: -2px; }
@media (max-width: 1023px) {
	.sidebar-odds.sitis-basketball-sidebar .sidebar { display: block; position: static; height: auto; visibility: visible; min-width: 0; }
	.sidebar-odds.sitis-basketball-sidebar .basketball-navigation {
		display: flex; gap: 8px; height: 56px; width: 100%; max-width: 100%; padding: 0 14px 12px;
		box-sizing: border-box; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
	}
	.sidebar-odds.sitis-basketball-sidebar .basketball-navigation .odds-league-item {
		flex: 0 0 auto; height: 44px; padding: 12px; box-sizing: border-box; background: #192631;
		line-height: 20px; white-space: nowrap; overflow-wrap: normal;
	}
	/* Add the horizontal strip to the theme's 52px mobile category reserve. */
	.sidebar-odds.sitis-basketball-sidebar.mob-fixed:has(.basketball-navigation:not([hidden])) + .odds-container { padding-top: 108px; }
	.basketball-calendar [data-basketball-group][id] { scroll-margin-top: 180px; }
}
.basketball-calendar button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
.basketball-calendar button:focus-visible { outline: 2px solid #2456a6; outline-offset: 3px; }
.basketball-calendar button:disabled { cursor: default; opacity: .4; }
.basketball-calendar .livescore-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.basketball-calendar .livescore-datepill { position: relative; display: flex; align-items: center; gap: 8px; }
.basketball-calendar [data-basketball-prev], .basketball-calendar [data-basketball-next],
.basketball-calendar [data-basketball-month-prev], .basketball-calendar [data-basketball-month-next] {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 34px; height: 34px; padding: 0; border: 1px solid #e2e8ef; border-radius: 50%;
	background: #fff; color: #56616b; font-size: 18px; line-height: 1;
}
.basketball-calendar [data-basketball-calendar-toggle] {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 36px; padding: 8px 12px; border: 1px solid #e2e8ef; border-radius: 999px;
	background: #fff; color: #0e2a47; font-size: 13px; font-weight: 700; line-height: 1.4;
}
.basketball-calendar [data-basketball-date-label] { white-space: nowrap; }
/* These states must win even when the football theme stylesheet loads last. */
.livescore.basketball-calendar [data-basketball-calendar-panel] {
	display: block; position: absolute; left: 0; right: auto; top: calc(100% + 8px); z-index: 30;
	width: 288px; max-width: calc(100vw - 40px); padding: 14px;
	border: 1px solid #e2e8ef; border-radius: 12px; background: #fff;
	box-shadow: 0 8px 28px rgb(20 40 70 / 16%);
}
.basketball-calendar .livescore-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 10px; font-size: 14px; font-weight: 800; }
.basketball-calendar [data-basketball-month-title] { text-align: center; }
.livescore.basketball-calendar [data-basketball-calendar-grid] { display: block; }
.basketball-calendar .basketball-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.basketball-calendar [role="columnheader"] { padding: 4px 0; color: #687786; text-align: center; font-size: 11px; font-weight: 700; }
.basketball-calendar [data-basketball-day] {
	display: block; width: 100%; min-height: 32px; padding: 7px 0; border: 0; border-radius: 8px;
	background: transparent; color: #0e2a47; font-size: 13px; line-height: 1.4; text-align: center;
}
.basketball-calendar [data-basketball-day]:hover:not(:disabled) { background: #eaf0f8; }
.basketball-calendar [data-basketball-day].other-month { color: #65768a; }
.basketball-calendar [data-basketball-day][aria-current="date"] { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.basketball-calendar [data-basketball-day].is-selected { background: #2456a6; color: #fff; font-weight: 800; }
.basketball-calendar [data-basketball-filters] { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.basketball-calendar [data-basketball-filter] {
	display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 13px;
	border: 1px solid #e2e8ef; border-radius: 999px; background: #fff; color: #56616b;
	font-size: 13px; font-weight: 600; line-height: 1.4;
}
.basketball-calendar [data-basketball-filter]:hover { border-color: #2456a6; }
.basketball-calendar [data-basketball-filter][aria-pressed="true"] { border-color: #203342; background: #203342; color: #fff; }
.basketball-calendar [data-basketball-count] { font-size: 11px; font-weight: 700; opacity: .8; }
.basketball-calendar .chip-dot { color: #d92d20; }
.basketball-calendar [aria-pressed="true"] .chip-dot { color: inherit; }
.basketball-calendar [data-basketball-message] { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #fff; color: #56616b; font-size: 13px; line-height: 1.5; }
.basketball-calendar [data-basketball-retry] { padding: 3px 6px; border: 0; background: transparent; color: #2456a6; font-size: inherit; font-weight: 700; text-decoration: underline; }
.basketball-calendar .livescore-empty { padding: 32px 16px; border: 1px solid #e9edf1; border-radius: 12px; background: #fff; color: #56616b; font-size: 14px; text-align: center; }
.basketball-calendar .livescore-empty strong { display: block; margin-bottom: 5px; color: #203342; }
.basketball-calendar .livescore-competition { overflow: hidden; margin-bottom: 16px; border: 1px solid #e3e8ef; border-radius: 12px; background: #fff; box-shadow: 0 4px 13px rgb(71 81 93 / 16%); }
.basketball-calendar .livescore-competition-head { display: flex; padding: 12px 24px; border-bottom: 0; background: #203342; }
.basketball-calendar .livescore-competition-head > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; width: 100%; min-width: 0; }
.basketball-calendar .livescore-competition-name { color: #fff; font-size: 18px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.basketball-calendar .livescore-competition-info { display: block; color: #b9c4d0; font-size: 14px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.livescore.basketball-calendar [data-basketball-subgroup] > .basketball-subgroup-info {
	margin: 0; padding: 8px 24px; border-bottom: 1px solid #e3e8ef; background: #f2f5f8;
	color: #5b6775; font-size: 12px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere;
}
.basketball-calendar [data-basketball-subgroup] + [data-basketball-subgroup] { border-top: 1px solid #e3e8ef; }
.basketball-calendar .livescore-match { border-bottom: 1px solid #e9edf1; }
.basketball-calendar .livescore-match:last-child { border-bottom: 0; }
.livescore.basketball-calendar .livescore-match-row.row-basket {
	display: grid; grid-template-columns: 104px minmax(0, 1fr) auto auto auto; grid-template-rows: auto auto;
	column-gap: 16px; row-gap: 8px; align-items: center; padding: 14px 24px;
	color: inherit; cursor: default; text-decoration: none;
}
.basketball-calendar .row-basket:hover { transform: none; }
.basketball-calendar .row-basket .livescore-match-time {
	grid-column: 1; grid-row: 1 / 3; min-width: 0; color: #5b6775; font-size: 13px; font-weight: 800; line-height: 1.4; text-align: left;
}
.basketball-calendar .row-basket .live-minutes { color: #d92d20; font-weight: 800; }
.basketball-calendar .row-basket .live-minutes-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #d92d20; }
.basketball-calendar .livescore-match-status-note { display: none; }
.basketball-calendar .status-suspended .livescore-match-time { color: #9b3d2e; }
.basketball-calendar .status-suspended .live-minutes-dot { display: none; animation: none; }
.basketball-calendar .row-basket .livescore-match-players,
.basketball-calendar .row-basket .livescore-match-totals {
	grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-rows: repeat(2, minmax(28px, 1fr));
	gap: 8px; align-self: stretch; min-width: 0;
}
.basketball-calendar .row-basket .livescore-match-side.side-home,
.basketball-calendar .row-basket .livescore-match-side.side-away {
	display: flex; align-items: center; justify-content: flex-start; gap: 8px; height: auto; min-height: 28px; min-width: 0;
}
.basketball-calendar .row-basket ._flag2._bg.s { width: 20px; height: 14px; border-radius: 2px; flex: 0 0 auto; }
.livescore.basketball-calendar .row-basket .livescore-team-name {
	min-width: 0; overflow: visible; color: #203342; font-size: 16px; font-weight: 700; line-height: 1.3;
	text-align: left; text-overflow: clip; white-space: normal; overflow-wrap: normal; word-break: normal;
}
.basketball-calendar .row-basket .basketball-team-name-short { display: none; }
.livescore.basketball-calendar .row-basket .side-winner .livescore-team-name { color: #203342; font-weight: 700; }
.livescore.basketball-calendar .row-basket .side-loser .livescore-team-name { color: #5b6775; font-weight: 400; }
.basketball-calendar .row-basket .livescore-winner-mark { margin-left: 2px; color: #203342; font-weight: 700; }
.basketball-calendar .row-basket .livescore-match-totals { grid-column: 3; }
.basketball-calendar .row-basket .livescore-total-score {
	display: flex; align-self: center; align-items: center; justify-content: center; width: 38px; min-height: 28px;
	color: #203342; font-size: 18px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
}
.basketball-calendar .row-basket .total-loser { color: #5b6775; font-weight: 700; }
.basketball-calendar .row-basket .total-scheduled { color: #c2ccd6; font-weight: 700; }
.basketball-calendar .row-basket .livescore-match-sets {
	grid-column: 4; grid-row: 1 / 3; display: flex; gap: 4px; align-self: stretch; min-width: 0;
	max-width: 284px; overflow-x: auto; overflow-y: hidden;
}
.basketball-calendar .row-basket .livescore-set-column {
	display: grid; grid-template-rows: repeat(2, minmax(28px, 1fr)); gap: 8px; width: 32px; flex: 0 0 32px;
}
.basketball-calendar .row-basket .livescore-set-score {
	position: relative; z-index: 0; display: flex; align-self: center; align-items: center; justify-content: center;
	width: 32px; height: 28px; border-radius: 0; background: transparent; color: #5b6775;
	font-size: 16px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
}
.basketball-calendar .row-basket .set-overtime .livescore-set-score::before {
	content: ""; position: absolute; z-index: -1; inset: 1px 3px; border-radius: 6px; background: #fdf3e6;
}
.basketball-calendar .row-basket .set-current .livescore-set-score { color: #203342; font-weight: 900; }
.basketball-calendar .row-basket .set-current .livescore-set-score::before {
	content: ""; position: absolute; z-index: -1; inset: 1px 3px; border-radius: 6px; background: #eaf0f8;
}
.basketball-calendar .row-basket [data-basketball-detail-toggle] {
	grid-column: 5; grid-row: 1 / 3; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	width: auto; height: 40px; margin: 0; padding: 0 16px; border: 1px solid #c9ced6; border-radius: 999px;
	background: #fff; color: #203342; font-size: 14px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.basketball-calendar .row-basket [data-basketball-detail-toggle]:hover { border-color: #203342; }
.basketball-calendar .row-basket > .livescore-match-arrow[aria-hidden="true"] { grid-column: 5; grid-row: 1 / 3; width: 104px; visibility: hidden; }
.basketball-calendar .row-basket [aria-expanded="true"] { color: #3b8ede; }
.basketball-calendar .livescore-match-arrow-icon { font-size: 12px; line-height: 1; transition: transform .15s; }
.basketball-calendar [aria-expanded="true"] .livescore-match-arrow-icon { transform: rotate(180deg); }
.basketball-calendar .is-expanded .row-basket { background: #f7f9fc; }
.livescore.basketball-calendar [data-basketball-detail] { display: block; padding: 15px 45px; border-top: 2px solid #fff; background: #f7f9fc; }
.basketball-calendar .basketball-match-facts { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px 48px; margin: 0; }
.basketball-calendar .basketball-match-facts > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; min-width: 0; max-width: 100%; line-height: 1.4; }
.basketball-calendar .basketball-match-facts dt { margin: 0; color: #5b6775; font-size: 13px; font-weight: 400; white-space: normal; }
.basketball-calendar .basketball-match-facts dd { margin: 0; color: #203342; font-size: 15px; font-weight: 700; white-space: normal; }
@supports (grid-template-rows: subgrid) {
	.basketball-calendar .row-basket .livescore-match-players,
	.basketball-calendar .row-basket .livescore-match-totals { grid-template-rows: subgrid; row-gap: inherit; }
	.basketball-calendar .row-basket .livescore-match-sets { display: grid; grid-template-rows: subgrid; grid-auto-flow: column; grid-auto-columns: 32px; gap: inherit; column-gap: 4px; }
	.basketball-calendar .row-basket .livescore-set-column { grid-row: 1 / 3; grid-template-rows: subgrid; gap: inherit; width: auto; }
}
@media (max-width: 599px) {
	.livescore.basketball-calendar { padding: 20px 8px 10px; }
}
/* Use board width, including the narrow board beside a desktop sidebar. */
@container basketball-calendar (max-width: 599px) {
	.basketball-calendar .livescore-competition-head { padding: 12px 16px; }
	.basketball-calendar .livescore-competition-head > div { flex-direction: column; gap: 2px; }
	.livescore.basketball-calendar .livescore-match-row.row-basket {
		grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto auto;
		column-gap: 10px; row-gap: 6px; padding: 12px 16px;
	}
	.basketball-calendar .row-basket .livescore-match-time { grid-column: 1 / 3; grid-row: 1; justify-self: start; margin-bottom: 4px; }
	.basketball-calendar .row-basket .livescore-match-status-note { display: inline; margin-left: 4px; color: #5b6775; font-size: 13px; font-weight: 500; }
	.basketball-calendar .row-basket [data-basketball-detail-toggle] {
		grid-column: 3; grid-row: 1; justify-self: end; height: auto; margin-bottom: 4px; padding: 0;
		border: 0; background: transparent; color: #3b8ede;
	}
	.basketball-calendar .row-basket .livescore-match-players { grid-column: 1; grid-row: 2 / 4; gap: 6px; }
	.basketball-calendar .row-basket .livescore-match-side.side-home,
	.basketball-calendar .row-basket .livescore-match-side.side-away { min-height: 30px; gap: 6px; }
	.livescore.basketball-calendar [data-basketball-subgroup] > .basketball-subgroup-info { padding: 8px 16px; }
	.livescore.basketball-calendar .row-basket .livescore-team-name { max-width: 100%; white-space: nowrap; }
	/* Keep the complete team name in the accessibility tree when showing its alias. */
	.basketball-calendar .row-basket .basketball-team-name-full:has(+ .basketball-team-name-short) {
		position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
		overflow: hidden; clip-path: inset(50%); white-space: nowrap;
	}
	.basketball-calendar .row-basket .basketball-team-name-short,
	.basketball-calendar .row-basket .basketball-team-name-full:not(:has(+ .basketball-team-name-short)) {
		/* Cap visual width, then fit the score column; preserve the complete source text. */
		display: block; inline-size: 100%; max-inline-size: 18ch; min-width: 0;
		overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	}
	.basketball-calendar .row-basket > .livescore-match-arrow[aria-hidden="true"] { display: none; }
	.basketball-calendar .row-basket .livescore-winner-mark { color: #29be80; }
	.basketball-calendar .row-basket .livescore-match-totals { grid-column: 2; grid-row: 2 / 4; gap: 6px; }
	.basketball-calendar .row-basket .livescore-total-score { width: 34px; min-height: 30px; }
	.basketball-calendar .row-basket .livescore-match-sets { grid-column: 3; grid-row: 2 / 4; grid-auto-columns: 26px; max-width: 176px; }
	.basketball-calendar .row-basket .livescore-set-column { width: 26px; flex-basis: 26px; gap: 6px; }
	.basketball-calendar .row-basket .livescore-set-score { width: 26px; height: 30px; font-size: 15px; }
	.basketball-calendar .row-basket .set-current .livescore-set-score::before,
	.basketball-calendar .row-basket .set-overtime .livescore-set-score::before { inset: 0; }
	.livescore.basketball-calendar [data-basketball-detail] { padding: 16px 30px; }
	.basketball-calendar .basketball-match-facts { flex-direction: column; gap: 12px; }
}
@container basketball-calendar (max-width: 399px) {
	/* Keep readable name space beside four quarters and overtime. */
	.livescore.basketball-calendar .livescore-match-row.row-basket { column-gap: 6px; padding: 12px 10px; }
	.livescore.basketball-calendar [data-basketball-subgroup] > .basketball-subgroup-info { padding-inline: 10px; }
	.basketball-calendar .row-basket .livescore-match-time { font-size: 12px; }
	.basketball-calendar .row-basket .livescore-match-status-note { font-size: 12px; }
	.basketball-calendar .row-basket .livescore-match-side.side-home,
	.basketball-calendar .row-basket .livescore-match-side.side-away { gap: 4px; }
	.basketball-calendar .row-basket ._flag2._bg.s { width: 16px; height: 12px; }
	.livescore.basketball-calendar .row-basket .livescore-team-name { font-size: 15px; }
	.basketball-calendar .row-basket .livescore-total-score { width: 30px; font-size: 17px; }
	.basketball-calendar .row-basket .livescore-match-sets { grid-auto-columns: 22px; column-gap: 2px; max-width: 142px; }
	.basketball-calendar .row-basket .livescore-set-column { width: 22px; flex-basis: 22px; }
	.basketball-calendar .row-basket .livescore-set-score { width: 22px; font-size: 13px; }
}
