/* full stylesheet — base project + embed fix (final corrected) */

/* base */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -ms-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -ms-content-zooming: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  margin: 0;
  padding: 0;
}

/* page basics */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  background-color: #000;
  color: #fff;
}

/* anchor resets for links */
a, a:hover, a:active, a:visited {
  text-decoration: none;
  color: inherit;
}

/* pano and title bar */
#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/*
  Controls on the right: design assumes two 40px buttons
  (fullscreen + autorotate) plus optional sceneListToggle on left.
*/
#titleBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0; /* ✅ FIXED: flush full width (no gap near fullscreen/play buttons) */
  height: 40px;
  text-align: center;
  z-index: 1000;
}

.mobile #titleBar {
  height: 50px;
  right: 0; /* ensure mobile also flush */
}

#titleBar .sceneName {
  width: 100%;
  height: 100%;
  line-height: 30px;
  padding: 5px;
  background-color: rgba(58,68,84,0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
.mobile #titleBar .sceneName { line-height: 40px; }

/* =========================
   Sidebar menu
   ========================= */

/* container that slides in/out.
   FIXED: restrict visible width so it never extends too far right.
*/
#sceneList {
  position: absolute;
  top: 40px;
  left: 0;
  width: 215px;              /* ✅ FIXED: slightly narrower to prevent extension */
  max-width: 90%;
  height: auto;
  max-height: calc(100% - 40px);
  overflow: hidden;
  z-index: 999;
  transform: translateX(-215px); /* match width */
  transition: transform 0.28s ease;
  pointer-events: auto;
  box-sizing: border-box;
}

#sceneList.enabled { transform: translateX(0); }

.mobile #sceneList {
  top: 50px;
  left: 0;
  width: 80%;
  max-width: 360px;
  max-height: calc(100% - 50px);
  transform: translateX(-100%);
}
.mobile #sceneList.enabled { transform: translateX(0); }

#sceneList .scenes {
  display: block;
  width: 100%;
  background-color: rgba(58,68,84,0.95);
  border-bottom-right-radius: 6px;
  border-top-right-radius: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: inherit;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

/* scene items */
#sceneList .scene {
  display: block;
  width: 100%;
  height: 36px;
  cursor: pointer;
  box-sizing: border-box;
}
.mobile #sceneList .scene { height: 44px; }

#sceneList .scene .text {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  line-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
.mobile #sceneList .scene .text { line-height: 44px; }

.no-touch #sceneList .scene:hover {
  background-color: rgba(103,115,131,0.8);
}
#sceneList .scene.current {
  background-color: rgba(103,115,131,0.8);
}

/* =========================
   Toggle & control buttons
   ========================= */

#sceneListToggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgba(103,115,131,0.8);
  z-index: 1001;
}
.mobile #sceneListToggle { width: 50px; height: 50px; }

#sceneListToggle .icon { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; }
.mobile #sceneListToggle .icon { top: 10px; right: 10px; }
#sceneListToggle .icon.on { display: none; }
#sceneListToggle .icon.off { display: block; }
#sceneListToggle.enabled .icon.on { display: block; }
#sceneListToggle.enabled .icon.off { display: none; }

/* Fullscreen button: right edge */
#fullscreenToggle {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgba(103,115,131,0.8);
  z-index: 1002;
}
.mobile #fullscreenToggle { width: 50px; height: 50px; }

/* Autorotate button: directly left of fullscreen */
#autorotateToggle {
  display: block;
  position: absolute;
  top: 0;
  right: 40px;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgba(103,115,131,0.8);
  z-index: 1002;
}
.mobile #fullscreenToggle { right: 0; width: 50px; height: 50px; }
.mobile #autorotateToggle { right: 50px; width: 50px; height: 50px; }

#fullscreenToggle .icon,
#autorotateToggle .icon,
#sceneListToggle .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}
.mobile #fullscreenToggle .icon,
.mobile #autorotateToggle .icon,
.mobile #sceneListToggle .icon {
  top: 10px;
  right: 10px;
}

#fullscreenToggle .icon.on,
#autorotateToggle .icon.on,
#sceneListToggle .icon.on { display: none; }
#fullscreenToggle .icon.off,
#autorotateToggle .icon.off,
#sceneListToggle .icon.off { display: block; }

#fullscreenToggle.enabled .icon.on,
#autorotateToggle.enabled .icon.on,
#sceneListToggle.enabled .icon.on { display: block; }
#fullscreenToggle.enabled .icon.off,
#autorotateToggle.enabled .icon.off,
#sceneListToggle.enabled .icon.off { display: none; }

/* =========================
   Hotspots
   ========================= */
.link-hotspot {
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.no-touch .link-hotspot:hover { opacity: 1; }

.link-hotspot-icon { width: 100%; height: 100%; cursor: pointer; }

.link-hotspot-tooltip {
  position: absolute;
  left: 100%;
  top: 14px;
  margin-left: 3px;
  font-size: 16px;
  max-width: 300px;
  padding: 8px 10px;
  border-radius: 5px;
  background-color: rgba(58,68,84,0.8);
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-8px);
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}
.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

/* Info hotspots */
.info-hotspot {
  line-height: 1.2em;
  opacity: 0.9;
  transition: opacity 0.2s 0.2s;
}
.no-touch .info-hotspot:hover { opacity: 1; transition: opacity 0.2s; }
.info-hotspot.visible { opacity: 1; }

/* View control buttons */
.viewControlButton {
  display: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgba(103,115,131,0.8);
}
body.view-control-buttons .viewControlButton { display: block; }
@media (max-width: 600px) {
  body.view-control-buttons .viewControlButton { display: none; }
}
.viewControlButton .icon { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; }

.viewControlButton-1 { margin-left: -145px; }
.viewControlButton-2 { margin-left: -95px; }
.viewControlButton-3 { margin-left: -45px; }
.viewControlButton-4 { margin-left: 5px; }
.viewControlButton-5 { margin-left: 55px; }
.viewControlButton-6 { margin-left: 105px; }

/* =========================
   EMBED FIX
   ========================= */
body.embed #sceneList {
  top: 40px;
  width: 215px;
  max-height: calc(100% - 40px);
  overflow: hidden;
}
body.embed .mobile #sceneList { top: 50px; }

body.embed #fullscreenToggle,
body.embed #autorotateToggle,
body.embed #sceneListToggle {
  z-index: 1002;
}
/* === Safe Pulse Animation for Hotspot Icons === */
@keyframes pulseHotspot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

/* Apply only to the icon, not the parent hotspot */
.link-hotspot-icon,
.info-hotspot-icon {
  animation: pulseHotspot 1.8s ease-in-out infinite;
  transform-origin: center center;
}

