/**
 * LiveScore layout — last-loaded overrides for /livescore/.
 */

/* ── Content-width blocks ── */
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-standings,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-bonus,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-about,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-telegram {
	box-sizing: border-box;
	width: min(100% - 2rem, var(--wl-content-max, 1330px));
	max-width: var(--wl-content-max, 1330px);
	margin-inline: auto;
	padding-inline: 20px;
}

body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-standings > .container[data-wl-livescore-v8="1"] {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-bonus .wl-info-section,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-bonus .wl-review-module,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-about .wl-02d,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-telegram .wl-telegram-banner {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-bonus .wl-review-module__surface,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-bonus .wl-bonus-showcase {
	width: 100%;
	max-width: 100%;
}

body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-about .wl-02d > .container,
body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-telegram .wl-telegram-banner > .container {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding-inline: 0;
}

body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-bonus .wl-bonus-showcase__foot {
	margin-top: 0.85rem;
	margin-bottom: 0;
}

body.wl-sports-livescore-page .wp-block-affility-elements-wl-sports-livescore-about {
	margin-top: 0.75rem;
	padding-top: 0;
}

/* ── One full-width panel for today's matches ── */
body.wl-sports-livescore-page .wl-livescore-today,
body.wl-sports-livescore-page .wl-livescore-today :where(
	.wl-sports-toolbar,
	.wl-livescore-days,
	.wl-livescore-days__btn,
	.wl-livescore-groups,
	.wl-livescore-group,
	.wl-livescore-group__head,
	.wl-livescore-list,
	.wl-match-row,
	.wl-match-row__time,
	.wl-match-row__teams,
	.wl-match-row__team,
	.wl-match-row__center
) {
	box-sizing: border-box;
}

body.wl-sports-livescore-page .wl-livescore-today {
	width: 100%;
	margin: 0;
	padding: clamp(1rem, 2.5vw, 1.35rem) clamp(1rem, 2.5vw, 1.25rem) clamp(1.1rem, 2.5vw, 1.5rem);
	border: 1px solid var(--wl-border, rgba(85, 97, 95, 0.14));
	border-radius: var(--wl-radius-md, 20px);
	background: var(--wl-surface-elevated, #fff);
	box-shadow: var(--wl-shadow-sm, 0 2px 8px rgba(22, 30, 29, 0.05));
}

body.wl-sports-livescore-page .wl-livescore-today > .wl-sports-toolbar {
	margin-bottom: 1rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--wl-border, rgba(85, 97, 95, 0.14));
	overflow: visible;
}

body.wl-sports-livescore-page .wl-livescore-today > .wl-sports-toolbar::after {
	display: none !important;
	content: none !important;
	background: none !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-days {
	margin: 0;
}

@media (max-width: 639px) {
	body.wl-sports-livescore-page .wl-sports-toolbar--livescore {
		flex-wrap: nowrap;
		gap: 0.65rem;
	}

	body.wl-sports-livescore-page .wl-sports-toolbar--livescore .wl-sports-toolbar__meta {
		flex: 1 1 auto;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.1rem;
	}

	body.wl-sports-livescore-page .wl-sports-toolbar--livescore .wl-sports-toolbar__actions {
		flex: 0 1 auto;
		justify-content: flex-end;
	}

	body.wl-sports-livescore-page .wl-livescore-days__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	body.wl-sports-livescore-page .wl-livescore-days__btn {
		padding-inline: 0.55rem;
	}
}

/* ── League groups: fill container width ── */
body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-groups {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 0.85rem !important;
	align-items: start !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
}

@media (min-width: 768px) {
	body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-groups {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 1180px) {
	body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-groups {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-group {
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0.75rem 0.85rem 0.55rem !important;
	border: 1px solid var(--wl-border, rgba(85, 97, 95, 0.12)) !important;
	border-radius: 14px !important;
	background: var(--wl-canvas, #f4f5f7) !important;
	box-shadow: none !important;
	overflow: hidden !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-group__head {
	margin-bottom: 0.45rem !important;
	padding-bottom: 0.45rem !important;
	border-bottom: 1px solid rgba(85, 97, 95, 0.1);
}

body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-list {
	display: flex !important;
	flex-direction: column !important;
	gap: 0 !important;
	width: 100% !important;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
}

/* ── Match rows: single horizontal line ── */
body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-list > .wl-match-row,
body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-list .wl-match-row {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 0.55rem 0.65rem !important;
	width: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0.62rem 0.55rem !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	transform: none !important;
	border-bottom: 1px solid rgba(85, 97, 95, 0.1) !important;
	grid-template-columns: none !important;
	grid-template-rows: none !important;
	grid-template-areas: none !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-list > .wl-match-row:last-child,
body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-list .wl-match-row:last-child {
	border-bottom: 0 !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-list > .wl-match-row:hover,
body.wl-sports-livescore-page .wl-livescore-today .wl-livescore-list .wl-match-row:hover {
	box-shadow: none !important;
	background: rgba(5, 138, 125, 0.05) !important;
	transform: none !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__time {
	display: flex !important;
	flex: 0 0 3.75rem !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	justify-content: center !important;
	gap: 0.05rem !important;
	min-width: 3.75rem !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__teams {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 0.35rem 0.5rem !important;
	width: auto !important;
	min-width: 0 !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team,
body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team--away {
	display: flex !important;
	flex: 1 1 0 !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 0.4rem !important;
	min-width: 0 !important;
	text-align: left !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team--away {
	justify-content: flex-end !important;
	text-align: right !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team > .wl-team-logo-wrap {
	display: inline-flex !important;
	flex: 0 0 32px !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team > span:not(.wl-team-logo-wrap) {
	display: block !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
	-webkit-line-clamp: unset !important;
	-webkit-box-orient: unset !important;
	font-size: 0.8125rem !important;
	line-height: 1.25 !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team .wl-team-logo-wrap > img.wl-team-logo {
	width: 100% !important;
	height: 100% !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__center {
	display: flex !important;
	flex: 0 0 auto !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 0.15rem !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__vs {
	font-size: 0.6875rem !important;
	font-weight: 800 !important;
	color: var(--wl-ink-muted, #55615f) !important;
	text-transform: lowercase !important;
}

body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__chevron {
	display: inline-flex !important;
	flex: 0 0 auto !important;
	opacity: 0.35;
}

@media (max-width: 639px) {
	body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team > span:not(.wl-team-logo-wrap) {
		font-size: 0.75rem !important;
	}

	body.wl-sports-livescore-page .wl-livescore-today .wl-match-row__team > .wl-team-logo-wrap {
		width: 28px !important;
		height: 28px !important;
		flex: 0 0 28px !important;
	}
}
