/* Reset and global styles */
* {
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #000;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
}

/* Pano container */
#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Hide original left sidebar and its toggle */
#sceneList,
#sceneListToggle {
  display: none !important;
}

#logo-overlay {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  pointer-events: none;
background: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#tour-logo {
  width: auto;
  height: auto;
  max-width: 500px;    /* allow up to 600px on large displays */
  max-height: 135px;   /* 759×205 ≈ 3.7:1, so 600/3.7 ≈ 160px tall */
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Bottom thumbnail navigation */
#thumbnail-nav {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 90%;
  background: rgba(0, 0, 0, 0.2); /* Reduced from 0.7 to 0.3 for more transparency */
  border-radius: 12px;
  padding: 8px;
  backdrop-filter: blur(10px);
}

#thumbnail-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) rgba(255,255,255,0.1);
}
#thumbnail-container::-webkit-scrollbar {
  height: 6px;
}
#thumbnail-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
#thumbnail-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
}
#thumbnail-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

/* Thumbnail items */
.thumbnail-item {
  flex-shrink: 0;
  min-width: 80px;
  max-width: 120px;
  padding: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.thumbnail-item:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.thumbnail-item.active {
  background: rgba(255,255,255,0.3);
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.thumbnail-image {
  width: 80px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 5px;
}

.thumbnail-title {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.4em;
  word-break: break-word;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #thumbnail-nav {
    bottom: 10px;
    max-width: 95%;
    padding: 10px;
  }
  .thumbnail-item {
    min-width: 60px;
    max-width: 90px;
    padding: 6px;
  }
  .thumbnail-image {
    width: 60px;
    height: 30px;
  }
  .thumbnail-title {
    font-size: 10px;
  }
}

/* Hide all Marzipano control buttons */
#autorotateToggle,
#fullscreenToggle,
.viewControlButton {
  display: none !important;
}

/* Optionally hide the title bar */
#titleBar {
  display: none !important;
}
#current-scene-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  line-height; 1.2;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
/* Photographer credit */
#photographer-credit {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 1001;
  font-size: 9px;                  /* smaller text */
  opacity: 0.5;                    /* more transparent */
  transition: opacity 0.3s ease;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

#photographer-credit:hover {
  opacity: 0.8;
}

#photographer-credit a {
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.4);  /* lighter background */
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  transition: background 0.3s ease;
}

#photographer-credit a:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* Hide on very small screens */
@media (max-width: 480px) {
  #photographer-credit {
    font-size: 8px;
    bottom: 5px;
    right: 5px;
  }
}

/* Custom Right-Click Menu */
.custom-context-menu {
  display: none;
  position: absolute;
  z-index: 9999;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  padding: 12px 16px;
  font-family: sans-serif;
  font-size: 14px;
  color: #333;
  pointer-events: auto; /* Ensures links inside are clickable */
}

.custom-context-menu a {
  color: #007bff;
  text-decoration: none;
}

.custom-context-menu a:hover {
  text-decoration: underline;
}