/* Virtueller Rundgang – eigenständige Styles, unabhängig vom Rest der Website. */

.tour-shell {
  position: fixed;
  inset: 0;
  background: #0d100f;
  color: #fff;
  overflow: hidden;
  font-family: "Inter", Arial, sans-serif;
  --tour-glass: rgba(18, 24, 21, 0.52);
}

.tour-stage,
.tour-stage .pano-viewer {
  position: absolute;
  inset: 0;
}

.tour-stage {
  opacity: 1;
  transition: opacity 0.28s ease;
}
.tour-stage.is-fading {
  opacity: 0;
}

.tour-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 22%),
    linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 30%);
}

/* Topbar */
.tour-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: clamp(0.7rem, 2vw, 1.2rem);
  z-index: 3;
}

.tour-topbar__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tour-roomname {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-tag {
  flex-shrink: 0;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.82);
}

/* Buttons */
.tour-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: var(--tour-glass);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.86rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}
.tour-btn:hover {
  background: rgba(11, 92, 60, 0.72);
}
.tour-btn--icon {
  min-width: 44px;
  padding: 0;
  justify-content: center;
}

/* Seitliche Pfeile */
.tour-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--tour-glass);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  transition:
    background 0.25s ease,
    opacity 0.25s ease;
}
.tour-arrow--prev {
  left: clamp(0.6rem, 2vw, 1.4rem);
}
.tour-arrow--next {
  right: clamp(0.6rem, 2vw, 1.4rem);
}
.tour-arrow:hover:not(:disabled) {
  background: rgba(11, 92, 60, 0.72);
}
.tour-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Bottombar */
.tour-bottombar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: clamp(0.7rem, 2vw, 1.2rem);
  z-index: 3;
}

.tour-rooms {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.tour-rooms::-webkit-scrollbar {
  display: none;
}

.tour-room {
  flex: 0 0 auto;
  display: grid;
  gap: 0.3rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--tour-glass);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease;
}
.tour-room img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.tour-room:hover {
  transform: translateY(-2px);
}
.tour-room.is-active {
  border-color: #c9a54f;
  color: #fff;
}

/* Grundriss */
.tour-plan {
  flex: 0 0 auto;
  width: 148px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--tour-glass);
  backdrop-filter: blur(10px);
  padding: 0.5rem;
}
.tour-plan__canvas {
  position: relative;
  aspect-ratio: 1;
}
.tour-plan__canvas img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.tour-plan__svg {
  width: 100%;
  height: 100%;
}
.tour-plan__svg rect {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 1;
}
.tour-plan__dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.tour-plan__dot span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.tour-plan__dot.is-active span {
  background: #c9a54f;
  transform: scale(1.4);
  box-shadow: 0 0 0 5px rgba(201, 165, 79, 0.24);
}

/* Status */
.tour-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.9rem;
  z-index: 4;
  background: rgba(10, 14, 12, 0.72);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}
.tour-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #c9a54f;
  animation: tour-spin 0.9s linear infinite;
}
@keyframes tour-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile */
@media (max-width: 720px) {
  .tour-bottombar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.6rem;
  }
  .tour-plan {
    width: 108px;
    align-self: flex-end;
  }
  .tour-room img {
    width: 78px;
    height: 46px;
  }
  .tour-arrow {
    width: 46px;
    height: 46px;
    top: auto;
    bottom: 42%;
    transform: none;
  }
  .tour-btn {
    font-size: 0.8rem;
    padding: 0 0.7rem;
  }
  .tour-topbar {
    grid-template-columns: auto 1fr auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour-stage,
  .tour-btn,
  .tour-room,
  .tour-arrow {
    transition: none;
  }
}

/* Globale Overlays während des Rundgangs ausblenden */
body:has(.tour-shell) .wa-btn,
body:has(.tour-shell) .aura,
body:has(.tour-shell) .aura__panel,
body:has(.tour-shell) .aura__launcher {
  display: none !important;
}
