
html, body {
  background-color: #ddd;
  padding: 0;
  margin: 0;
  text-align: center;
  font-family: "Helvetica Neueu", "Helvetica", "Arial", sans;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}

#preview button {
  z-index: 600;
}

#preview canvas, video {
  position: fixed;
  max-width: 100%;
  max-height: 100%;
  min-width: 100vmin;
  top: 0; bottom: 0;
  margin: auto;
  z-index: -1;
  pointer-events: none;
}
#preview canvas {
  left: 50%;
  transform: translateX(-50%);
}
video {
  transform: scaleX(-1);
  left: 0;
  width:100%;
  height:100%;
}
#preview *:not(canvas) {
  z-index: 300;
}
#preview.hidden {
  display: none;
}
#preview {
  background-color: rgba(0,0,0,0.8);
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 800;
  bottom: 0;
  left: 0; right: 0;
}


button:not(#preview *), input, #loader {
  display: none;
}

#camera {
  display: inline-block;
  background-color: transparent;
  margin: 0.5em;
  width: 250px;
  height: 300px;
}

#camera .placeholder {
  padding: 0.5em;
}

#snapshots {
  height: 150px;
  margin: 0.5em 0;
  padding: 3px;
  border: 1px solid #aaa;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

#snapshots canvas, #snapshots img {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  -o-box-sizing: border-box;
  margin-left: 3px;
  border: 3px solid transparent;
}

#snapshots .selected {
  border: 3px solid #000;
}

button, #upload_status, #upload_result, #loader {
  margin: 0.5em;
}

.bottombar {
  color: white;
  position: fixed;
  white-space: nowrap;
  bottom: 0.25em;
  font-size: 125%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
}
.bottombar>* {
  display: inline-block;
  margin: 0.125em;
}
.bottombar>.stacked {
  transform: translateY(25%);
}
.bottombar>.stacked>* {
  display: block;
  margin: 0 auto;
}
.bottombar>.stacked>*:first-child {
  margin-bottom: .125em;
}
.bottombar>*:not(.stacked), .bottombar>.stacked>* {
  color: white !important;
  padding: 0.125em;
  position: static;
  border: 1px solid rgba(0,0,0,0.5);
  border-radius: .5em;
  background-color: rgba(0,0,0,0.2);
}
.bottombar>div>* {
  margin: 0 auto;
}
.bottombar>div>input {
  outline: 1px solid rgba(0,0,0,.4);
  box-shadow: inset 0px 999px rgba(0,0,0,0.1);
  width: 100px;
}
.bottombar button {
  transform: translateY(-45%);
  font-size: 150%;
}
#camera>div>div:last-child, #camera>div>div:first-child {
  visibility: hidden;
  display: none;
}
