#switch_flash{
      padding: 10px;
      position: fixed;
      top: 60px;
      right: 15px;
      border-radius: 50%;
      height: 50px;
      width: 50px;
      background-color: transparent;
      font-size:20px;
      color: black;
}

/* Media Query for low resolution Tablets, Ipads */
@media (max-width: 767px) {
  #video1 {
    height: 100%;
  }
}

/* Media Query for Tablets Ipads portrait mode */
@media (min-width: 768px){
  #video1 {
    width: 100%;
  }
}
.hide{
  display: none !important;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.loading {
  display: flex;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  align-items: center;
  backface-visibility: hidden;
  justify-content: center;
  opacity: 1;
  transition: all 1s;
  background-color: rgba(255,255,255,0.5);
  z-index: 3;
}
.loading .message {
  font-size: x-large;
}
@media (max-width: 768px){
    .loading .message {
      font-size: 16px;
    }
}
.loading .spinner {
  position: absolute;
  width: 120px;
  height: 120px;
  animation: spin 1s linear infinite;
  border: 32px solid #bebebe;
  border-top: 32px solid #3498db;
  border-radius: 50%;
}

.loaded .loading {
  opacity: 100;
}
.start .loading {
    opacity : 100;
}


body {
  margin: 0px;
  padding: 0px;
  background-color: #f1f1f1;
}

#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;  */
  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-color: #888;
  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 {
  left: calc(50% - 40px);
  top: calc(50% - 40px);
  width: 80px;
  height: 80px;
  background-image: url('./img/ic_photo_camera_white_48px.svg');
  border-radius: 50%;
  /* background-color: rgba(0, 0, 0, 0.5); */
}

button#galleryButton{
  position: relative;
  left: calc(50% - 40px);
  top: calc(20% - 40px);
  width: 80px;
  height: 80px;
  background-image: url('./img/gallery.svg');
  border-radius: 50%;
  background-size: 45px;

}


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

#toggleFullScreenButton {
  /* display: none; */
  width: 80px;
  height: 80px;
  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: 80px;
  height: 80px;
  background-image: url('./img/ic_camera_rear_white_36px.svg');
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
}

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

@media screen and (orientation: portrait) {
  
  .close{
    height:0% !important;
  }/* portrait-specific styles */
  #gallery_images_container{

    transition: 0.4s ease;
    scrollbar-width: none;
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    height: 10%;
    /* border:1px solid red; */
    z-index: 2;
  }

  #gallery_images{
    position: relative;
    /* height: 10%; */
    width: 100%;
    left:0;
    overflow: hidden;
    overflow-X: auto;
    /* padding: 10px 5px; */
    white-space: nowrap;
  }
  
  #gallery_images >  img{
    display: inline-block;
    height: 100%;
    margin: 0px 5px;
    /* width: 30%; */
    /* padding: 0 10px; */
  }
  .galleryCross{
    display: none;
  }
  /* video_container (video) doesn't respect height... 
       so we will fill it in completely in portrait mode
    */
  #vid_container {
    width: 100%;
    height: 100%;
  }

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

  #switchCameraButton {    
    left: calc(80% - 40px);
    top: calc(50% - 40px);
  }

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

  button#galleryButton{
    left: calc(15% - 20px);
    top: calc(50% - 40px);
  }

}
img.mirror, .mirror1{
  -moz-transform: scaleX(-1); 
  -o-transform: scaleX(-1); 
  -webkit-transform: scaleX(-1); 
  transform: scaleX(-1); 
  filter: FlipH;  
}


@media screen and (orientation: landscape) {

  #overlay{
    margin:5%;
  }
  .close{
    width:0% !important;
  }

#gallery_images_container{

  transition: 0.4s ease;
  scrollbar-width: none;
  position: fixed;
  width: 20%;
  top: 0;
  right: 0;
  /* height: 90%; */
  /* border:1px solid red; */
  z-index: 2;
}
  #gallery_images{
    right: 0;
    position: relative;
    top: 0;
    bottom: 0;
    /* width: 00%; */
    /* border: 1px solid red; */
    height: 100%;
    padding:0 10px;
    z-index: 2;
    overflow-Y:auto;
    background-color: transparent;
  }
  #gallery_images > img{
    width:100%;
    height:auto;
    display: block;
    margin: 10px 0;
  }  
  .galleryCross{
    text-align: right;
    display: block;
    font-size: 3rem;
    color: black;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
  }

  #vid_container {
    width: 100%;
    height: 100%;
    /* transform: scaleX(-1); */
  }

  #vid_container.left {
    left: 20%;
  }

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

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

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

  #toggleFullScreenButton {
    left: calc(50% - 40px);
    top: calc(82% - 40px);
  }
}
#fps{
  position: absolute;
  left: 5%;
  z-index: 20;
  color:red;
  font-size:20px;
  font-weight:bold;
}


.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar{
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}


/* .galleryCross{
  width: 20%;
  z-index: 2;
  position: fixed;
  right: 0;
  top: 0;
} */


#overlay{
  /* height:80%;
  width:80%; */
  /* margin:5% 10%; */
  margin: auto 5%;
  /* border:1px solid red; */
  /* display:block; */
  display: inline-flex;
  /* background-color:white; */
}
#overlay-container {
  z-index: 4;
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  cursor: pointer;
}
#overlay > img{
  width:100%;
}
#overlay-close{
	position:absolute;
	font-size:3rem;
  color:white;
  font-weight:bold;
  float:right;
  right:0;
  display:block;
  padding:10px 20px;
}
