:root {
  --bg: #07101e;
  --text: #f8fafc;
  --muted: #b8c1cf;
  --accent: #176fff;
  --accent-dark: #0758db;
  --danger: #e34b57;
  --dock: rgba(8, 12, 20, .94);
  --dock-line: rgba(255,255,255,.13);
  --shadow: 0 22px 70px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.tour-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

#panorama {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tour-heading {
  position: absolute;
  top: 18px;
  left: 64px;
  z-index: 10;
  display: grid;
  gap: 3px;
  max-width: min(430px, calc(100vw - 44px));
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px 16px 0 16px;
  color: #fff;
  background: rgba(7, 13, 24, .72);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 42px rgba(0,0,0,.24);
  pointer-events: none;
}

.tour-heading small {
  overflow: hidden;
  color: rgba(255,255,255,.68);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tour-heading strong {
  overflow: hidden;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-error {
  position: absolute;
  top: 92px;
  left: 22px;
  z-index: 12;
  max-width: min(430px, calc(100vw - 44px));
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255,137,150,.55);
  border-radius: 13px 13px 0 13px;
  color: #ffd6dc;
  background: rgba(102, 18, 32, .88);
  box-shadow: var(--shadow);
}

/* Menu inferior com miniaturas */
.scene-dock {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  min-height: 104px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-top: 1px solid var(--dock-line);
  background: linear-gradient(180deg, rgba(8,12,20,.90), var(--dock));
  box-shadow: 0 -18px 48px rgba(0,0,0,.28);
  backdrop-filter: blur(15px);
  transition: min-height .22s ease, padding .22s ease;
}

.scene-dock.is-collapsed {
  left: auto;
  min-height: 50px;
  grid-template-columns: 44px 52px;
  padding: 5px 10px;
  border: 1px solid var(--dock-line);
  border-right: 0;
  border-bottom: 0;
  border-radius: 15px 0 0 0;
}

.scene-dock.is-collapsed .scene-list {
  display: none;
}

.dock-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px 12px 0 12px;
  color: #fff;
  background: rgba(255,255,255,.07);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.dock-icon-button:hover,
.dock-icon-button.active {
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.16);
  transform: translateY(-1px);
}

.dock-toggle__icon {
  width: 16px;
  height: 14px;
  display: block;
  background: #fff;
  transform: rotate(180deg);
  transform-origin: 50% 50%;
  transition: transform .22s ease;
  -webkit-mask: url("../icons/seta-menu.svg") center / contain no-repeat;
  mask: url("../icons/seta-menu.svg") center / contain no-repeat;
}

.scene-dock.is-collapsed .dock-toggle__icon {
  transform: rotate(0deg);
}

.dock-actions {
  display: flex;
  justify-content: flex-end;
}

.scene-list {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 4px 7px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
}

.scene-list::-webkit-scrollbar { height: 5px; }
.scene-list::-webkit-scrollbar-track { background: transparent; }
.scene-list::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(255,255,255,.30); }

.scene-thumb {
  position: relative;
  flex: 0 0 82px;
  width: 82px;
  height: 58px;
  overflow: visible;
  padding: 0;
  border: 2px solid rgba(255,255,255,.20);
  border-radius: 3px;
  background: #111827;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.24);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.scene-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.12);
  pointer-events: none;
}

.scene-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.scene-thumb:hover {
  z-index: 4;
  border-color: rgba(255,255,255,.82);
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(0,0,0,.36);
}

.scene-thumb.active {
  z-index: 3;
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--accent), 0 14px 28px rgba(0,0,0,.35);
}




.scene-tooltip {
  position: fixed;
  z-index: 40;
  max-width: min(230px, calc(100vw - 20px));
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 9px;
  color: #fff;
  background: rgba(8,12,20,.97);
  box-shadow: 0 10px 24px rgba(0,0,0,.30);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}

.scene-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: rgba(8,12,20,.97);
  transform: translate(-50%, -4px) rotate(45deg);
}

.scene-tooltip.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Hotspots customizáveis com os SVGs fornecidos */
.pnlm-hotspot-base { cursor: pointer; }

#panorama .tour-hotspot,
.pnlm-hotspot-base.tour-hotspot,
.pnlm-scene.tour-hotspot {
  width: calc(58px * var(--hotspot-size, 1)) !important;
  height: calc(58px * var(--hotspot-size, 1)) !important;
  margin-left: calc(-29px * var(--hotspot-size, 1)) !important;
  margin-top: calc(-29px * var(--hotspot-size, 1)) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  line-height: 1 !important;
  transition: opacity .18s ease;
}

#panorama .tour-hotspot::before,
#panorama .tour-hotspot::after,
.pnlm-hotspot-base.tour-hotspot::before,
.pnlm-hotspot-base.tour-hotspot::after,
.pnlm-scene.tour-hotspot::before,
.pnlm-scene.tour-hotspot::after {
  display: none !important;
}

.tour-hotspot-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  opacity: var(--hotspot-opacity, 1);
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.34));
  pointer-events: none;
  transition: filter .18s ease, transform .18s ease;
}

