:not(:defined) > * {
  display: none;
}

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

model-viewer {
  width: 100%;
  height: 50%;
  background-color: #e8e8e8;
  flex: 1;
  height: 100vh;
  width: calc(100% - 0px);
}


#instruction {
  font-size: 12px;
  line-height: 14px;
  color: black;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

#instruction a {
  font-size: 12px;
  line-height: 14px;
  color: black;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}
#instruction p {
  font-size: 12px;
  font-family: 'Poppins', sans-serif;
  line-height: 14px;
  color: #333;
  cursor: pointer;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

#footer {
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 34px;
  color: #222;
  right: 60px;
  display: block;
  justify-content: right;
  position: relative;
  width: 90%;
  top: 160px;
  right: 0;
  padding: 20px;
  line-height: 35px;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
  color: white
}

#footer span {
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

p {
  font-size: 16px;
  line-height: 24px;
  padding-right: 70px;
  color: black;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

h1 {
  text-align:left;
  color: #222;
  opacity: 0.3;
  font-weight: 600;
  font-size: 64px;
  line-height: 64px;
  display: flex;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}


.container {
  display: flex;
  flex-direction: row; /* Default: side by side */
  height: 100vh;
  overflow: hidden;
}

/* Toggle Button */
.info-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.5);
  border: 3px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
  color: #347ef1;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 2vw, 16px);
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 10px 15px;
  cursor: pointer;
}

.info-toggle:hover {
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  color: #C24935;
}

/* Info Panel styles */
.info-panel {
  width: 0;
  font: 'Poppins', sans-serif;
  overflow: auto;
  background: #fff;
  transition: width 0.3s ease;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  z-index: 10;
}

.info-panel.active {
  width: 750px; /* or adjust based on screen size */
}

.viewer-wrapper {
  flex: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* On small screens, info panel can take over full screen */
@media (max-width: 100px) {
  .container {
    flex-direction: column; /* Stack vertically */
  }


  .info-panel {
    display: block;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 25;
    overflow: hidden;
  }

  .info-panel.active {
    height: 500px; /* Adjust as needed */
  }

  .viewer-wrapper {
    flex: none;
    height: 100vh;
  }
}




.bottom-bar {
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  position: relative  ;
  bottom: -300px;
  left: 10%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(30px);
  padding: 10px 20px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

@media (max-width: 900px) {
  .bottom-bar {
    flex-wrap: wrap;
    flex-direction: row;
    top: 660px;
    left: 50%;
    display: inline-flex;
    justify-content: center;
    gap: 5px;
    padding: 10px;
  }

  .menu-hotspot,
    .animation-toggle-bar button {
      font-size: 14px;
      padding: 8px 16px;
    }
  }

.menu-hotspot {
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
  color: black;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 2vw, 16px);
  padding: 12px 24px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-hotspot:hover {
  background: #d3d3d3;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  color: #000;
}

.animation-toggle-bar {
  position: initial;
  bottom: 70px;
  z-index: 999;
}

.animation-toggle-bar button {
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
  color: #347ef1;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 2vw, 16px);
  padding: 12px 24px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.animation-toggle-bar button:hover {
  background: #d3d3d3;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.Hotspot {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  height: 32px;
  width: 32px;
  padding: 8px;
  transition: all 5s ease;
  will-change: transform;
 transition: transform 0.8s ease;
}

.Hotspot:not([data-visible]) > .HotspotAnnotation {
  display: none;
  opacity: 0;
  pointer-events: none;
}


.Hotspot:focus {
  border: 4px solid rgb(0, 128, 200);
  height: 32px;
  outline: none;
  width: 32px;
}

.Hotspot > * {
  opacity: 1;
  transform: translateY(-50%);
}

.HotspotAnnotation {
  display: none;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #000;
  max-width: 60vw;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 0.4em 0.8em;
  white-space: normal;
  word-break: break-word;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: absolute;
  left: calc(100% + 1em);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  opacity: 0;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .HotspotAnnotation {
    font-size: 12px;
    max-width: 80vw;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%);
  }
}

.Hotspot:hover .HotspotAnnotation {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}

.Hotspot:not([data-visible]) > * {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-50% + 4px));
  transition: transform 0.3s, opacity 0.3s;
}


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

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

.update-bar {
  background-color: rgba(255, 255, 255, 0.9);
  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: 51%;
  top:75%;
  transform: translateX(-50%);
  white-space: nowrap;
  bottom: 16px;
  padding: 0px 16px 0px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-size: clamp(12px, 2vw, 16px);
  font-weight: 600;
  color: #000;
  height: 36px;
  z-index: 15;
  max-width: 90vw;
  line-height: 36px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   box-shadow: 0 5px 10px rgba(0, 0, 0, 0.09);
}

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

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

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

#ar-prompt {
  z-index: 5;
}

@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); }
}

@media (max-width: 768px) {

  model-viewer {
    height: calc(100vh - 100px);
    display: block;
  width: 100%;
  height: 100vh;
  position: relative;
  }

  #ar-button {
    font-size: 12px;
    height: 32px;
    padding: 0px 12px 32px 16px;
    background-size: 16px 16px;
    bottom: 60px;
  }

  model-viewer > #ar-prompt {
    position: absolute;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    animation: elongate 2s infinite ease-in-out alternate;
    display: none;
  }

  model-viewer[ar-status="session-started"] > #ar-prompt {
    display: block;
  }

}
