

html {
  overflow: auto;
}

body {
  display: flex;
  place-content: center;
  height: 100vh;
  width: auto;
  margin: 0;
  /* background-color: #ffed81; */
  background-color: #f1f1f1;
  font-family: "Nunito", sans-serif;
}

@font-face {
  font-family: 'Nunito';
  src: url('/font/Nunito-VariableFont_wght.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

.hotspot {
  background: rgb(255, 235, 21);
  opacity: .23;
  width: 2vw;
  height: 2vw;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, .2), 0 0 4px rgba(0, 0, 0, .25);
}
@media only screen and (max-width: 900px) {
  .hotspot {
    width: 5vw;
    height: 5vw;
  }
}

/* Standardgröße des Bildes */
#popup-image {
  height: auto;
  object-fit: cover;
  max-width: 24vw; /* Maximale Breite des Bildes auf 24% der Viewport-Breite */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Schatten für das Bild */
  border-radius: 8px; /* Abrundung der Ecken des Bildes */
}

/* Für Bildschirmgrößen unter 600px: Das Popup bleibt fixiert und mittig im Viewport */
@media only screen and (max-width: 600px) {
  #popup-image {
    max-width: 80vw !important; /* Maximale Breite des Bildes auf 80% der Viewport-Breite */
  }

  /* Popup fixiert im Viewport und mittig ausgerichtet */
  #image-popup {
    position: fixed !important; /* Fixiert das Popup im Bildschirm */
    top: 60% !important; /* Vertikale Positionierung in der Mitte */
    left: 50% !important; /* Horizontale Positionierung in der Mitte */
    transform: translate(-50%, -50%) !important; /* Verschiebt das Popup genau ins Zentrum */
    display: block ; /* Popup sichtbar */
    width: 80vw !important; /* Popup nimmt 80% der Breite des Viewports ein */
    max-width: 80vw !important; /* Sicherstellen, dass das Popup auch bei maximaler Breite immer noch zentriert bleibt */
    height: auto !important; /* Höhe bleibt proportional */
    padding: 8px !important;
    pointer-events: auto !important; /* Ermöglicht Interaktionen mit dem Popup */
  }
}

/* Weitere Popup-Styles */
#image-popup {
  z-index: 999; /* Popup soll unter dem Overlay liegen */
  display: none; 
  position: absolute;
  padding: 8px;
}

/* Transparentes Overlay, das über den gesamten Viewport geht */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* Transparenter schwarzer Hintergrund */
  z-index: 1000; /* Overlay liegt über dem Popup */
  pointer-events: auto; /* Klicks auf das Overlay werden erkannt */
}


.flex-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100vw;
  height: 100vh;
  align-items: center;
  box-sizing: border-box;
  scrollbar-width: none;
  overflow-x: auto;
  overflow-y: hidden;
  /* background-color: #4285f4; */
}

@media only screen and (max-width: 900px) {
  .flex-container {
    flex-direction: column;
    top: 6vh;
    overflow-y: auto;
    height: 120vh;
  }

}

@media only screen and (max-width: 600px) {


  .menu-button.contact {
    width: 91% !important;
  }

}


model-viewer {
  width: 54vw;
  height: 100vh;
  flex-shrink: 0;
  background-color: transparent;
  overflow-x: visible;
  --progress-bar-height: 0px;
  /* background-color: #ffed81;
  margin-left: 1vw;
  margin-right: 1vw; */
  transition: transform 0.5s ease, outline-offset 0.5s ease, box-shadow 0.5s ease;
}

@media only screen and (max-width: 900px) {
  model-viewer {
    width: 100vw;
    height: 85%;
    background-color: transparent;
    overflow-x: visible;
    margin: 0;
    top: 0;
    transition: transform 0.5s ease, outline-offset 0.5s ease, box-shadow 0.5s ease;
  }
}


model-viewer::part(ar-button) {
  display: none;
}


.progress-bar {
  display: block;
  width: 33%;
  height: 10%;
  max-height: 2%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background-color: transparent;
}

.progress-bar.hide {
  visibility: hidden;
  transition: visibility 0.3s;
}

.update-bar {
  background-color: transparent;
  width: 0%;
  height: 100%;
  border-radius: 25px;
  float: left;
  transition: width 0.3s;
}

#ar-button {
  background-image: url(ar_icon.png);
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: 12px 50%;
  background-color: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  bottom: 16px;
  padding: 0px 16px 0px 40px;
  font-size: 14px;
  color:#4285f4;
  height: 36px;
  line-height: 36px;
  border-radius: 18px;
  border: 1px solid #DADCE0;
}

#ar-button:active {
  background-color: #E8EAED;
}

#ar-button:focus {
  outline: none;
}

#ar-button:focus-visible {
  outline: 1px solid #4285f4;
}

@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: 60px;
  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;
}
