/*
 * Copyright 2020 Miguel Mosquera (unrealmitch@gmail.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

html {
  background-color: rgb(255, 255, 255, 0);
}

body {
  /* margin: 1em; */
  margin: 0;
  padding: 0;
  font-family: Google Sans, Noto, Roboto, Helvetica Neue, sans-serif;
  color: #244376;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0);
}

*:fullscreen,
*:-webkit-full-screen,
*:-moz-full-screen {
  background-color: rgb(255, 255, 255);
}

#container:fullscreen {
  background-color: rgb(255, 255, 255);
}
#container:-webkit-full-screen {
  background-color: rgb(255, 255, 255);
}
#container:-moz-full-screen {
  background-color: rgb(255, 255, 255);
}

::backdrop {
  background-color: rgb(255, 255, 255);
}

#card {
  margin: 3em auto;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

model-viewer {
  width: 100%;
  height: 100vh;
  /* min-width: 800px; */
}

.shadow {
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
}

.attribution {
  display: flex;
  flex-direction: row;
  margin: 1em;
}

.attribution h1 {
  margin: 0 0 0 0;
}

.divBtnQR {
  position: fixed;
  /* bottom: 0;
  left:0; */
  bottom: 40px;
  left: 80px;
}

.divBtnQRWithModels {
  bottom: 160px;
}

.btn-open-ar {
  position: fixed;
  bottom: 0;
}

.divBtnOpenChrome {
  position: fixed;
  bottom: 40px;
  left: 147px;
}

h2 {
  position: fixed;
  z-index: 1;
  width: 100%;
  /* margin: -5px 0 0 0; */
}

.attribution img {
  opacity: 0.5;
  height: 2em;
}

.attribution .cc {
  flex-shrink: 0;
  text-decoration: none;
}

footer {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: auto;
  text-align: center;
  font-style: italic;
  line-height: 0em;
}

.controls {
  position: fixed;
  bottom: 10px;
  right: auto;
  left: 50%;
  transform: translate(-50%, -50%);
}

.btn-ar {
  position: absolute;
  left: 50%;
  z-index: 3;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  padding-right: 0.9rem;
  padding-left: 0.9rem;
  background-color: #545fd9;
  box-shadow: none;
  -webkit-transform: translate(-50%, 0px);
  -ms-transform: translate(-50%, 0px);
  transform: translate(-50%, 0px);
  color: #fff;
  line-height: 3rem;
  text-decoration: none;
  cursor: pointer;
  font-family: Roboto, sans-serif;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  font-size: 16px;
  padding: 0px 15px;
  border-radius: 0.4rem;
}

.btn-ar-phone {
  position: absolute;
  /* margin-left: -50px; */
  bottom: 15%;
  left: 50%;
  /* background-color: #d95454; */
}

.Component-arButton-0-2-8 {
  left: 0;
  right: 0;
  border: none;
  top: 16px;
  display: flex;
  padding: 12px 18px;
  position: absolute;
  font-size: 18px;
  box-shadow: 3px 3px 15px 0px rgb(0 0 0 / 16%);
  margin-left: auto;
  margin-right: auto;
  border-radius: 40px;
  justify-content: center;
  background-color: white;
  appearance: auto;
  text-rendering: auto;
  color: -internal-light-dark(black, white);
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  text-indent: 0px;
  text-shadow: none;
  text-align: center;
  align-items: flex-start;
  cursor: default;
  box-sizing: border-box;
  margin: 0em;
  font: 400 13.3333px Arial;
  pointer-events: initial;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.qr-code-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.div-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.qr-code {
  position: relative;
  box-sizing: border-box;
  width: 248px;
  max-width: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 20px 0 #00000040;
  padding: 32px;
  font-family: "Inter", sans-serif;
}

.qr-code__title,
.qr-code__subtitle {
  text-align: center;
  color: #252525;
}

.qr-code__title {
  font-weight: bold;
  font-size: 18px;
}

.qr-code__subtitle {
  font-size: 11px;
}

.qr-code__image-aspect-box {
  position: relative;
  padding-top: 100%;
}

.qr-code__image {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}

.audioPlayer {
  position: fixed;
  bottom: 50px;
  right: auto;
  left: 8px;
  transform: translate(0%, -50%);
  width: 250px;
}

#title {
  text-align: center;
  /* z-index: -1; */
}

