@import "sponsor_rotator.css";
@import "top_header.css";

:root {
	--standings-x-padding: 60px;
}

.top-bar {
    display: grid;
    left: 75px;
    right: 75px;
    justify-content: space-evenly;
    grid-template-columns: repeat(5, 290px);
    gap: 80px;
}
.bar-matchup, .bar-tournament-stage {
	display: none;
}
.debug body:before {
	display: none;
}


.div-info {
	position: absolute;
	top: calc(var(--top-offset) + 75px);
	right: var(--right-offset);

	font-weight: 500;
	text-align: right;
	font-size: 50px;
	line-height: 1;
	white-space: nowrap;
	width: 150px;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	color: var(--yellow);
	text-transform: uppercase;

	writing-mode: vertical-rl;
	transform: rotate(180deg);
	/* transform-origin: top; */

	/* display: none; */
}

.div-header,
.division, .group {
}
.div-header:empty,
.division:empty, .group:empty {
	display: none;
}

.standings-header {
	padding-right: 15px;
}


/* Standings box containing each .standing */
#standings {
	position: absolute;
	top: calc(var(--top-bar-offset) + var(--top-bar-height) + 50px);
	left: calc(var(--left-offset) + 50px);
	right: calc(var(--right-offset) + 50px);
	bottom: 75px; /* 75px */
	/* transform: translate(calc(-50% - 75px), calc(-50%)); */

	line-height: 60px;

	font-family: "Space Mono", sans-serif;
	font-weight: 400;
	font-size: 30px;

	color: var(--light-text-color);
	align-content: center;
	justify-items: center;
	justify-content: center;
}

.group {
	position: relative;
	order: 2;
	display: grid;
	grid-template-columns: 100px auto;
	grid-template-rows: 70px auto;
	flex-direction: column;
	justify-content: flex-start;
	align-content: flex-start;
	
	gap: 20px;
}
.group:only-child {
    /* transform: scale(1.25); */
}
.group-all {
	display: grid;
	/* grid-template-rows: 1fr 1fr; */
	/* grid-template-columns: 1fr 1fr; */
	gap: 50px 50px;
	/* grid-template-rows: 1fr; */
	/* grid-template-columns: 1fr 1fr 1fr 1fr; */
	grid-auto-flow: column;
	
	--standings-x-padding: 50px;
}
.group-all[data-groups="4"] .group {
	grid-template-columns: auto;
	grid-template-rows: 70px auto;
}
.group-all[data-groups="4"] .standings,
.group-all[data-groups="4"] .stat-header {
	grid-column: 1;
}

/*html:not(.debug) body:not(.visible) .standing {
	opacity: 0;
	transform: translateX(-600px);
}*/

.group-name {
	order: 1;

	background-color: var(--primary-color);
	color: var(--text-color);

	text-align: right;
	font-size: 50px;
	line-height: 60px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 30px 20px;

	flex-grow: 1;

	grid-column: 1;
	grid-row: 1 / 2 span;

	writing-mode: vertical-rl;
	transform: rotate(180deg);
}
[data-total-groups="1"] .group-name {
	display: none;
}
[data-total-groups="1"] .group {
	grid-template-columns: 0 auto;
	gap: 20px 0;
}
.group-all[data-groups="4"] .group-name {
	grid-row: 1;

	text-align: center;
	writing-mode: initial;
	transform: rotate(0deg);
	line-height: 60px;
	font-size: 40px;
	padding: 5px 0;
	z-index: 1;
	width: 70px;
	/* margin-left: calc(80px + 60px + 6px); */
}
.group-all[data-groups="4"] .stat-header .position:before {
	content: '#';
}
.group-name:not(:empty):before {
	content: 'Group ';
}
.group-all[data-groups="4"] .group-name:before {
	content: '';
}
.group-all[data-groups="4"] .header-corners {
	left: 67px;
}
.standings {
	position: relative;
	order: 3;
	overflow: hidden;

	padding: 30px var(--standings-x-padding) 12px; /* last .standing has padding-bottom */

	grid-column: 2;
	grid-row: 2;
	
	display: flex;
	flex-direction: column;
	gap: 8px;

	background: rgba(var(--dark-color-rgb), 0.9);
}
.standing {
	position: relative;

	display: flex;
	justify-content: space-between;
	align-items: center;

	transition: all 0.8s;
	order: 3;

	opacity: 1;

	border-bottom: 2px solid var(--primary-color);

	padding-bottom: 8px;
}
.standing:nth-child(1) {transition-delay: 1100ms;}
.standing:nth-child(2) {transition-delay: 1200ms;}
.standing:nth-child(3) {transition-delay: 1300ms;}
.standing:nth-child(4) {transition-delay: 1400ms;}
.standing:nth-child(5) {transition-delay: 1500ms;}
.standing:nth-child(6) {transition-delay: 1600ms;}
.standing:nth-child(7) {transition-delay: 1700ms;}
.standing:nth-child(8) {transition-delay: 1800ms;}
.standing:nth-child(9) {transition-delay: 1900ms;}
.standing:nth-child(10) {transition-delay: 2000ms;}
.standing:nth-child(11) {transition-delay: 2100ms;}
.standing:nth-child(12) {transition-delay: 2200ms;}

