@import 'top_header.css';
@import 'sponsor_rotator.css';

.debug body:before {
	display: none;
}

/*
.page-header {
	height: 125px;
	
	position: absolute;
	top: 0;
	left: var(--left-offset);
	right: var(--right-offset);
	
	display: grid;
	grid-auto-flow: row;
	align-items: center;
	justify-content: space-between;
	justify-items: center;
	align-content: center;
	
	font-size: 24px;
	
	display: none;
}
*/
.top-bar {
	display: grid;
	left: 75px;
	right: 75px;
	justify-content: space-evenly;
	grid-template-columns: repeat(5, 290px);
	gap: 80px;
}

.rivals-logo {
}

.page-name {
}

.bar-division {
	
}
.bar-matchup,
.bar-tournament-stage {
	display: none;
}
.game-title {
}
.sponsor-wrapper {
	order: 5;
	grid-column: 5;
}
#sponsors {
	position: relative;
	bottom: auto;
	right: auto;
	font-size: 20px;
}
#sponsors:before {
	content: '';
}

/* Swiss Diamond rounds & matches */
.swiss {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: row;
	gap: 80px;

	text-align: center;
	line-height: 1;
	font-size: 30px;
	font-family: var(--text-font);
	font-weight: 700;
	color: var(--text-color);
	text-transform: uppercase;

	position: absolute;
	top: 125px;
	bottom: 75px;
	left: 75px;
	right: 75px;
}

.swiss-round {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-direction: column;
	flex-shrink: 0;

	opacity: 1;

	transition: all 0.6s ease-in;
}
.swiss-round:last-child .arrows {
	display: none;
}
[data-record="2-0"] .arrow.up:before,
[data-record="2-1"] .arrow.up:before,
[data-record="0-2"] .arrow.down:before,
[data-record="1-2"] .arrow.down:before {
	content: '';
}

.records {
	border: 2px solid var(--border-color);
	background-color: rgba(var(--dark-color-rgb), 0.9);
	display: flex;
	flex-direction: column;
	width: 290px;
	position: relative;
}

.records-header {
	border-bottom: 2px solid var(--border-color);
	order: 1;
	background-color: var(--primary-color);
	color: var(--text-color);
	line-height: 50px;
	font-size: 35px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: center;
	justify-content: center;
	justify-items: center;
	font-variant: tabular-nums;
}
.record {
	font-variant: tabular-nums;
	grid-column: 2;
}
.record .colon,
.score-divider {
	line-height: 0;
	position: relative;
	top: -2px;
	font-size: 1.2em;
}
.bestof {
	font-size: 15px;
	grid-column: 3;
	border: 1px solid;
	padding: 0.2em 0.5em;
	line-height: 1;
}
.records-header .date {
	font-size: 18px;
	font-family: "Satoshi", sans-serif;
}

.arrows {
	display: flex;
	flex-direction: column;
	position: absolute;
	left: 100%;
	top: 0;
	bottom: 0;
	height: 100%;
	width: 80px;
	justify-content: space-between;
	padding: 15% 0 10%;

	opacity: 1;
	transition: all 0.6s ease-in;
}
.swiss-round[data-round="0"] .arrows {
	padding: 25% 0 20%;
}

.arrow {
	font-size: 70px;
	line-height: 1;
}
.arrow:before {
	content: '🠒'; /* U+1F812 */
}
.arrow.up {
	transform: rotate(-45deg);
	color: var(--primary-color);
	order: 0;
}
.arrow.down {
	transform: rotate(45deg);
	color: var(--white);
	order: 1;
}

.fixtures {
	padding: 12px 14px;
	display: flex;
	gap: 8px;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	order: 2;
	color: var(--light-color);
}

.fixture { /* Aim for 46px tall */
	/*display: flex;
	flex-direction: row;
	justify-content: space-evenly;*/
	display: grid;
	grid-template-columns: 1fr 0.9fr 1fr;
	grid-template-columns: 82px 74px 82px;
	grid-auto-flow: column;
	align-items: center;
	background-color: var(--secondary-color);
	width: 100%;
	padding: 5px 8px;
	line-height: 35px;

	opacity: 1;
	transition: all 0.4s ease-in;
}
.team {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	flex-direction: row;
}

.vs {
	color: var(--light-color);
	font-size: 24px;
	font-weight: 500;
}
.scores {
	font-weight: 500;
	display: grid;
	grid-template-columns: 1fr 8px 1fr;
	grid-auto-flow: column;
	gap: 2px;
	justify-content: center;
	align-items: center;
	font-size: 24px;
	font-variant: tabular-nums;
}
.vs:only-child {
	grid-column: 2;
}
.score {

}
.score.win {
	font-weight: 800;
}
/* .score.loss, */
.team.loser .team-logo {
	opacity: 0.75;
}
.score-divider {
	/* color: var(--white); */
	font-size: 0.8em;
}
.score:first-child {
	text-align: right;
}
.score:last-child {
	text-align: left;
}

