/* Shared tour styles: viewer, hotspots, info popup. */
.tour-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
.tour-viewer {
  position: absolute;
  inset: 0;
}

/* Hotspots */
.hs {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transform: translateZ(0);
}
.hs-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 42, 61, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease, background 0.2s ease;
}
.hs-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.hs:hover .hs-icon {
  transform: scale(1.12);
  background: #2b9bff;
  color: #fff;
}
.hs-label {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: 600 13px/1.2 'Segoe UI', system-ui, sans-serif;
  white-space: nowrap;
}
.hs-info .hs-icon {
  width: 34px;
  height: 34px;
  font: italic 700 18px/1 Georgia, serif;
  background: rgba(255, 255, 255, 0.85);
  color: #0f2a3d;
}
.hs.is-selected .hs-icon {
  outline: 3px solid #4fc3f7;
  outline-offset: 3px;
  animation: hs-pulse 1.2s ease-in-out infinite;
}
@keyframes hs-pulse {
  50% { outline-offset: 7px; }
}

/* Editor: hotspots can be dragged */
.tour-viewer.hs-grab .psv-container,
.tour-viewer.hs-grab .psv-canvas-container { cursor: grab !important; }
.tour-viewer.hs-dragging .psv-container,
.tour-viewer.hs-dragging .psv-canvas-container { cursor: grabbing !important; }

/* Mini floor map */
.floor-map {
  position: absolute;
  z-index: 110;
  left: 16px;
  top: 72px;
  width: 220px;
  height: 220px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(10, 18, 26, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}
.floor-map[hidden], .floor-map.user-hidden { display: none; }
.floor-map svg { width: 100%; height: 100%; overflow: visible; }
.fm-lines line { stroke: rgba(255, 255, 255, 0.35); stroke-linecap: round; }
.fm-cone { fill: rgba(43, 155, 255, 0.35); stroke: none; pointer-events: none; }
.fm-dot { cursor: pointer; }
.fm-dot circle:not(.fm-hit) { fill: #fff; stroke: rgba(15, 42, 61, 0.9); stroke-width: 0.06; transition: fill 0.2s; }
.fm-dot .fm-hit { fill: transparent; }
.fm-dot:hover circle:not(.fm-hit) { fill: #4fc3f7; }
.fm-dot.current circle:not(.fm-hit) { fill: #2b9bff; }
@media (max-width: 600px) {
  .floor-map { width: 140px; height: 140px; top: 64px; }
}

/* 3D dollhouse plan */
.dollhouse {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: radial-gradient(ellipse at 50% 40%, #a7adb4 0%, #7e858d 70%, #6c737b 100%);
}
.dollhouse[hidden] { display: none; }
.dollhouse canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.dh-labels { position: absolute; inset: 0; pointer-events: none; }
.dh-label { position: absolute; left: 0; top: 0; }
.dh-room {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 42, 61, 0.78);
  color: #fff;
  font: 600 12px/1.2 'Segoe UI', system-ui, sans-serif;
  white-space: nowrap;
}
.dh-tip {
  position: absolute;
  padding: 5px 10px;
  border-radius: 8px;
  background: #fff;
  color: #0f2a3d;
  font: 600 13px/1.2 'Segoe UI', system-ui, sans-serif;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  pointer-events: none;
}
.dh-tip[hidden] { display: none; }
.dh-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font: 12px 'Segoe UI', system-ui, sans-serif;
  pointer-events: none;
}
.dh-close {
  position: absolute;
  z-index: 310;
  top: 16px;
  right: 16px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f2a3d;
  font: 600 13px 'Segoe UI', system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.dh-close[hidden] { display: none; }

/* Client contact card */
.contact-card {
  position: absolute;
  z-index: 210;
  top: 72px;
  right: 16px;
  width: min(300px, calc(100% - 32px));
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  color: #1d2733;
  font: 14px/1.45 'Segoe UI', system-ui, sans-serif;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.contact-card[hidden] { display: none; }
.contact-card h3 { margin: 0 24px 2px 0; font-size: 16px; }
.contact-card .cc-name { margin: 0 0 10px; color: #5b6b7a; }
.contact-card .cc-logo { max-width: 120px; max-height: 56px; margin-bottom: 10px; object-fit: contain; }
.contact-card .cc-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 4px 0; border-top: 1px solid #eef1f4; }
.contact-card .cc-row span { color: #5b6b7a; font-size: 12px; }
.contact-card a { color: #0f6fae; text-decoration: none; word-break: break-word; }

/* Info popup */
.tour-popup {
  position: absolute;
  z-index: 200;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  width: min(380px, calc(100% - 32px));
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #1d2733;
  font: 14px/1.5 'Segoe UI', system-ui, sans-serif;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.tour-popup[hidden] {
  display: none;
}
.tour-popup h3 {
  margin: 0 24px 6px 0;
  font-size: 16px;
}
.tour-popup p {
  margin: 0;
}
.tour-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #5b6b7a;
}