/* Indicators for teams making it to playoffs */
[data-playoffs="true"] .standing:nth-child(2) {
	/* border-bottom: 3px solid var(--white); */
}
/*
[data-playoffs="true"] .standing:nth-child(4):before {
	content: '';
	background-color: var(--white);
	width: 100%;
	height: 2px;
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	margin-bottom: 5px;
}*/

.standing-bg {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	gap: 15px;
}

.position {
	width: 80px;
	text-align: center;
}
.standing .position {
	text-align: right;
	padding: 0 10px;

}

.standing:last-child .position,
.standing:last-child {
	border-bottom: 0px solid transparent;
	margin-bottom: 0;
}

.team-logo {
	width: 44px;
	height: 44px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	flex-shrink: 0;
	margin: 6px;
	position: relative;
}

.standing .team-logo:after {
	/*content: '';
	background-color: rgba(var(--black-rgb), 0.15);
	position: absolute;
	z-index: -1;
	left: -6px;
	right: -6px;
	top: -6px;
	bottom: -6px;*/
}

.team-abbr,
.team-name {
	text-align: left;
	flex-basis: 220px;
	min-width: 220px;
	width: 400px;
	white-space: nowrap;
	letter-spacing: -0.015em;
	padding: 0 12px;
	flex-grow: 1;
}
.team-abbr,
.group-all .standing .team-name {
	display: none;
}
.group-all .team-name,
.group-all .team-abbr {
	display: flex;
	width: 90px;
	min-width: 90px;
	flex-basis: 90px;
}
.stat-header .team-name {
	font-size: inherit;
}
.standing .team-name {
	font-family: "Satoshi", sans-serif;
}
.stat-header .team-name,
.standing .team-name {
	vertical-align: top;
}

.stats, .stat-header {
	display: flex;
	justify-content: space-between;
	text-align: center;
	align-items: center;
}
.stats {
	white-space: nowrap;
	letter-spacing: 0.075em;
	background-color: transparent;
}
.stat {
	width: 100px;
	font-variant-numeric: tabular-nums;
}
.gamesplayed {
	margin-left: 5px;
	/* display: none; */
}
.plusminus {
	width: 100px;
	padding-right: 10px;
	text-align: right;
	//font-size: 0.7em; /* Oswald font fix with decimals */
}
.plusminus.zeroes {
	text-align: center;
	font-size: 0.75em;
}
.plusminus .digit {
	width: auto;
	display: inline-block;
	text-align: center;
}
.plusminus.positive {
	padding-left: 15px;
}
.plusminus .minus {
	display: inline-block;
}
.points {
	width: 100px;
	font-weight: 600;
	/* display: none; */
}
.stat-header {
	/*position: absolute;
	left: 0;
	right: 0;
	bottom: calc(100% + 0px);
	width: auto;*/
	width: 100%;
	text-align: center;
	opacity: 1;
	transition: 0.6s all;
	transition-delay: 4.5s;
	color: var(--primary-color);
	text-transform: uppercase;
	padding: 10px var(--standings-x-padding);
	order: 2;
	font-weight: 600;

	font-size: 30px;
	line-height: 50px;

	position: relative;

	grid-column: 2;
	grid-row: 1;
	
	background: rgba(var(--secondary-color-rgb), 0.9);
}
.stat-header .position {
}
.stat-header .team-logo {
	height: 0;
	margin: calc(5px + 15px);
}
.stat-header .stat {
	text-align: center;
}
.stat-header .plusminus {
	text-align: right;
}

.group-all[data-groups="4"] {
	transform: scale(0.725);
	transform-origin: center;
}
.group-all .stats {
}
.group-all .points {
	margin-right: 0;
	width: 64px;
}
.group-all .standing .points {
	/* border-left: 3px solid var(--white); */
}
.group-all .wins,
.group-all .losses,
.group-all .plusminus {
	display: none;
}


/* Match decoration */
.group-corners,
.header-corners {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	z-index: 80;
	color: var(--primary-color);
	z-index: 10;
	height: 100%;
	pointer-events: none;
	font-size: 20px;
}
.header-corners {
	font-size: 25px;
}
.group-corners {
	font-size: 25px;
}
.corners:before,
.corners:after {
	content: '';
	position: absolute;
	border: 3px solid;
	width: 1em;
	height: 1em;
}
.corners:before {
	border-right-width: 0;
	left: 0;
}
.corners:after {
	border-left-width: 0;
	right: 0;
}
.corners-top:before,
.corners-top:after {
	border-bottom-width: 0;
	top: 0;
}
.corners-bottom:before,
.corners-bottom:after {
	border-top-width: 0;
	bottom: 0;
}