/* Reset y base */
* {
  box-sizing: border-box;
  user-select: none;
  text-size-adjust: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* Contenedor principal */
#pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Barra de título */
/* #titleBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 40px;
  height: 40px;
  text-align: center;
} */

.mobile #titleBar {
  height: 50px;
  right: 50px;
}

body.fullscreen-enabled #titleBar { right: 80px; }
body.fullscreen-enabled.mobile #titleBar { right: 100px; }
body.multiple-scenes #titleBar { left: 40px; }
body.multiple-scenes.mobile #titleBar { left: 50px; }

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

.mobile #titleBar .sceneName { line-height: 40px; }

/* Botones generales */
button,
#fullscreenToggle,
#autorotateToggle,
#sceneListToggle,
.viewControlButton {
  border: none;
  outline: none;
  cursor: pointer;
  background: rgba(103, 115, 131, 0.8);
  color: inherit;
  transition: background 0.3s;
  background-color: transparent;
  display: none ;
}

button:hover,
#fullscreenToggle:hover,
#autorotateToggle:hover,
#sceneListToggle:hover,
.viewControlButton:hover {
  background: rgba(130, 145, 160, 0.9);
}

/* Botón fullscreen */
#fullscreenToggle {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
}

.mobile #fullscreenToggle { width: 50px; height: 50px; }
body.fullscreen-enabled #fullscreenToggle { display: block; }

#fullscreenToggle .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

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

/* Botón autorotate */
#autorotateToggle {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
}

.mobile #autorotateToggle { width: 50px; height: 50px; }
body.fullscreen-enabled #autorotateToggle { right: 40px; }
body.fullscreen-enabled.mobile #autorotateToggle { right: 50px; }

#autorotateToggle .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

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

/* Botón lista de escenas */
#sceneListToggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
}

.mobile #sceneListToggle { width: 50px; height: 50px; }

#sceneListToggle .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

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

/* Lista de escenas */
#sceneList {
  position: absolute;
  top: 0;
  left: -220px;
  padding-top: 40px;
  width: 220px;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  margin-left: 0;
  transition: margin-left 0.5s ease-in-out;
}

#sceneList .scenes {
  width: 100%;
  background: rgba(58, 68, 84, 0.8);
}

#sceneList.enabled { margin-left: 220px; }
.mobile #sceneList { width: 100%; height: 100%; left: -100%; padding-top: 50px; }
.mobile #sceneList.enabled { margin-left: 100%; }

#sceneList .scene {
  display: block;
  width: 100%;
  height: 30px;
}

#sceneList .scene .text {
  width: 100%;
  height: 100%;
  padding: 0 15px;
  line-height: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Ocultar si solo hay una escena */
body.single-scene #sceneList,
body.single-scene #sceneListToggle {
  display: none;
}

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

.link-hotspot:hover { opacity: 1; }
.mobile .link-hotspot { width: 70px; height: 70px; }

.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: rgba(58, 68, 84, 0.8);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateX(-8px);
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}

.link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

/* Botones de control de vista */
.viewControlButton {
  display: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  padding: 5px;
}

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