*,
*:focus,
*::before,
*::after {
	box-sizing: border-box;
	outline: none;
}

:root {
	--app-color: #ff7143;
}

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	overflow: hidden;
	font-size: 18px;
	color: #fff;
	font-family: 'Roboto', 'Noto', sans-serif;
	background-color: #000;
	background-image: url(../images/logo.svg);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 64px;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

a {
	text-decoration: none !important;
	outline: none;
	color: inherit;
}

a:hover {
	color: inherit;
}

.hidden {
	display: none !important;
}

.material-icons {
	font-family: 'Material Icons';
	font-weight: normal;
	font-style: normal;
	font-size: 24px;
	/* Preferred icon size */
	display: inline-block;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	word-wrap: normal;
	white-space: nowrap;
	direction: ltr;
	/* Support for all WebKit browsers. */
	-webkit-font-smoothing: antialiased;
	/* Support for Safari and Chrome. */
	text-rendering: optimizeLegibility;
	/* Support for Firefox. */
	-moz-osx-font-smoothing: grayscale;
	/* Support for IE. */
	font-feature-settings: 'liga';
	-webkit-filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.2));
	filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.2));
}

#actions {
	position: fixed;
	z-index: 2;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.toolbar {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
}

.toolbar.space {
	justify-content: space-between;
}

.bottom {
	margin-top: auto;
}

.button {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 4px;
	height: 56px;
	width: 56px;
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	transition: all .2s;
}

.button:hover,
.button:active {
	background: rgba(255, 255, 255, .12);
}

.snap:hover,
.snap:active {
	color: var(--app-color);
}

input[type=checkbox] {
	display: none;
}

.slider .off {
	color: rgba(255, 255, 255, .54);
}

input[type=checkbox]:checked + div .on {
	display: block;
	color: var(--app-color);
}

.slider input[type=checkbox]:checked + div .on {
	display: block;
	color: #fff;
}

input[type=checkbox]:checked + div .off {
	display: none;
}

input[type=checkbox]:checked + div {
	transform: scaleX(-1) scaleX(-1);
}

.on {
	display: none;
}

.ico {
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	padding: 16px;
	color: #fff;
}

.sliders {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	align-items: center;
}

.slider {
	opacity: 1;
	max-height: 64px;
	display: flex;
	width: 100%;
	overflow-y: hidden;
	transition: all .2s;
}

.closed {
	opacity: 0;
	max-height: 0;
}

input[type=range] {
	-webkit-appearance: none;
	display: flex;
	margin: 16px 0;
	width: 100%;
	background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
	width: 100%;
	height: 3px;
	cursor: pointer;
	background: rgba(255, 255, 255, .54);
	border-radius: 6px;
	-webkit-filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.2));
	filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.2));
}

input[type=range]::-moz-range-track {
	width: 100%;
	height: 3px;
	cursor: pointer;
	background: rgba(255, 255, 255, .54);
	border-radius: 6px;
	-webkit-filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.2));
	filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.2));
}

input[type=range]::-webkit-slider-thumb {
	height: 18px;
	width: 18px;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	margin-top: -8px;
}

input[type=range]::-moz-range-thumb {
	border: none;
	height: 18px;
	width: 18px;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

input[type=range]:focus::-webkit-slider-runnable-track {
	background: var(--app-color);
}

input[type=range]:focus::-moz-range-track {
	background: var(--app-color);
}

input[type=range]::-moz-focus-outer {
	border: 0;
}

output {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 16px;
	color: #fff;
}

#grid {
	position: absolute;
	z-index: -1;
}

table {
	width: 100vw;
	height: 100vh;
	border-collapse: collapse;
	border-style: hidden;
}

table td {
	border: 2px solid rgba(255, 255, 255, 0.3);
}

#capture {
	transform-origin: center;
	transform-style: preserve-3d;
}

@media (max-width: 640px) {

	.button:hover,
	.button:active {
		background: none;
	}
}

video#camera-stream {
	position: absolute;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
}

img#snap {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
}

#error-message {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	z-index: 30;
	background-color: red;
	color: #fff;
	padding: 64px;
	text-align: center;
}

.controls {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	z-index: 20;
	display: flex;
	align-items: flex-end;
	justify-content: space-around;
	padding: 8px;
}

.disabled {
	display: none;
}

canvas {
	display: none;
}

video#camera-stream.visible,
img#snap.visible,
#error-message.visible {
	display: block;
}

.controls.visible {
	display: flex;
}
