@green: #20ff87;

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	text-decoration: none;
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizelegibility;
	-moz-osx-font-smoothing: grayscale;
	line-height: inherit;
	outline: 0;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body {
	background: #000;
	overflow: hidden;
	color: #fff;
}

body, table th, table td {
	font-family: Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.5em;
}

.ui {
	position: absolute;
	z-index: 9;
	&#ui-tl {
		left: 20px;
		top: 20px;
		width: 180px;
	}
	&#ui-tl2 {
		left: 240px;
		top: 20px;
		width: 180px;
	}
	&#ui-tr {
		right: 20px;
		top: 20px;
		width: 180px;
	}
	&#ui-tr2 {
		right: 220px;
		top: 20px;
		width: 180px;
	}
	&#ui-tr3 {
		right: 420px;
		top: 20px;
		width: 180px;
	}
	&#ui-bl {
		left: 20px;
		width: 180px;
		bottom: 20px;
	}
	&#ui-br {
		right: 20px;
		bottom: 20px;
		width: 180px;
		
	}
	&#ui-tc {
		top: 20px;
		left: 50%;
		transform: translateX(-50%);
	}
	&#ui-bc {
		bottom: 20px;
		left: 50%;
		transform: translateX(-50%);		
	}
	& > button:first-child {
		margin-top: 0;
	}
}


nav {
	position: fixed;
	left: 0;
	top: 0;
	padding: 30px;
	z-index: 999;
	width: 240px;
	input {
		max-width: 100%;
	}
}

canvas, img, video {
	image-rendering: pixelated;
}

h2, h3, h4 {
	font-size: inherit;
	margin-bottom: 0.5em;
}

* + h2 {
	margin-top: 1.5em;
}


h3 {
	font-weight: normal;
}

label,
input[type=range],
select {
	display: block;
	width: 100%;
	cursor: pointer;
}

input[type=radio] {
	display: inline-block;
	margin-right: 6px;
	margin-bottom: 3px;
	vertical-align: middle;
}

button {
	all: unset;
	display: block;
	width: 100%;
	cursor: pointer;
	color: #666;
	border: 1px solid #666;
	text-align: center;
	margin: 0.4em 0;
	&:hover {
		color: #999;
		border-color: #999;
	}
	&[active="true"] {
		color: @green;
		border-color: @green;
	}
}

input[type=checkbox] + span,
button {
	all: unset;
	display: block;
	cursor: pointer;
	color: #666;
	border: 1px solid #666;
	width: 100%;
	text-align: center;
	margin: 0.4em 0;
	&:hover {
		color: #999;
		border-color: #999;
	}
	&[active="true"] {
		color: @green;
		border-color: @green;
	}
}

input[type=checkbox] {
	display: none;
}
input[type=checkbox]:checked + span {
	color: @green;
	border-color: @green;
}



#drivers {
	// display: none;
	#driver-info {
		display: flex;
		& > div {
			width: 40px;
			text-align: center;
			span {
				display: block;
				&#fps,
				&[data-key="fps"] {
					font-weight: bold;
					font-size: 120%;
				}
			}
		}
	}
	button {
		display: inline-block;
		background-color: inherit;
	}
}


#settings {
	.sliders {
		margin-top: 1.5em;
	}
	.checkboxes {
		margin-top: 1em;
	}
	.sliders {
		input {
			margin: 0.3em 0 1em;
		}
	}
}

#midi {
	margin-top: 1.5em;
}

h4 {
	margin-bottom: 0.5em;
}

.status {
	color: #999;
}
.status p {
	word-break: break-all;
}
.status[status=success] {
	color: @green;
}
.status[status=error] {
	color: red;	
}


.areas {
	display: flex;
	gap: 20px;
	.area {
		width: 40px;
		font-size: 0;
		line-height: 1em;
		background: #000;
		span {
			display: inline-block;
			width: 20px;
			height: 20px;
			background: #fff;
		}
	}
}

.speakers {
	display: flex;
	width: 100%;
	gap: 10px;
	.speaker {
		height: 60px;
		width: 40px;
		position: relative;
		box-shadow: 0 0 0 1px #333 inset;
		h3 {
			text-align: center;
			position: absolute;
			z-index: 2;
			top: 35%;
			left: 0;
			width: 100%;
		}
		div {
			position: absolute;
			left: 0;
			bottom: 0;
			width: 100%;
			background-color: #333;
		}
	}
}


#preview {
	position: absolute;
	top:  0;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1;
	height: 100%;
	canvas {
		display: block;
		height: 100% !important;
		width: auto !important;
	}
}


.slider {
	position: relative;
	margin: 0.75em 0;
	h3 {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		text-align: center;
		pointer-events: none;
		text-transform: uppercase;
		line-height: 20px;
		font-size: 9px;
		letter-spacing: 1px;
		color: #fff;
	}
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
	display: inline-block;
	vertical-align: middle;
	background: #161616;
  &::-webkit-slider-thumb {
	  background: #444;
	  -webkit-appearance: none;
	  appearance: none;
	  width: 10px;
	  height: 20px;
	  cursor: pointer;
	}
	&::-moz-range-thumb {
	  background: #444;
	  width: 10px;
	  height: 20px;
	  cursor: pointer;
	}
	&:hover {
	  &::-webkit-slider-thumb {
			background: #666;
	  }
	}
}


.level {
	// background: #161616;
	box-shadow: 0 0 0 1px #333 inset;
	display: block;
	width: 100%;
	margin-bottom: 0.75em;
	height: 20px;
	h3 {
		color: #bbb;
	}
	span {
		display: block;
		background: #333;
		color: #fff;
		font-size: 9px;
		line-height: 20px;
		width: 0;
		height: 100%;
		&.active {
			background-color: #666;
		}
	}
}

#source {
	display: flex;
	gap: 20px;
	#alternative {
		height: 100px;
		width: auto !important;
	}
	video[active=true] {
		outline: 2px solid @green;
	}
	.camera {
		height: 100px;
		position:relative;
		video {
			display: block;
			height: 100%;
			width: auto !important;
		}
		select {
			position: absolute;
			left: 5px;
			top: 5px;
			width: auto;
		}
	}
}