.progress-bar.hide {
  visibility: hidden;
  transition: visibility 0.3s ease 0s;
}

.progress-bar {
  display: block;
  width: 33%;
  height: 10%;
  max-height: 2%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0px);
  border-radius: 25px;
  box-shadow: rgb(0 0 0 / 50%) 0px 3px 10px 3px,
    rgb(0 0 0 / 60%) 0px 0px 5px 1px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background-color: rgba(0, 0, 0, 0.5);
}

.divBtnFullScreen {
}

#btnFullScreen {
  position: fixed;
  right: 0;
  bottom: 0;
  cursor: pointer;
  float: right;
  width: 60px;
  height: 60px;
  bottom: 60px;

  user-select: none;
  position: relative;
  pointer-events: auto;

  display: flex;
  justify-content: center;
  /* background-size: 60%;
  background-repeat: no-repeat;
  background-position: center center;
  background-image: url(img/fullscreen.svg);
  background-color: #333333; */
}

#btnFullScreen:hover {
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); */
}

#btnFullScreen img {
  content: url("img/fullscreen.svg");
  width: 60%;
  filter: drop-shadow(0px 0px 5px rgba(255, 255, 255, 0.5));
}

#btnFullScreen.exit img {
  content: url("img/fullscreenExit.svg");
}

#btnFullScreen img:hover {
  width: 65%;
  filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.5));
}

/* Annotations Hotspots ModelViewer */

.ht-dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  border: none;
  background-color: gray;
  box-sizing: border-box;
}

.ht-text {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.8);
  display: block;
  font-family: Futura, Helvetica Neue, sans-serif;
  font-size: 12px;
  font-weight: 700;
  max-width: 128px;
  overflow-wrap: break-word;
  padding: 0.5em 1em;
  position: absolute;
  width: max-content;
  height: max-content;
  transform: translate3d(-50%, -50%, 0);
}

.dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  background: #fff;
  --min-hotspot-opacity: 0;
}

.dim {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.8);
  display: block;
  font-family: Futura, Helvetica Neue, sans-serif;
  font-size: 18px;
  font-weight: 700;
  max-width: 128px;
  overflow-wrap: break-word;
  padding: 0.5em 1em;
  position: absolute;
  width: max-content;
  height: max-content;
  transform: translate3d(-50%, -50%, 0);
  --min-hotspot-opacity: 0;
  --max-hotspot-opacity: 75%;
}

.show {
  --min-hotspot-opacity: 1;
}

.hide {
  display: none;
}

.panelConfig {
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: unset;
  transform: unset;
  background-color: #ffffff85;
  opacity: 80%;
}

/* This keeps child nodes hidden while the element loads */
/* :not(:defined) > * {
  display: none;
} */

/* WebXR UI */
@keyframes circle {
  from {
    transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg) translateX(50px) rotate(-360deg);
  }
}

@keyframes elongate {
  from {
    transform: translateX(100px);
  }
  to {
    transform: translateX(-100px);
  }
}

model-viewer > #ar-prompt {
  position: absolute;
  left: 50%;
  bottom: 175px;
  animation: elongate 2s infinite ease-in-out alternate;
  display: none;
}

model-viewer[ar-status="session-started"] > #ar-prompt {
  display: block;
}

model-viewer > #ar-prompt > img {
  animation: circle 4s linear infinite;
}

model-viewer > #ar-failure {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 175px;
  display: none;
}

model-viewer[ar-tracking="not-tracking"] > #ar-failure {
  display: block;
}

/* Slider: Multiple model selector */