.team-logo {
	width: 37px;
	height: 35px;
	background: no-repeat center / contain;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
	order: 1;
	position: relative;
}
.team-logos .team-logo[data-team="tbd"i]:after {
	content: '?';
}
.team-logo.disqualified:before {
	content: '⃠';
	font-size: 1.5em;
	color: red;
	position: absolute;
	z-index: 10;
}

.team-abbr {
	font-size: 16px;
	color: var(--white);
	flex-grow: 1;
}
/*
.team:first-child {
	justify-content: flex-start;
}
.team:last-child {
	justify-content: flex-end;
}
*/
.team:first-child .team-abbr {
	order: 2;
}
.team:last-child .team-abbr {
	order: 0;
}


.advancing,
.eliminated {
	display: flex;
	flex-direction: column;
}
.eliminated .progress-header {
	text-decoration: line-through;
}
.progress-header {
	border-bottom: 2px solid var(--border-color);
	background-color: var(--primary-color);
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 50px;
	font-size: 30px;
	order: 1;
}
.progress-header:before,
.progress-header:after {
	content: '';
	border-width: 3.5px;
	height: 1em;
	width: 0.25em;
	border-style: solid;
	vertical-align: top;
}
.advancing .progress-header:before,
.eliminated .progress-header:before {
	/* content: '['; */
	border-right-width: 0px;
	margin-right: 0.15em;
}
.advancing .progress-header:after,
.eliminated .progress-header:after {
	/* content: ']'; */
	border-left-width: 0px;
	margin-left: 0.15em;
}
.team-logos {
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	align-items: center;
	gap: 8px;
	margin: 10px 16px;
	padding: 6px 20px; background-color: var(--secondary-color);
	padding: 0px 20px; background-color: transparent;
	color: var(--white);
	order: 2;

	opacity: 1;
	transition: all 0.4s ease-in;
}
.team-logos:empty,
.team-logos:empty ~ .progress-header {
	display: none;
}
.team-logos .team-logo {
	width: 45px;
	height: 38px;
}
.eliminated .team-logos {
	color: rgba(var(--white-rgb), 0.5);
}
.eliminated .team-logo {
	opacity: 0.9;
}

.advancing {
	order: 0;
	border-bottom: 2px solid var(--border-color);
}
.eliminated {
	order: 5;
	border-top: 2px solid var(--border-color);
}
.advancing .team-logo,
.eliminated .team-logo {
}
.team-logos [data-team="tbd"] {
	order: 5;
}

/*
body:not(.visible) .swiss-round,
body:not(.visible) .fixture,
body:not(.visible) .arrows,
body:not(.visible) .team-logos {
	opacity: 0;
}*/
.swiss-round:nth-child(1) { transition-delay: 0ms; }
.swiss-round:nth-child(2) { transition-delay: 150ms; }
.swiss-round:nth-child(3), .swiss-round:nth-child(1) .arrows { transition-delay: 350ms; }
.swiss-round:nth-child(4), .swiss-round:nth-child(2) .arrows { transition-delay: 600ms; }
.swiss-round:nth-child(5), .swiss-round:nth-child(3) .arrows { transition-delay: 900ms; }
.swiss-round:nth-child(6), .swiss-round:nth-child(4) .arrows { transition-delay: 1250ms; }

.swiss-round:nth-child(3) .team-logos { transition-delay: 900ms; }
.swiss-round:nth-child(4) .team-logos { transition-delay: 1250ms; }
.swiss-round:nth-child(5) .team-logos { transition-delay: 1650ms; }

.fixture:nth-child(1) { transition-delay: calc(var(--delay) + 0.4s); }
.fixture:nth-child(2) { transition-delay: calc(var(--delay) + 0.5s); }
.fixture:nth-child(3) { transition-delay: calc(var(--delay) + 0.575s); }
.fixture:nth-child(4) { transition-delay: calc(var(--delay) + 0.65s); }
.fixture:nth-child(5) { transition-delay: calc(var(--delay) + 0.725s); }
.fixture:nth-child(6) { transition-delay: calc(var(--delay) + 0.8s); }
.fixture:nth-child(7) { transition-delay: calc(var(--delay) + 0.875s); }
.fixture:nth-child(8) { transition-delay: calc(var(--delay) + 0.95s); }