@import url("/css/theme.css");

body {
	display: flex;
	flex-wrap: nowrap;
}

.main {
	position: relative;
	flex-grow: 0;
	flex-shrink: 1;
	width: calc(100vw - 400px);
	padding-bottom: 60px;

	transition: filter 0.8s;

	&.blur {
		filter: blur(7px);
	}
}

.elements-container {
    width: 1400px;
    max-width: 100%;

	display: flex;
	justify-content: left;
	flex-wrap: wrap;
	& > div {
		width: 50%;
		max-width: 100%;
	}
	@media only screen and (max-width: 1722px) {
		& > div {
			width: 850px;
			max-width: 100%;
		}
		display: block;
	}

	&.hilite .element {
		opacity: 0.3;
	}

	&:not(.hilite) .element {
		&.red {
			background: #a003;
		}
		&.blue {
			background: #07a3;
		}
		&.green {
			background: #0a33;
		}
		&.purple {
			background: #a0a3;
		}
	}
}

.pre-section-title {
	display: none;
	color: #fff;
	margin: 5px 20px;
	margin-bottom: 0px;
	font-size: 26px;
}

.section {
	padding: 8px;
	background: #0005;
	margin: 10px 20px;
}

.element-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: left;

	.division {
		display: flex;
		flex-wrap: wrap;
		justify-content: left;

		background: #fff1;
		border: solid 2px #fff1;
		margin: 4px;
		border-radius: 15px;
	}

	.element {
		width: 57px;
		height: 57px;

		display: flex;
		justify-content: center;
		align-items: center;
		border-radius: 5px;
		margin: 3px;

		transition: opacity 0.5s, background 0.5s;

		&.hilite {
			opacity: 1;
		}

		cursor: pointer;

		img {
			width: 55px;
			transition: transform 0.05s, opacity 0.1s;
		}

		&:hover,
		&.hilite {
			img {
				transform: scale(1.1);
			}
		}
		&:active {
			img {
				transform: scale(1);
				opacity: 0.8;
			}
		}
	}

	&.drivers-container {
		.element img {
			width: 48px;
		}
	}
}

.sidebar {
	width: 450px;
	height: 100vh;
	flex-shrink: 0;
	.sidebar-content {
		background: #0005;
		position: fixed;
		left: calc(100vw - 450px);
		top: 0;
		bottom: 0;

		display: flex;
		flex-wrap: nowrap;

		transition: background 0.8s, left 0.8s;

		width: 100vw;
		height: 100vh;
		overflow-y: auto;

		.sidebar-left {
			width: 400px;
			padding: 30px;
			position: relative;
			flex-shrink: 0;
		}
		.sidebar-action {
			display: flex;
			justify-content: center;
			align-items: center;
			cursor: pointer;
			width: 50px;
			flex-shrink: 0;
			height: 100vh;
			transition: max-width 0.8s;
			&.sidebar-collapse {
				max-width: 0;
			}
			&.sidebar-expand {
				max-width: 50px;
			}

			background: #fff1;
			&:hover {
				background: #fff2;
			}
			&:active {
				background: #fff1;
			}

			svg {
				width: 40px;
				height: 40px;
				color: #fff;
			}
		}

		&.open {
			left: 0;
			background: #000c;
			.sidebar-collapse {
				max-width: 50px;
			}
			.sidebar-expand {
				max-width: 0;
			}
		}
	}

	.selected-elements {
		width: 100%;
		display: flex;
		justify-content: space-between;
		div {
			display: flex;
			justify-content: space-between;
			align-items: center;
			flex-wrap: wrap;
			flex-direction: column;
			width: 25%;
			flex-grow: 0;
			.img-wrapper {
				width: 100%;
				flex-grow: 1;
				display: flex;
				justify-content: center;
				align-items: center;
			}
			img {
				width: 70px;
			}
			.element-name {
				overflow: hidden;
				font-size: 12px;
				text-align: center;
			}
		}
	}
}

.sidebar-main {
	flex-grow: 1;
	display: flex;
	flex-wrap: wrap;
	padding: 20px;

	div.stat-block {
		margin: 30px;
		padding: 20px;

		ul {
			list-style-type: none;
			color: #fff;
			padding-left: 5px;
			li {
				position: relative;
				padding: 4px 0;
				padding-right: 25px;
			}
		}
		svg.info {
			cursor: help;
			height: 20px;
			position: absolute;
			top: 50%;
			right: 0;
			transform: translateY(-50%);
		}
	}

	h2.block-title {
		display: inline-block;
		color: #fff;
		margin: 6px 0;
		font-size: 30px;
	}
}

.notes-container {
	margin-top: 13px;
}
p.note,
.notes-container p {
	margin: 3px 0;
	color: #ddd;
	font-size: 14px;
	&.red,
	.red {
		color: lightcoral;
	}
	&.blue,
	.blue {
		color: lightskyblue;
	}
	&.green,
	.green {
		color: lightgreen;
	}
	&.purple,
	.purple {
		color: plum;
	}

	&.hidden {
		display: none;
	}
}

.coins-container,
.speed-slider-container {
	display: flex;
	align-items: center;
	p {
		margin-left: 10px;
	}
}

.stat-meter {
	position: relative;
	width: 100%;
	height: 13px;
	background: #444;
	border-radius: 15px;
	overflow: hidden;

	.bar {
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;

		height: 100%;
		border-radius: 15px;
		width: 0%;
		background: #077;

		&.bar-btm.active ~ .bar-top {
			background: #666;
		}
		&.bar-top {
			top: 0;
			/* bottom: 60%; */
			z-index: 7;
		}
		&.bar-btm {
			height: 100%;
			/* top: 30%; */
			/* bottom: 30%; */
			display: none;
			z-index: 8;
			&.active {
				display: block;
			}
		}
	}
	&.orange .bar {
		background: #a50;
	}
	&.blue .bar {
		background: #069;
	}
	&.green .bar {
		background: #080;
	}
	&.purple .bar {
		background: #707;
	}

	&::after {
		content: "";
		position: absolute;
		z-index: 10;
		inset: 0;
		width: 100%;
		height: 100%;
		border-radius: 15px;
		background-image: linear-gradient(to bottom, #0000, #000a);
	}
}

h3.stat-title {
	color: #fff;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 23px;
	margin: 0;
	margin-top: 20px;
}
h4.stat-title {
	color: #bbb;
	font-weight: 400;
	text-transform: uppercase;
	font-size: 17px;
	margin: 0;
}
.right {
	float: right;
	text-align: right;
}
.extreme {
	display: inline;
	opacity: 0;
	cursor: pointer;
	font-size: 17px;
	color: #bbb;
	font-weight: 400;
	&.bullet {
		margin: 0 5px;
		cursor: default;
	}
}
.stat-title:hover .extreme {
	opacity: 1;
}
span.stat-value {
	text-transform: none;
	font-family: monospace;
	margin-left: 15px;
}

p.note.bottom {
	position: absolute;
	bottom: 5px;
	font-size: 12px;
	width: 360px;
}

.disclaimer {
	transition: opacity 0.8s;
}
.sidebar-content.open .disclaimer {
	opacity: 0;
	pointer-events: none;
}

p.credit {
	position: absolute;
	bottom: 4px;
	left: 14px;
	font-size: 13px;
	color: #fff;
	opacity: 0.7;
	a {
		color: #fff;
		text-decoration: underline;
		&:hover {
			color: #ddd;
		}
		&:active {
			color: #bbb;
		}
	}
}
