/* Visor de tours 360 (Marzipano) — ver public/assets/js/vistas360-viewer.js */
:root { color-scheme: light dark; }

.vista360-viewer-wrap {
  position: relative;
  width: 100%;
  height: min(80vh, 640px);
  background: #111;
  border-radius: 12px;
  overflow: hidden;
}

#pano { position: absolute; inset: 0; }

#sceneTitle {
  position: absolute; top: 14px; left: 14px; z-index: 10;
  padding: 6px 14px; border-radius: 8px; background: rgba(0,0,0,0.55);
  color: #fff; font-size: 14px; font-family: -apple-system, system-ui, sans-serif;
}

#vista360-thumbstrip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 8px; padding: 10px; overflow-x: auto;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.vista360-thumb {
  flex-shrink: 0; width: 96px; border: 2px solid transparent; border-radius: 8px;
  background: rgba(20,20,25,0.75); cursor: pointer; padding: 0; overflow: hidden;
  font-family: -apple-system, system-ui, sans-serif;
}

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

.vista360-thumb span {
  display: block; font-size: 10.5px; color: #fff; padding: 3px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.vista360-thumb--active {
  border-color: #ffdc96;
}

/* Panel de plano — opcional, solo se arma si el tour tiene un plano
   cargado (ver vistas360-viewer.js). Posicionado dentro de
   .vista360-viewer-wrap (relative), no fixed al viewport, porque este
   visor vive dentro de una tarjeta/sección, no es una página inmersiva
   de pantalla completa. */
.vista360-plan-toggle {
  position: absolute; right: 14px; bottom: 14px; z-index: 20;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 18px;
}

.vista360-plan-panel {
  position: absolute; right: 14px; bottom: 64px; z-index: 20;
  width: min(260px, 60%); border-radius: 12px; overflow: hidden;
  background: rgba(20,20,22,0.92); border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.vista360-plan-panel[hidden] { display: none; }

.vista360-plan-imgwrap { position: relative; width: 100%; }

.vista360-plan-imgwrap img { display: block; width: 100%; height: auto; }

.vista360-planmarker {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: 2px solid #333;
  transform: translate(-50%, -50%); cursor: pointer;
}

.vista360-planmarker--active {
  background: #ffdc96; border-color: #333; width: 20px; height: 20px;
}

/* Lightbox de galería — fotos normales de una escena sin recorrido 360. */
.vista360-lightbox {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
}

.vista360-lightbox[hidden] { display: none; }

.vista360-lightbox-img {
  max-width: 80%; max-height: 80%; object-fit: contain; border-radius: 6px;
}

.vista360-lightbox-close,
.vista360-lightbox-prev,
.vista360-lightbox-next {
  position: absolute; border: none; background: rgba(255,255,255,0.15); color: #fff;
  cursor: pointer; border-radius: 50%; font-size: 20px; line-height: 1;
}

.vista360-lightbox-close {
  top: 14px; right: 14px; width: 36px; height: 36px;
}

.vista360-lightbox-prev,
.vista360-lightbox-next {
  top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 26px;
}

.vista360-lightbox-prev { left: 14px; }
.vista360-lightbox-next { right: 14px; }

.vista360-lightbox-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 12.5px; background: rgba(0,0,0,0.5); padding: 3px 10px; border-radius: 10px;
  font-family: -apple-system, system-ui, sans-serif;
}

.vista360-no-pano-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #ccc; font-family: -apple-system, system-ui, sans-serif; font-size: 14px; text-align: center; padding: 20px;
}

/* Vista 3D "casa de muñecas" — ver public/assets/js/vistas360-dollhouse.js */
.vista360-3d-toggle {
  position: absolute; right: 62px; bottom: 14px; z-index: 20;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 18px;
}

.vista360-3d-panel {
  position: absolute; inset: 0; z-index: 25; background: #e8ecf1;
}

.vista360-3d-panel[hidden] { display: none; }

.vista360-3d-panel canvas { display: block; width: 100%; height: 100%; }

.vista360-3d-close {
  position: absolute; top: 14px; right: 14px; z-index: 26;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 18px;
}

.vista360-credito { margin: 12px 4px 0; font-size: 14px; line-height: 1.5; opacity: .85; }
.vista360-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.vista360-card { display: block; border-radius: 12px; overflow: hidden; background: #111; color: #fff; text-decoration: none; position: relative; }
.vista360-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.vista360-card:hover img { transform: scale(1.04); }
.vista360-card-body { position: absolute; inset: auto 0 0 0; padding: 36px 14px 12px; background: linear-gradient(to top, rgba(0,0,0,.85), transparent); }
.vista360-card-body h3 { margin: 0 0 2px; font-size: 17px; color: #fff; }
.vista360-card-body span { font-size: 13px; opacity: .85; }
.vista360-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
