/* CAD Creative Studio - 360 viewer tiles. Square, responsive, self-hosted. */
.pano {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111;
  isolation: isolate;
}
.pano-poster,
.pano-snap,
.pano-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.pano-poster { object-fit: cover; z-index: 0; }
.pano-snap { z-index: 1; object-fit: cover; }
.pano-canvas {
  z-index: 2;
  cursor: grab;
  /* vertical swipes keep scrolling the page; horizontal drags turn the view */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.pano-canvas.grabbing { cursor: grabbing; }
.pano-canvas:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

.pano-msg {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
  font: 14px/1.4 Arial, Helvetica, sans-serif;
  text-align: center;
  pointer-events: none;
}
.pano[data-state="error"] .pano-poster,
.pano[data-state="error"] .pano-snap { filter: brightness(0.45); }
.pano[data-state="loading"] .pano-poster,
.pano[data-state="restoring"] .pano-poster { filter: brightness(0.8); }

/* "360 / Explore the space": a black block centred on the tile, both lines centred inside it.
   It never takes pointer input and fades once the visitor starts exploring (site.js adds .pano-touched). */
.pano-badge {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: clamp(10px, 1.7vw, 22px) clamp(16px, 2.2vw, 30px);
  background: #090909;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.35s;
}
.pano-badge-n { font: 400 clamp(30px, 3.7vw, 60px)/1 "Anton", Impact, "Arial Narrow", sans-serif; }
.pano-badge-t { margin-top: 0.7em; font: clamp(9px, 0.92vw, 13px)/1 Helvetica, Arial, sans-serif; letter-spacing: 0.02em; text-transform: uppercase; }
.pano.pano-touched .pano-badge,
.pano[data-state="error"] .pano-badge { opacity: 0; }

.pano-refresh {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #fff;
  border-radius: 0;
  background: rgba(9, 9, 9, 0.88);
  color: #fff;
  font: 12px Helvetica, Arial, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.pano-refresh:hover { background: #fff; color: #090909; }
.pano-refresh:disabled { opacity: 0.6; cursor: default; }
.pano-refresh:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px #111; }

@media (prefers-reduced-motion: no-preference) {
  .pano-poster { transition: filter 0.2s; }
}
@media (max-width: 540px) {
  .pano-refresh { top: 8px; left: 8px; height: 40px; }   /* comfortable touch target */
}
