*,
*:before,
*:after {
  box-sizing: inherit;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}


body {
  margin: 0px;
  padding: 0px;
  background: #000;

  color: #212121;
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
  Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  justify-content: center;
  margin: 0;
}

#vid_container {
  position: fixed;
  top: 0;
  left: 0;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

#gui_controls {
  position: fixed;
  background-color: #111; /*rgba(255, 0, 0, 0.5);*/
  z-index: 2;
  bottom: 0;
}

#video_overlay {
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: 10;
  background-color: #111;
}

/*  Button style from: 
    https://googlesamples.github.io/web-fundamentals/fundamentals/media/mobile-web-video-playback.html */

button {
  outline: none;
  position: absolute;
  color: white;
  display: block;
  opacity: 1;
  background: transparent;
  border: solid 2px #fff;
  padding: 0;
  text-shadow: 0px 0px 4px black;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: auto;
  z-index: 2;
}

#takePhotoButton {
  width: 64px;
  height: 64px;
  background-image: url('img/ic_photo_camera_white_48px.svg');
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
}

#takePhotoButton:active {
  background-color: #fff;
}

#toggleInferenceButton {
  width: 64px;
  height: 64px;
  background-image: url('img/ic_fullscreen_white_48px.svg');
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
}

#toggleInferenceButton[aria-pressed='true'] {
  background-image: url('img/ic_fullscreen_exit_white_48px.svg');
}


#toggleFullScreenButton {
  display: none;
  width: 64px;
  height: 64px;
  background-image: url('img/ic_fullscreen_white_48px.svg');
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
}

#toggleFullScreenButton[aria-pressed='true'] {
  background-image: url('img/ic_fullscreen_exit_white_48px.svg');
}

#switchCameraButton {
  display: none;
  width: 64px;
  height: 64px;
  background-image: url('img/ic_camera_rear_white_36px.svg');
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
}

#switchCameraButton[aria-pressed='true'] {
  background-image: url('img/ic_camera_front_white_36px.svg');
}

@media screen and (orientation: portrait) {
  /* portrait-specific styles */

  /* video_container (video) doesn't respect height... 
       so we will fill it in completely in portrait mode
    */
  #vid_container {
    width: 100%;
    height: 80%;
  }

  #gui_controls {
    width: 100%;
    height: 20%;
    left: 0;
  }

  #switchCameraButton {
    left: calc(20% - 32px);
    top: calc(50% - 32px);
  }

  #toggleFullScreenButton {
    left: calc(80% - 32px);
    top: calc(50% - 32px);
  }
}

@media screen and (orientation: landscape) {
  #vid_container {
    width: 80%;
    height: 100%;
  }

  #vid_container.left {
    left: 20%;
  }

  /* we default to right */
  #gui_controls {
    width: 20%;
    height: 100%;
    right: 0;
  }

  /* for the lefties */
  #gui_controls.left {
    left: 0;
  }

  #switchCameraButton {
    left: calc(50% - 32px);
    top: calc(18% - 32px);
  }

  #takePhotoButton {
    left: calc(25% - 32px);
    top: calc(94% - 28px);
  }

  #toggleFullScreenButton {
    left: calc(75% - 32px);
    top: calc(94% - 28px);
  }

  #toggleInferenceButton {
    left: calc(50% - 32px);
    top: calc(94% - 28px);
  }
}

/* ONNX model used*/
.elevation {
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 1px 5px 0 rgba(0, 0, 0, 0.12);
}

.card {
  background: #fff;
  border-radius: 4px;
  padding: 10px;
}

.canvas {
  border-radius: 4px;
  height: 120px;
  width: 140px;
}

.button {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 1px 5px 0 rgba(0, 0, 0, 0.12), inset 0 0 0 rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.25px;
  line-height: 36px;
  margin: 10px 0;
  text-align: center;
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  width: 140px;
}

.button:hover {
  background: #f5f5f5;
}

.button:active {
  box-shadow: 0 0 rgba(0, 0, 0, 0.2), 0 0 rgba(0, 0, 0, 0.14),
    0 0 rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.05s cubic-bezier(0.4, 0, 0.2, 1);
}

.predictions {
  display: flex;
}

.prediction-col {
  padding: 0 2px;
}

.prediction-bar-container {
  background: #f5f5f5;
  height: 140px;
  width: 10px;
  position: relative;
}

.prediction-bar {
  background: #e0e0e0;
  bottom: 0;
  position: absolute;
  width: 100%;
}

.prediction-number {
  color: #bdbdbd;
  font-size: 14px;
  text-align: center;
}

.top-prediction .prediction-bar {
  background: #00f0ff;
}

.top-prediction .prediction-number {
  color: #00f0ff;
  font-weight: bold;
}

.votecount {
 width:50px;
}