/* 360° Standalone Web Viewer (WebRotate 360 SpotEditor style) */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 24px 16px;
  user-select: none;
}
.viewer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 820px;
}
.viewer-brand {
  font-size: 11px;
  color: #a0a0a0;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-align: center;
}
.viewer-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
}
.viewer-canvas-wrap {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
  background: #ffffff;
}
.viewer-canvas-wrap:active {
  cursor: grabbing;
}
canvas#viewerCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}
.viewer-canvas-wrap.is-zoomed canvas#viewerCanvas {
  transform: scale(1.6);
  cursor: move;
}
.hotspot-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hotspot-svg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.polygon-shape {
  pointer-events: auto;
  cursor: pointer;
  transition: fill 0.15s ease, fill-opacity 0.15s ease, stroke 0.15s ease;
}
.hotspot-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 20;
}
.hotspot-marker.is-polygon-marker {
  width: 0;
  height: 0;
  pointer-events: none;
}
.hotspot-marker.is-polygon-marker .hotspot-popup {
  pointer-events: auto;
}
.hotspot-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #00a2e8;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.hotspot-marker:hover .hotspot-pin {
  transform: scale(1.15);
}
.hotspot-popup {
  position: absolute;
  background: #ffffff;
  color: #1e293b;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
  border: 1px solid #e2e8f0;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  min-width: 150px;
  max-width: 280px;
  display: none;
  z-index: 30;
  pointer-events: auto;
  animation: popupFadeIn 0.15s ease-out;
}
.hotspot-popup.pos-right {
  left: calc(100% + 12px);
  top: 50%;
  bottom: auto;
  right: auto;
  transform: translateY(-50%);
}
.hotspot-marker.is-polygon-marker .hotspot-popup.pos-right {
  left: 14px;
}
.hotspot-popup.pos-left {
  right: calc(100% + 12px);
  top: 50%;
  bottom: auto;
  left: auto;
  transform: translateY(-50%);
}
.hotspot-marker.is-polygon-marker .hotspot-popup.pos-left {
  right: 14px;
}
.hotspot-popup.pos-top {
  bottom: calc(100% + 12px);
  left: 50%;
  top: auto;
  right: auto;
  transform: translateX(-50%);
}
.hotspot-popup.pos-bottom {
  top: calc(100% + 12px);
  left: 50%;
  bottom: auto;
  right: auto;
  transform: translateX(-50%);
}
@keyframes popupFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hotspot-popup.active { display: block; }
.hotspot-popup img {
  width: 100%;
  border-radius: 4px;
  margin-top: 6px;
  display: block;
}
.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  padding: 4px 8px;
}
.tb-btn {
  background: transparent;
  border: none;
  color: #666666;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.12s ease, transform 0.1s ease;
  padding: 0;
}
.tb-btn:hover {
  color: #111111;
  transform: scale(1.15);
}
