/* ============================================
   TOUR FLOOR PLAN — corner widget with room dots and view cone
   ============================================ */

.tour-floorplan {
  position: fixed;
  left: 1rem;
  bottom: calc(var(--toolbar-h) + var(--thumb-h) + 1rem);
  z-index: var(--z-compass);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  pointer-events: none;
}
.tour-floorplan[hidden] { display: none; }
.tour-floorplan > * { pointer-events: auto; }

.fp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--c-line);
  border-radius: 50px;
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--c-text-strong);
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  order: 2;
}
.fp-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tour-floorplan.open .fp-toggle { color: var(--c-accent); }

.fp-panel {
  width: 280px;
  padding: 10px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: var(--c-surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transform-origin: bottom left;
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  order: 1;
}
.tour-floorplan:not(.open) .fp-panel {
  opacity: 0;
  transform: scale(0.92) translateY(8px);
  pointer-events: none;
  position: absolute;
  bottom: 100%;
}

.fp-stage { position: relative; line-height: 0; }
.fp-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
}

.fp-cone {
  position: absolute;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 0.5s, top 0.5s;
}
.fp-cone path { fill: rgba(200, 149, 108, 0.45); stroke: rgba(200, 149, 108, 0.9); stroke-width: 1; }

.fp-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2a2622;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, background 0.2s;
}
.fp-dot:hover { transform: translate(-50%, -50%) scale(1.3); background: var(--c-accent); }
.fp-dot.active { background: var(--c-accent); width: 16px; height: 16px; z-index: 1; }
.fp-dot:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.fp-dot-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(20, 18, 15, 0.85);
  color: #f5f0ea;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.fp-dot:hover .fp-dot-label,
.fp-dot:focus-visible .fp-dot-label { opacity: 1; }

@media (max-width: 768px) {
  .tour-floorplan { left: 0.6rem; bottom: calc(var(--toolbar-h) + var(--thumb-h) + 0.6rem); }
  .fp-panel { width: 190px; padding: 6px; }
  .fp-dot { width: 12px; height: 12px; }
  .fp-cone { width: 56px; height: 56px; }
}

/* ═══ Clean full screen: only the panorama + a small white × ═══ */
.tour-exit-fs { display: none; }

body.tour-immersive .tour-header,
body.tour-immersive .tour-toolbar,
body.tour-immersive .tour-thumbnails,
body.tour-immersive .tour-floorplan,
body.tour-immersive .tour-compass,
body.tour-immersive .tour-hint,
body.tour-immersive .tour-info-panel,
body.tour-immersive .hotspot-tooltip { display: none !important; }

body.tour-immersive .tour-exit-fs {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: var(--z-modal, 10000);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}
body.tour-immersive .tour-exit-fs:hover,
body.tour-immersive .tour-exit-fs:focus-visible { opacity: 1; background: rgba(0, 0, 0, 0.5); }
.tour-exit-fs svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
