:root {
	--the-var: hsl(0, 50%, 0%);
	--main-padding: .8rem;
	--main-border-size: .15rem;
}

html {
	width: 100%;
}
html,
body {
	margin: 0;
	min-height: 100%;
}
body {
	background: hsl(220, 50%, 30%);
	display: grid;
	grid-template-columns: 250px 1fr;
	padding: var(--main-padding);
	height: calc(100vh - 2 * var(--main-padding) - 2 * var(--main-border-size));
}
button {
	border-radius: 0;
	border: white 2px solid;
	padding: 1em 1.5em;
	cursor: pointer;
	background: black;
	color: white;
}
button:hover {
	background: white;
	color: black;
}
p, h1, h2, h3, button, a {
	color: white;
	font-family: Montserrat, sans-serif;
}

nav,
main {
	height: 100%;
	border: solid var(--main-border-size) white;
}
main {
	background: black;
}
nav {
	border-right: none;
	background: hsla(0, 0%, 0%, 0.85);
}
nav p.tab {
	text-transform: uppercase;
	text-shadow: white 0 0 4px;
	font-size: 1.4rem;
	text-align: center;
	cursor: pointer;
	padding: 1em;
	margin: 0;
	transition: background 200ms, color 200ms;
}
nav p.tab:hover,
nav p.tab.active {
	background: white;
	color: black;
}
nav p.tab.hidden {
	display: none;
}

nav #audio-buttons {
	margin-top: 1em;
	display: flex;
	flex-direction: row;
	justify-content: center;
}
nav #audio-buttons button {
	margin: 1em;
}
nav #audio-buttons button.hidden {
	display: none;
}
nav #audio-buttons button.audio-start {
	width: 100%;
}
nav p#unmute-warning {
	padding: 1rem;
	text-align: center;
	text-shadow: red 0 0 3px;
	color: red;
}
nav p#unmute-warning.hidden {
	display: none;
}

section.template {
	display: none;
	height: 100%;
}
main section.template {
	display: inherit;
}

.container {
	position: relative;
	height: 100%;
	overflow: hidden;
}
.canvas-container {
	position: relative;
	height: calc(100% - 101px);
}
.canvas-container canvas {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	margin: auto;
}
.controls {
	height: 100px;
	border: solid 1px white;
	display: flex;
	flex-flow: row;
	justify-content: space-around;
}
.control-tab {
	width: 150px;
	height: 100%;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
}
.control-tab .key-icon {
	width: 15px;
	height: 15px;
	font-size: 10px;
	line-height: 10px;
	padding: 2px 0 2px 4px;
	border: solid 1px white;
	border-radius: 2px;
	margin-right: 7px;
	box-shadow: white -2px 2px 0;
	transition: background 100ms, color 100ms;
	cursor: pointer;
}
.control-tab .key-icon::after {
	content: attr(data-key);
	text-align: center;
	color: white;
	font-size: 15px;
	line-height: 14px;
}
.control-tab .key-info {
	line-height: 1em;
	opacity: .75;
	font-size: 15px;
}
.control-tab.active .key-icon,
.control-tab .key-icon.active {
	background: white;
}
.control-tab.active .key-icon::after,
.control-tab .key-icon.active::after {
	color: black;
}
.control-tab.active .key-info,
.control-tab .key-info.active {
	opacity: 1;
	text-shadow: white 0 0 3px;
}
.control-tab:not(.active) .key-icon:hover {
	background: white;
}
.control-tab:not(.active) .key-icon:hover::after {
	color: black;
}
.arrows-control-tab {
	position: relative;
}
.arrows-control-tab .key-icon {
	position: absolute;
	margin: 0;
}
.arrows-control-tab .key-icon[data-keycode="37"] {/* Left */
	left: calc(50% - 11px - 25px - 30px);
	top: calc(50% - 11px);
	padding: 0px 2px 4px 2px;
}
.arrows-control-tab .key-icon[data-keycode="38"] {/* Up */
	left: calc(50% - 11px + 0px - 30px);
	top: calc(50% - 11px - 25px);
	padding: 1px 0px 4px 5px;
}
.arrows-control-tab .key-icon[data-keycode="39"] {/* Right */
	left: calc(50% - 11px + 25px - 30px);
	top: calc(50% - 11px);
	padding: 0px 2px 4px 2px;
}
.arrows-control-tab .key-icon[data-keycode="40"] {/* Down */
	left: calc(50% - 11px + 0px - 30px);
	top: calc(50% - 11px + 25px);
	padding: 1px 0px 4px 5px;
}
.arrows-control-tab .key-info {
	margin-left: 63px;
}

/* Arrow control overrides */
#fft-container .arrows-control-tab .key-icon[data-keycode="37"] {/* Left */
	top: calc(50% - 11px);
	left: calc(50% - 11px - 37px);
}
#fft-container .arrows-control-tab .key-icon[data-keycode="39"] {/* Right */
	top: calc(50% - 11px);
	left: calc(50% - 11px + 39px);
}
#fft-container .arrows-control-tab .key-info {
	margin-left: 0px;
}
#timefreq-container .arrows-control-tab .key-icon[data-keycode="38"],
#combined-container .arrows-control-tab .key-icon[data-keycode="38"] {/* Up */
	left: calc(50% - 11px);
	top: calc(50% - 11px - 25px);
	padding: 1px 0px 4px 5px;
}
#timefreq-container .arrows-control-tab .key-icon[data-keycode="40"],
#combined-container .arrows-control-tab .key-icon[data-keycode="40"] {/* Down */
	left: calc(50% - 11px);
	top: calc(50% - 11px + 25px);
	padding: 1px 0px 4px 5px;
}
#timefreq-container .arrows-control-tab .key-info,
#combined-container .arrows-control-tab .key-info {
	margin-left: 0;
}

/* Specific */
#loader-content {
	height: 100%;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}
#loader-content .loader {
	background: white;
	height: 30px;
	width: 30px;
	animation: rotate 2s infinite;
}

#home-container {
	padding: 6rem 2rem;
	height: calc(100% - 2 * 6rem);
}
#home-container p {
	text-align: center;
}
#fopti-header {
	text-align: center;
	padding-right: 50px;
}
#fopti-header img,
#fopti-header #fopti-text {
	display: inline-block;
	vertical-align: middle;
}
#fopti-header h1 {
	font-size: 2.5rem;
}
#fopti-header #fopti-text h1,
#fopti-header #fopti-text p {
	text-align: left;
	margin: 0;
}
@media (max-width: 800px) {
	#fopti-header {
		text-align: center;
		padding-right: 0px;
	}
	#fopti-header #fopti-text h1,
	#fopti-header #fopti-text p {
		text-align: center;
	}
}
#fopti-header #fopti-text p {
	margin-bottom: 1rem;
}
#home-container #fopti-header img {
	width: 160px;
}


#home-container a {
	text-decoration: none;
}
#home-container a:hover {
	text-shadow: white 0 0 2px;
}

@keyframes rotate {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(450deg);
	}
}
