/* ==========================================================================
   UNBRANDING OVERHAUL & DARK TEXTURE UI STYLESHEET
   ========================================================================== */

/* 1. Hide Marzipano's own watermark/credit/about UI, if present in your
      copy of the library (recent builds don't ship one, but this is
      harmless to keep as a safeguard). */
.marzipano-watermark,
.marzipano-credit,
#about,
.desktop #about,
.mobile #about,
button[title*="About"],
a[href*="marzipano"],
.marzipano-control-layer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
}

/* 2. Base layout */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #0a0a0a;
  height: 100%;
}

#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 3. Collapsible nav panel — sits as an overlay on top of the pano,
      which stays full-width at all times. Expands on hover only, so the
      panorama's center is never shifted by the sidebar's width. */
#sceneList {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 100%;
  background: rgba(12, 12, 12, 0.98);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  z-index: 100;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: width 0.2s ease;
}

#sceneList:hover {
  width: 280px;
  overflow-y: auto;
}

/* Hamburger-style menu icon, always visible while collapsed, so the
   panel reads as an obvious clickable/hoverable UI element rather than
   a stray line at the screen edge. */
#sceneList::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: rgba(0, 210, 255, 0.9);
  box-shadow:
    0 -6px 0 rgba(0, 210, 255, 0.9),
    0 6px 0 rgba(0, 210, 255, 0.9);
}
#sceneList:hover::before {
  display: none;
}

/* Hide the actual menu content while collapsed — overflow:hidden alone
   isn't enough, since narrow text still wraps and leaks partial letters
   through. Content only becomes visible once expanded on hover. */
#sceneList .brand-title,
#sceneList .scenes {
  opacity: 0;
  transition: opacity 0.1s ease;
}
#sceneList:hover .brand-title,
#sceneList:hover .scenes {
  opacity: 1;
  transition-delay: 0.08s; /* let the width expand first, then fade text in */
}

/* Branding slot — edit the text in index.html, or override here. */
#sceneList .brand-title {
  padding: 22px 24px 16px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sceneList .scenes {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sceneList .scene {
  padding: 16px 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

#sceneList .scene:hover,
#sceneList .scene.current {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #00d2ff; /* accent — change to match client branding */
}

#sceneList .scene:focus-visible {
  outline: 2px solid #00d2ff;
  outline-offset: -2px;
}

/* 4. Hotspots */
.hotspot {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.link-hotspot .hotspot-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.link-hotspot .hotspot-label {
  margin-top: 6px;
  padding: 3px 9px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.hotspot:hover .hotspot-label {
  opacity: 1;
  transform: translateY(0);
}
.info-hotspot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #00d2ff;
}

/* 5. Error panel */
.sys-error {
  color: #ffffff;
  text-align: center;
  margin-top: 30vh;
  font-family: -apple-system, sans-serif;
  padding: 40px;
}
.sys-error h2 { color: #ff4d4d; margin-bottom: 10px; }

/* 6. Mobile layout — sidebar is now an always-slim hover overlay even
      on desktop, so mobile just needs a slightly wider collapsed strip
      (easier to tap than 14px) since hover doesn't really exist on
      touch; tapping it will still expand it via the same CSS. */
@media (max-width: 720px) {
  #sceneList {
    width: 36px;
  }
  #sceneList:hover,
  #sceneList:focus-within {
    width: 240px;
  }
}