#panorama .tour-hotspot:hover .tour-hotspot-svg,
.pnlm-hotspot-base.tour-hotspot:hover .tour-hotspot-svg,
.pnlm-scene.tour-hotspot:hover .tour-hotspot-svg {
  filter: brightness(1.1) drop-shadow(0 13px 18px rgba(0,0,0,.40));
  transform: translateY(-1px) scale(1.04);
}

.tour-hotspot-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 5;
  padding: 8px 11px;
  border-radius: 10px 10px 0 10px;
  color: #fff;
  background: rgba(8,12,20,.94);
  box-shadow: 0 12px 30px rgba(0,0,0,.32);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 5px);
  transition: opacity .16s ease, transform .16s ease;
}

#panorama .tour-hotspot:hover .tour-hotspot-tooltip,
#panorama .tour-hotspot:focus .tour-hotspot-tooltip,
.pnlm-hotspot-base.tour-hotspot:hover .tour-hotspot-tooltip,
.pnlm-hotspot-base.tour-hotspot:focus .tour-hotspot-tooltip,
.pnlm-scene.tour-hotspot:hover .tour-hotspot-tooltip,
.pnlm-scene.tour-hotspot:focus .tour-hotspot-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hotspot-opacity-20 { opacity: .20 !important; }
.hotspot-opacity-25 { opacity: .25 !important; }
.hotspot-opacity-30 { opacity: .30 !important; }
.hotspot-opacity-35 { opacity: .35 !important; }
.hotspot-opacity-40 { opacity: .40 !important; }
.hotspot-opacity-45 { opacity: .45 !important; }
.hotspot-opacity-50 { opacity: .50 !important; }
.hotspot-opacity-55 { opacity: .55 !important; }
.hotspot-opacity-60 { opacity: .60 !important; }
.hotspot-opacity-65 { opacity: .65 !important; }
.hotspot-opacity-70 { opacity: .70 !important; }
.hotspot-opacity-75 { opacity: .75 !important; }
.hotspot-opacity-80 { opacity: .80 !important; }
.hotspot-opacity-85 { opacity: .85 !important; }
.hotspot-opacity-90 { opacity: .90 !important; }
.hotspot-opacity-95 { opacity: .95 !important; }
.hotspot-opacity-100 { opacity: 1 !important; }

.pnlm-tooltip span {
  border-radius: 10px !important;
  padding: 8px 11px !important;
  background: rgba(8,12,20,.94) !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.32) !important;
}

.pnlm-controls-container .pnlm-controls {
  border: 0 !important;
  border-radius: 11px 11px 0 11px !important;
  box-shadow: 0 8px 24px rgba(7,20,43,.18) !important;
  overflow: hidden;
}

@media (max-width: 740px) {
  .tour-heading {
    top: 12px;
    left: 54px;
    max-width: calc(100vw - 66px);
  }

  .scene-dock {
    min-height: 92px;
    grid-template-columns: 38px minmax(0,1fr) 42px;
    gap: 6px;
    padding: 8px 8px;
  }

  .dock-icon-button {
    width: 36px;
    height: 36px;
  }

  .scene-thumb {
    flex-basis: 70px;
    width: 70px;
    height: 50px;
  }

  .scene-list {
    justify-content: flex-start;
    padding-inline: 3px;
  }

  .scene-dock.is-collapsed {
    grid-template-columns: 38px 42px;
  }

  #panorama .tour-hotspot,
  .pnlm-hotspot-base.tour-hotspot,
  .pnlm-scene.tour-hotspot {
    width: calc(46px * var(--hotspot-size, 1)) !important;
    height: calc(46px * var(--hotspot-size, 1)) !important;
    margin-left: calc(-23px * var(--hotspot-size, 1)) !important;
    margin-top: calc(-23px * var(--hotspot-size, 1)) !important;
  }
}

/* V18 — ajustes visuais por ambiente */
#panorama {
  --tour-image-filter: none;
  --tour-sun-opacity: 0;
}

#panorama .pnlm-render-container,
#panorama canvas {
  filter: var(--tour-image-filter, none);
  transition: filter .18s ease;
}

#panorama.tour-sun-effect::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  opacity: var(--tour-sun-opacity, 0);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.70) 0 2%, rgba(255,226,141,.30) 8%, rgba(255,226,141,.10) 16%, transparent 34%),
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.24), transparent 12%),
    linear-gradient(135deg, rgba(255,246,210,.16), transparent 48%);
  mix-blend-mode: screen;
}

.scene-audio-toggle {
  position: absolute;
  z-index: 18;
  right: 18px;
  top: 22px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px 14px 0 14px;
  color: #fff;
  background: rgba(8,12,20,.74);
  box-shadow: 0 16px 42px rgba(0,0,0,.24);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-weight: 850;
}

.scene-audio-toggle:hover,
.scene-audio-toggle.is-playing {
  border-color: rgba(255,255,255,.42);
  background: rgba(23,111,255,.86);
}

@media (max-width: 740px) {
  .scene-audio-toggle {
    top: auto;
    right: 12px;
    bottom: 104px;
    min-height: 38px;
    padding: 8px 11px;
    font-size: 12px;
  }
}
