/* RESET */
:root {
  --hotspot-r: 255;
  --hotspot-g: 255;
  --hotspot-b: 255;

  --hotspot-color: rgb(var(--hotspot-r), var(--hotspot-g), var(--hotspot-b));
  --hotspot-glow: rgba(var(--hotspot-r), var(--hotspot-g), var(--hotspot-b), 0.45);
  --hotspot-glow-soft: rgba(var(--hotspot-r), var(--hotspot-g), var(--hotspot-b), 0.22);
}
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* PANORAMA */
#tour, #pano {
  position: absolute;
  inset: 0;
}

#pano {
  background: #111;
}

/* LOADING */
#loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #2a2a2a 0%, #080808 70%);
  color: rgb(187, 255, 173);
  transition: opacity 0.4s ease;
}

#loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-card {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

.loader {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
}

.loader::before,
.loader::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 0%, white 0 5px, transparent 6px),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.85) 0 4px, transparent 5px),
    radial-gradient(circle at 100% 50%, rgba(255,255,255,0.65) 0 4px, transparent 5px),
    radial-gradient(circle at 85% 85%, rgba(255,255,255,0.45) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.3) 0 3px, transparent 4px);
  animation: dotSpin 1s linear infinite;
}

.loader::after {
  filter: blur(1px);
  opacity: 0.45;
}

@keyframes dotSpin {
  to {
    transform: rotate(360deg);
  }
}

/* TOPBAR */
.topbar {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.topbar > div,
.topbar button {
  pointer-events: auto;
}

.topbar > div {
  color: white;
  padding: 10px 14px;
  border-radius: 14px;
  background: none;
  backdrop-filter: none;
}

button {
  border: 0;
  cursor: pointer;
  color: rgb(40, 41, 38);
  border-radius: 10px;
  padding: 8px 12px;
  background: none;
}

/* FLOORPLAN */
#floorplanPanel {
  position: fixed;
  right: 25px;
  bottom: 55px;
  width: 450px;
  z-index: 20;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  backdrop-filter: none !important;
}

#floorplanPanel:hover {
  opacity: 1;

}

.floorplan-header {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  color: rgb(48, 44, 44);
}

#floorplanWrap {
  position: relative;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

#floorplanImage {
  width: 100%;
  display: block;
}

/* FLOORPLAN POINTS */
.floor-spot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  border-radius: 90%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(0,0,0,0.35);
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 5;
  overflow: visible;
}

.floor-spot::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #111;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.floor-spot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  animation: pulse 1.6s infinite;
}

.floor-spot:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.floor-spot.active {
  background: rgb(96,184,255) !important;
  border-color: rgb(96,184,255) !important;
  transform: translate(-50%, -50%) scale(1.25) !important;
  box-shadow:
    0 0 0 4px rgba(96,184,255,0.35),
    0 0 22px rgba(96,184,255,0.7) !important;
  z-index: 30;
}

.floor-spot.active::before {
  background: white !important;
}

/* FLOORPLAN DIRECTION TRIANGLE */
.floor-spot .direction {
  position: absolute;
  left: 50%;
  top: 50%;

  width: 40px;
  height: 65px;

  background: radial-gradient(
    ellipse at top,
    rgba(var(--hotspot-r), var(--hotspot-g), var(--hotspot-b), 1.0) 0%,
    rgba(var(--hotspot-r), var(--hotspot-g), var(--hotspot-b), 0.35) 40%,
    rgba(var(--hotspot-r), var(--hotspot-g), var(--hotspot-b), 0.05) 70%,
    transparent 100%
  );

  clip-path: polygon(
    50% 0%,
    0% 100%,
    100% 100%
  );

  transform:
    translate(-50%, 0)
    rotate(var(--dir));

  transform-origin: 50% 0%;

  pointer-events: none;
  z-index: 1;
  
}

.floor-spot.active .direction {
  background: rgba(var(--hotspot-r), var(--hotspot-g), var(--hotspot-b), 0.28);
}

.floor-spot.active .direction {
  border-top-color: rgba(96,184,255,0.32) !important;
}

.floor-spot.active .direction {
  border-bottom-color: rgba(96,184,255,0.32) !important;
}

/* LABEL */
.floor-spot .label {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
  text-shadow: 0 2px 8px rgba(0,0,0,0.75);
}

.floor-spot:hover .label,
.floor-spot.active .label {
  opacity: 1;
}

/* PANORAMA HOTSPOTS */
.pano-spot {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.35);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.35),
    0 0 0 5px rgba(255,255,255,0.22);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.pano-spot::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  background: #111;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.pano-spot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 1.8s infinite;
}

.pano-spot:hover {
  transform: scale(1.15);
  background: var(--hotspot-color);
}

/* HIDE ROOM BUTTONS */
#sceneNav {
  display: none !important;
}

/* RESPONSIVE – MOBIL */
@media (max-width: 700px) {
  .topbar {
    top: 12px;
    left: 12px;
  }

  #logo {
    height: 5px;
  }

  #floorplanPanel {
    width: 210px;
    right: 12px;
    bottom: 12px;
    opacity: 0.75;
  }

  #floorplanPanel:hover {
    opacity: 1;
  }

  .floor-spot {
    width: 18px;
    height: 18px;
  }

  .floor-spot::before {
    width: 8px;
    height: 8px;
  }

  .floor-spot .direction {
    border-left-width: 24px;
    border-right-width: 24px;
    border-bottom-width: 64px;
  }

  .pano-spot {
    width: 32px;
    height: 32px;
  }

  .pano-spot::before {
    width: 10px;
    height: 10px;
  }
}

/* EXTRA SMALL MOBILE */
@media (max-width: 430px) {
  #floorplanPanel {
    width: 170px;
    opacity: 0.72;
  }

  #logo {
    height: 40px;
  }

  .floor-spot .direction {
    border-left-width: 20px;
    border-right-width: 20px;
    border-bottom-width: 52px;
  }
}