.slider {
  width: 100%;
  text-align: center;
  overflow: hidden;
  position: absolute;
  bottom: 16px;
  padding-left: 8px;
  padding-right: 8px;
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.slide {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #dededeab;
  margin-right: 10px;
  border-radius: 10px;
  border: none;
  display: flex;
}

.slide.selected {
  border: 2px solid #4285f4;
}

.slide:focus {
  outline: none;
}

.slide:focus-visible {
  outline: 1px solid #4285f4;
}

.pDarkRed {
  color: rgb(170, 0, 0);
}

.pDarkGreen {
  color: rgb(0, 100, 0);
}

.pDarkBlue {
  color: rgb(0, 0, 165);
}

@media (max-aspect-ratio: 3/4) {
  .panelConfigWithTitle {
    top: 55px;
  }

  .audioPlayer {
    bottom: 100px;
    width: 146px;
  }
}

.iframeGenerator {
  position: absolute;
  width: 400px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 10px;
  text-align: center;
}

.iframeCodeBtn {
  display: block;
  height: fit-content;
  left: 164px;
  bottom: 9px;
  position: absolute;

  background-color: Transparent;
  background-repeat: no-repeat;
  border: none;
  cursor: pointer;
  overflow: hidden;
}

#imgShowIframe {
  width: 60px;
  filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}

/* Panel Message */

#msg-div {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

#msg-container {
  text-align: center;
  color: #252525;

  position: relative;
  box-sizing: border-box;
  max-width: 450px;
  /* max-width: calc(100% - 20px); */
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  background: rgba(255, 255, 255, 0.871);
  border-radius: 8px;
  box-shadow: 0 0 20px 0 #0000008c;
  padding: 32px;
  font-family: "Inter", sans-serif;
}

#msg-title {
  font-weight: bold;
  font-size: 18px;
}

#msg-text {
  font-size: 12px;
  margin-bottom: 10px;
  margin-top: 5px;
}

#msg-image {
  max-width: 100%;
  max-height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  /* display: none; */
}

.btnClose {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #efefef;
  outline: none;
  border: none;
  color: #252525;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 4px;
  padding: 5px;
  transition: color 0.1s, background-color 0.1s;
  /* margin-top: 15px; */
}

.btnClose:hover,
.btnClose:active {
  background: #595959;
  color: #f7f7f7;
}

/* Language Selector */

#languageSelector {
  display: inline;
  position: fixed;
  width: 10%;
  text-align: right;
  right: 5px;
  top: 1%;
}
#languageSelector ul {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  display: inline-block;
}
#languageSelector li {
  cursor: pointer;
  padding-bottom: 10px;
}
#languageSelector li ul {
  display: none;
}
#languageSelector li:hover ul {
  position: absolute;
  top: 39px;
  right: 4px;
  display: block;
  background: #fff;
  width: 75px;
  padding-top: 0px;
  z-index: 1;
  border-radius: 5px;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
}
#languageSelector li:hover .triangle {
  position: absolute;
  top: 26px;
  right: 0px;
  /* z-index:10; */
  height: 14px;
  overflow: hidden;
  width: 30px;
  background: transparent;
}
#languageSelector li:hover .triangle:after {
  content: "";
  display: block;
  /* z-index: 20; */
  width: 15px;
  transform: rotate(45deg) translateY(0px) translatex(10px);
  height: 15px;
  background: #fff;
  border-radius: 2px 0px 0px 0px;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
}
#languageSelector li ul li {
  position: relative;
  text-align: left;
  background: transparent;
  padding: 15px 15px;
  padding-bottom: 0;
  z-index: 2;
  font-size: 15px;
  color: #3c3c3c;
}
#languageSelector li ul li:last-of-type {
  padding-bottom: 15px;
}
#languageSelector li ul li span {
  padding-left: 5px;
}
#languageSelector li ul li span:hover,
#languageSelector li ul li span.active {
  color: #146c78;
}
.sl-flag {
  display: inline-block;
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.4);
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0);
  border-radius: 50%;
  position: relative;
  top: 2px;
  overflow: hidden;
  margin-right: 5px;
  background-position: center;
  background-size: cover;
}
.flag {
  background-size: cover;
  background-position: center center;
}
.sl-flag-actual {
  width: 25px;
  height: 25px;
}

#copyright {
  color: rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px rgba(255, 255, 255, 0.2);
  margin-bottom: 5px;
  font-size: smaller;
}

.bot-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0;
  width: 100%;
}