html {
	height: 100%;
}

body {
	font-family: "Overpass Mono", monospace;
	background: #0000aa;
	color: rgba(255,255,255,0.95);
	width: 100%;
	height: 100%;
	cursor: pointer;

	flex-direction: column;
	align-items: center;
	justify-content: center;
}

body.empty { background: #0000aa; }
body.ready { background: #0000aa; }
body.notfound {
	background-color: #000099;
	animation-name: animate-notfound;
	animation-duration: 2s;
	animation-iteration-count: infinite;
	cursor: not-allowed;
}
body.waiting { background: #006400; cursor: pointer; }
body.watching { background: #000000; cursor: not-allowed; }
body.recording { background: #8b0000; cursor: pointer; }
body.error { background: #000000; cursor: pointer;}
body.connecting {
	background-color: #0000cc;
	animation-name: animate-connecting;
	animation-duration: 2s;
	animation-iteration-count: infinite;
	cursor: pointer;
}

@keyframes animate-connecting {
	0% { background-color: #0000cc; }
	50% { background-color: #0000ff; }
	100 { background-color: #0000cc; }
}

@keyframes animate-notfound {
	0% { background-color: #0000cc; }
	50% { background-color: #000022; }
	100 { background-color: #0000cc; }
}

body.empty #code { color: #0000aa;	}
body.ready #code { color: #0000aa;	}
body.notfound #code { color: #0000aa;	}
body.waiting #code { color: #006400; }
body.watching #code { color: #ffffff; }
body.recording #code { color: #8b0000; }
body.error #code { color: #000000; }
body.connecting #code { color: #0000aa; }

body .message { display: none; line-height: 120%;}
body .typing-info { display: none; }

body.empty .message.empty { display: block; }
body.ready .message.ready { display: block; }
body.notfound .message.notfound { display: block; }
body.connecting .message.connecting { display: block; }
body.waiting .message.waiting { display: block; }
body.watching .message.watching { display: block; }
body.recording .message.recording { display: block; }
body.error .message.error { display: block; }

body.empty div.view.empty { display: flex; }
body.ready div.view.ready { display: flex; }
body.notfound div.view.notfound { display: flex; }
body.connecting div.view.connecting { display: flex; }
body.waiting div.view.waiting { display: flex; }
body.watching div.view.watching { display: flex; }
body.recording div.view.recording { display: flex; }
body.error div.view.error { display: flex; }

/* required for Safari, which doesn't update if the video element is not visible */
body.recording div.view.video {
	position: fixed;
	left:  0px;
	top: 0px;
	display: block;
	opacity: 0;
	width:  1px !important;
	height:  1px !important;
}

body.typing .message { display: none !important; }
body.typing .bottomBar .message { display: block !important; }
body.typing .typing-info { display: block !important; }

div.view {
	width: 100%;
	height: 100%;
	display: none;
}

div.view.ready {
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
}

div.view .box {
	position: relative;
	width: 70%;
	min-width: 300px;
	min-height: 250px;
	text-align: center;
}

@media all and (max-width: 500px) {
	div.view .box {
		width: 100%;
	}
}

div.view.ready, div.view.recording {
	cursor: pointer;
}

#display {
	width: 100%;
	/* height: 100%; */
}

#video {
	width: 100%;
}

h1 {
	display: inline-block;
	background: rgba(255,255,255,0.95);
	margin-bottom: 1em;
	padding: 10px;
	padding-top:  14px;
	font-size: xx-large;
}

p {
	margin-bottom: 1em;
	text-align: center;
	line-height: 1.5em;
}

a,a:visited,a:hover {
	color: #fff;
	text-decoration: underline;
}

#code {
	font-family: "Overpass Mono", monospace;
	display: inline-block;
	background: rgba(255,255,255,0.95);
	color: #0000aa;	
	text-align: center;
	line-height: xx-large;
	font-size: xx-large;
	cursor: text;
	width:  100%;
	max-width: 250px;
	white-space: nowrap;
}

@keyframes animate-bad-input {
	0% { background-color: rgba(255,255,255,0.95); box-shadow: 0px 0px 10px 5px rgba(78,223,255,0.5); }
	50% { background-color: #f00; box-shadow: 0px 0px 10px 5px rgba(255,0,0,0.5); }
	100% { background-color: rgba(255,255,255,0.95); box-shadow: 0px 0px 10px 5px rgba(78,223,255,0.5); }
}

#code.bad-input {
	animation-name: animate-bad-input;
	animation-duration: 0.5s;
	animation-iteration-count: 1;
}

@keyframes animate-copied {
	0% { background-color: #000 }
	50% { color: #fff; background-color: #0000aa;  }
	100% { background-color: #000 }
}

#shareview.copied {
	animation-name: animate-copied;
	animation-duration: 0.25s;
	animation-iteration-count: 1;
}

.message {
	width: 100%;
	text-align: center;
}

[contenteditable]:focus {
    outline: 0px solid transparent;
    box-shadow: 0px 0px 10px 5px rgba(78,223,255,0.5);
}

::placeholder {
	color: rgba(0,0,170,0.3);
	padding: 10px;
}

div.bottomBar {
	padding: 1em;
	padding-bottom: 2em;
}

em {
	border-bottom: solid 1px #fff ;
}

#shareview {
	display: none;
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;

	flex-direction: column;
	align-items: center;
	justify-content: space-between;

	background: #000;
	color: #fff;
}

#shareview.visible {
	display: flex;
}

#qrcode {
	text-align:  center;
}

#qrcode img {
	display: inline-block !important;
}