/* Loading Overlay Styles */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  color: white;
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-text {
  font-family: "Lato", sans-serif;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
body {
  background-color: #1aa8e0;
  height: 100vh;
  margin: 0;
  font-family: "Lato", sans-serif;
  color: #3d3d3d;
  --mdc-theme-primary: #007f8b;
  --mdc-theme-on-primary: #f1f3f4;
}

video {
  clear: both;
  display: block;
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  border-radius: 1em;
}

section {
  opacity: 1;
  transition: opacity 500ms ease-in-out;
}

.videoView,
.blend-shapes {
  position: relative;
  flex: 1 1 200px;

  margin: 1rem;
  cursor: pointer;
  overflow:auto;
}

.videoView {
    flex: 1 1 500px;   
}


.canvas {
  z-index: 1;
  position: absolute;
  pointer-events: none;
}

.output_canvas {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
}

.blend-shapes-item {
  display: flex;
  align-items: center;
  height: 2em;
  margin-bottom:0.5em;
}


.blend-shapes-list {
    width: 100%;
    margin-block-start: 0em;
    margin-block-end: 0em;
    padding-inline-start: 0px;
}

.blend-shapes-label {
  display: flex;
  width: 90px;
  justify-content: flex-end;
  align-items: center;
  margin-right: 4px;
  margin:1em;
  color: #fff;
  font-weight: 900;
}

.blend-shapes-value {
  display: flex;
  height: 24px;
  align-items: center;
  background-color: #fff;
  padding: 0.5em;
  border-radius: 0.3em;
  color:#1aa8e0;
  font-weight: 900;
  min-width: 2em;
  max-width: 250px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}





:root {
    --workspace_color: #334771;
    --workspace_color1: #245380;
    --workspace_color2: #5c485a;
    --flyout_color: #788CB7;
    --workspace_color3: #455A64;
    --orange: #E94E0F;
    --green: #1ae080;
    --yellow: rgb(233, 186, 15);
    --yellow2: rgb(196, 157, 13);
  }
  
  body {
    background-color: #1aa8e0;
    height: 100vh;  /* Ensure full viewport height */
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Lato", sans-serif;  /* Apply Lato font */
  }
  
  #main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 80vw;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
  }
  
  
  #faf_logo {
    position: absolute;
    top:10px;
    /* bottom: 10px; */
    /* right: 520px; */
    width: 350px;
    z-index: 1000;
    opacity:0.3;
  }
  
  #info {
      width: 35px;
      position: absolute;
      bottom: 30px;
      left: 30px;
      z-index: 1000;
  }
  
  .robotShow_connected {
      border: 2px solid #fff !important;
        padding: 5% 5% 0% 5% !important;
        border-radius: 50%;
        scale: 1.2;
        animation-name: rotate;
        animation-duration: 1s;
        animation-timing-function: ease-in-out;
  }
  
  #menu_left button {
    width: 45px;
    height: 45px;
    outline: none;
    border: none;
    background-color: #E94E0F;
    border-radius: 50%;
    transition: all .1s ease-in-out;
    padding: 0;
    margin-bottom: 2vh;
    cursor: pointer;
    transform:scale(1, 1);
    transition: all .1s ease-in-out;
  }
  
  #menu_left button:hover {
    transform:scale(1.1, 1.1);
    transition: all .1s ease-in-out;
  }
  
  
  #menu_left button:active {
    transform:scale(1.3, 1.3);
    transition: all .1s ease-in-out;
  }
  
  
  @keyframes rotate {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
  }
  
  #camera_toggle {
    display:none;
    position: absolute;
    top: 60px;
    left: 0px;
    width: 45px;
    height: 45px;
    outline: none;
    border: none;
    background-color: Transparent;
    transition: all .1s ease-in-out;
    padding: 0;
    margin-bottom: 2vh;
    cursor: pointer;
    transform: scale(1, 1);
    transition: all .1s ease-in-out;
  }
  
  /* Display the button on screens that are 600px wide or less */
  @media only screen and (max-width: 600px) {
    #camera_toggle {
  
        display: none;
    }
  }
  
  
  #media-container {
    position: relative;
    width: 100%; /* Make the container responsive */
    max-width: 1280px; /* Maximum width of the container */
    aspect-ratio: 32 / 20; /* Maintain the aspect ratio of 16:9 */
  }
  
  @media only screen and (max-width: 900px) and (orientation: portrait) {
    #media-container {
    aspect-ratio: 9 / 16; /* Maintain the aspect ratio of 16:9 */
    }
  }
  
  
  
  #video, #canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1em;
  
  }
  
  #canvas {
    z-index: 2; /* Canvas overlays the video */
    object-fit: ;
  }
  
  #video {
    z-index: 1;
  }
  
  #sliders {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-sizing: border-box;
    width: 100%;  /* Full width for alignment */
  }
  
  #sliders div {
    color: #fff;  /* White text color */
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    width: 100%;
    padding: 0.4rem;
    display: flex;
    justify-content: space-between;  /* Distribute space between label and input */
  }
  
  
  
  label {
    width: 100px;  
    text-align: left;
    padding-right: 20px;
  }
  
  #sliders div span {
    width: 50px;
    text-align: right;
  }
  
  #menu_left {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 5002;
    width: 45px;
  }
  
  #menu_left button {
    width: 45px;
    height: 45px;
    background-color: transparent;
    border-radius: 50%;
    padding: 0;
    margin-bottom: 2vh;
    cursor: pointer;
  }
  
  #menu_left button:hover, #menu_left button:active {
    transform: scale(1.1);  /* Consistent scale for hover and active */
  }
  
  
  input[type="range"] {
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.2); /* Corrected rgba syntax */
  
    margin: 0;
    padding: 0;
    width: 100%;
    height: 1rem;
   
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
  }
  
  input[type="range"][step] {
    background-color: transparent;
    background-image: repeating-linear-gradient(to right, rgba(255, 255, 255, .2), rgba(255, 255, 255, .2) calc(12.5% - 1px), #05051a 12.5%);
  }
  
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 0;
    box-shadow: -100rem 0 0 100rem rgba(255, 255, 255, 0.8);
  }
  
  input[type="range"]::-moz-range-thumb {
    border: none;
    width: 0;
    box-shadow: -20rem 0 0 20rem rgba(255, 255, 255, 1);
  }
  
/* Center #liveView vertically within #demos */
#demos {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 90vw;
}

/* Ensure #liveView is centered and has intrinsic content */
#liveView {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}


@media only screen and (max-width: 900px) and (orientation: portrait) {
  #liveView {
    flex-direction: column;
    align-items: center;
  }

  #demos {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
    height: 100vh; /* Full viewport height */
    width: 90vw;  /* Full viewport width */
    box-sizing: border-box; /* Include padding/border in width/height */
  }

  .videoView {
    flex: 1 1;   
}

  .videoView {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0 1rem 0;
  }

  .blend-shapes {
    width: 100%;
    max-width: 100%;
    margin-top: 1em;
  }

  .blend-shapes-label {
    display: flex;
    width: 85px;
    justify-content: flex-end;
    align-items: center;
    margin-right: 4px;
    margin:0.5em;
    color: #fff;
    font-weight: 900;
  }
  
  .blend-shapes-value {
    
    height: 12px;
    align-items: center;
    background-color: #fff;
    padding: 0.3em;
    border-radius: 0.3em;
    color:#1aa8e0;
    font-weight: 900;
    min-width: 1em;

  }

  .blend-shapes-item {
  
    margin-bottom:0.2em;
  }

}