/* Сетки в широких материалах: геометрия раунда и соединительных линий. */
body.alf-is-full-width-menu .setka {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 auto 30px !important;
	padding: 0 !important;
	overflow: hidden !important;
}

body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) {
	max-width: 1180px !important;
}

body.alf-is-full-width-menu .setka .container-alf,
body.alf-is-full-width-menu .tournament-container,
body.alf-is-full-width-menu .tournament-headers,
body.alf-is-full-width-menu .tournament-brackets {
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

body.alf-is-full-width-menu .setka .container-alf {
	display: flex !important;
	margin: 0 auto !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	overflow: visible !important;
}

body.alf-is-full-width-menu .tournament-container {
	overflow: hidden !important;
}

body.alf-is-full-width-menu .tournament-headers {
	display: flex !important;
	justify-content: center !important;
	align-items: stretch !important;
	gap: 0 !important;
	border-bottom: 1px solid #d3d3d3 !important;
}

body.alf-is-full-width-menu .tournament-headers h3 {
	flex: 1 1 0 !important;
	width: auto !important;
	margin: 0 !important;
	padding: 18px 8px 24px !important;
	border-right: 1px dashed #d3d3d3 !important;
	color: #111 !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	text-align: center !important;
	text-transform: none !important;
	box-sizing: border-box !important;
}

body.alf-is-full-width-menu .tournament-brackets {
	--alf-match-height: 66px;
	--alf-match-gap: 20px;
	--alf-match-step: calc(var(--alf-match-height) + var(--alf-match-gap));
	--alf-double-step: calc(2 * var(--alf-match-step));
	--alf-line-size: 12px;
	--alf-bracket-height: 380px;
	position: relative;
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	grid-auto-flow: column !important;
	grid-auto-columns: minmax(260px, 1fr) !important;
	align-items: stretch !important;
	justify-content: center !important;
	gap: 0 !important;
	min-height: var(--alf-bracket-height) !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	list-style: none !important;
}

body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .tournament-brackets {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.alf-is-full-width-menu .bracket {
	--alf-round-rows: 4;
	--alf-round-gap: var(--alf-match-gap);
	--alf-round-pad: 28px;
	--alf-connector-span: var(--alf-match-step);
	position: relative;
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	grid-template-rows: repeat(var(--alf-round-rows), var(--alf-match-height)) !important;
	row-gap: var(--alf-round-gap) !important;
	align-content: start !important;
	align-items: stretch !important;
	justify-content: stretch !important;
	justify-items: stretch !important;
	align-self: stretch !important;
	justify-self: stretch !important;
	width: auto !important;
	min-width: 0 !important;
	min-height: var(--alf-bracket-height) !important;
	height: var(--alf-bracket-height) !important;
	margin: 0 !important;
	padding: var(--alf-round-pad) 10px 0 !important;
	border-right: 1px dashed #d3d3d3 !important;
	list-style: none !important;
	box-sizing: border-box !important;
}

body.alf-is-full-width-menu .tournament-brackets:not(:has(.bracket:nth-child(4))) .bracket:nth-child(2),
body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .bracket:nth-child(3) {
	--alf-round-rows: 2;
	--alf-round-gap: 106px;
	--alf-round-pad: 71px;
	padding-top: var(--alf-round-pad) !important;
	--alf-connector-span: var(--alf-double-step);
}

body.alf-is-full-width-menu .tournament-brackets:not(:has(.bracket:nth-child(4))) .bracket:nth-child(3),
body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .bracket:nth-child(4) {
	--alf-round-rows: 1;
	--alf-round-gap: 0px;
	--alf-round-pad: 3px;
	padding-top: var(--alf-round-pad) !important;
}

body.alf-is-full-width-menu .team-item {
	position: relative !important;
	display: flex !important;
	grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr) !important;
	justify-content: center !important;
	align-items: center !important;
	align-content: center !important;
	justify-self: stretch !important;
	align-self: stretch !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: var(--alf-match-height) !important;
	min-height: var(--alf-match-height) !important;
	margin: 0 !important;
	padding: 0 10px !important;
	background: #e8e8e8 !important;
	color: #111 !important;
	font-size: 12px !important;
	line-height: 1.1 !important;
	text-align: center !important;
	box-sizing: border-box !important;
}

body.alf-is-full-width-menu .bracket:last-child {
	align-content: center !important;
}

body.alf-is-full-width-menu .tournament-headers h3,
body.alf-is-full-width-menu .team-item,
body.alf-is-full-width-menu .team-item span,
body.alf-is-full-width-menu .team-item time {
	font-family: Play, "Open Sans", Arial, sans-serif !important;
}

body.alf-is-full-width-menu .team-item .home,
body.alf-is-full-width-menu .team-item .away {
	display: block !important;
	width: calc((100% - 70px) / 2) !important;
	min-width: 0 !important;
	padding: 0 6px !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
	overflow-wrap: normal !important;
	box-sizing: border-box !important;
}

body.alf-is-full-width-menu .team-item time {
	display: inline-block !important;
	width: 58px !important;
	min-width: 58px !important;
	margin: 0 6px !important;
	padding: 6px 4px !important;
	background: #dcdcdc !important;
	color: #111 !important;
	font-size: 11px !important;
	line-height: 1 !important;
	text-align: center !important;
	white-space: nowrap !important;
	box-sizing: border-box !important;
}

body.alf-is-full-width-menu .team-item .winner {
	display: block !important;
	padding: 8px 6px !important;
	border: 1px solid #9bbcdf !important;
	border-radius: 3px !important;
	background: rgba(255, 255, 255, .42) !important;
	color: #0b3561 !important;
	font-weight: 700 !important;
	box-sizing: border-box !important;
}

body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .team-item {
	font-size: 10px !important;
}

body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .team-item .home,
body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .team-item .away {
	width: calc((100% - 60px) / 2) !important;
	padding: 0 4px !important;
}

body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .team-item time {
	width: 48px !important;
	min-width: 48px !important;
}

body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .team-item .winner {
	padding: 7px 2px !important;
}

body.alf-is-full-width-menu .team-item:before,
body.alf-is-full-width-menu .team-item:after {
	content: "" !important;
	position: absolute !important;
	z-index: 1;
	display: block !important;
	top: 50% !important;
	width: var(--alf-line-size) !important;
	height: 0 !important;
	border: 0 !important;
	border-top: 2px solid #cfd3d7 !important;
	box-sizing: border-box !important;
	pointer-events: none !important;
}

body.alf-is-full-width-menu .team-item:before {
	left: calc(-1 * var(--alf-line-size)) !important;
	border-color: #cfd3d7 !important;
}

body.alf-is-full-width-menu .team-item:after {
	right: calc(-1 * var(--alf-line-size)) !important;
}

body.alf-is-full-width-menu .team-item:nth-of-type(odd):after {
	height: var(--alf-connector-span) !important;
	border-right: 2px solid #cfd3d7 !important;
}

body.alf-is-full-width-menu .team-item:nth-of-type(even):after {
	top: calc(50% - var(--alf-connector-span)) !important;
	height: var(--alf-connector-span) !important;
	border-top: 0 !important;
	border-right: 2px solid #cfd3d7 !important;
	border-bottom: 2px solid #cfd3d7 !important;
}

/* Предварительный раунд старых сеток с четырьмя стадиями. */
body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .bracket:first-child .team-item:after {
	top: 50% !important;
	height: 0 !important;
	border: 0 !important;
	border-top: 2px solid #cfd3d7 !important;
}

/* Полная сетка на 16 команд. */
body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .tournament-brackets {
	--alf-bracket-height: 720px;
}

body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .bracket:first-child {
	--alf-round-rows: 8;
}

body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .bracket:nth-child(2) {
	--alf-round-rows: 4;
	--alf-round-gap: 106px;
	--alf-round-pad: 71px;
	padding-top: var(--alf-round-pad) !important;
	--alf-connector-span: var(--alf-double-step);
}

body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .bracket:nth-child(3) {
	--alf-round-gap: 278px;
	--alf-round-pad: 157px;
	padding-top: var(--alf-round-pad) !important;
	--alf-connector-span: calc(4 * var(--alf-match-step));
}

body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .bracket:first-child .team-item:nth-child(odd):after {
	height: var(--alf-match-step) !important;
	border-right: 2px solid #cfd3d7 !important;
}

body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .bracket:first-child .team-item:nth-child(even):after {
	top: calc(50% - var(--alf-match-step)) !important;
	height: var(--alf-match-step) !important;
	border-top: 0 !important;
	border-right: 2px solid #cfd3d7 !important;
	border-bottom: 2px solid #cfd3d7 !important;
}

body.alf-is-full-width-menu .bracket:first-of-type .team-item:before,
body.alf-is-full-width-menu .bracket:last-of-type .team-item:after,
body.alf-is-full-width-menu .bracket-4 .team-item:after {
	display: none !important;
}

body.alf-is-full-width-menu .setka ~ p {
	display: none;
}

/* Дополнительная стадия в архивной разметке с пятью колонками. */
body.alf-is-full-width-menu .bracket-3:nth-child(n+4):not(:last-child) .team-item:after {
	height: 350% !important;
	border-right: 0 solid currentColor !important;
}

body.alf-is-full-width-menu .bracket-3:nth-child(n+4):not(:last-child) .team-item:nth-of-type(even):after {
	top: -300% !important;
	border-top: 2px solid #cfd3d7 !important;
	border-bottom: 0 solid currentColor !important;
}

@media (max-width: 767px) {
	body.alf-is-full-width-menu .setka {
		padding-bottom: 10px !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch;
	}

	body.alf-is-full-width-menu .setka .container-alf,
	body.alf-is-full-width-menu .tournament-container,
	body.alf-is-full-width-menu .tournament-headers,
	body.alf-is-full-width-menu .tournament-brackets {
		width: 760px !important;
		min-width: 760px !important;
		max-width: none !important;
	}

	body.alf-is-full-width-menu .tournament-container {
		overflow: visible !important;
	}

	body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .container-alf,
	body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .tournament-container,
	body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .tournament-headers,
	body.alf-is-full-width-menu .setka:has(.bracket:nth-child(4)) .tournament-brackets {
		width: 900px !important;
		min-width: 900px !important;
	}

	body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .container-alf,
	body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .tournament-container,
	body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .tournament-headers,
	body.alf-is-full-width-menu .setka:has(.bracket:first-child .team-item:nth-child(8)) .tournament-brackets {
		width: 1180px !important;
		min-width: 1180px !important;
	}
}
