/* Visor 360 iCAUR — paleta del sitio (teal #67B0C4, cream #F5F1EA) */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0A0A0A;
  color: #F5F1EA;
  font-family: Inter, "Segoe UI", system-ui, Arial, sans-serif;
}

/* --- Escenas (exterior / interior) --- */
.stage { display: none; width: 100%; height: 100%; }
.stage.active { display: block; }
#exterior-viewer, #interior-viewer { width: 100%; height: 100%; }

/* --- Overlay de carga --- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #0A0A0A;
  transition: opacity 0.4s ease;
}
.overlay.hidden { opacity: 0; pointer-events: none; }

.overlay-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.bar {
  width: 180px;
  height: 2px;
  border-radius: 2px;
  background: rgba(245, 241, 234, 0.15);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: #67B0C4;
  transition: width 0.25s ease;
}
.overlay-pct { font-size: 12px; color: rgba(245, 241, 234, 0.55); }

/* --- Error --- */
.error {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #0A0A0A;
  font-size: 14px;
  text-align: center;
  padding: 24px;
}
.error[hidden] { display: none; }
.error button {
  padding: 10px 22px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F5F1EA;
  background: transparent;
  border: 1px solid rgba(103, 176, 196, 0.6);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.error button:hover { background: rgba(103, 176, 196, 0.2); }

/* --- Pista del interior --- */
.hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 800;
  font-size: 14px;
  color: rgba(245, 241, 234, 0.6);
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.hint[hidden] { display: none; }

/* --- Controles del pie --- */
.controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 810;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mode-toggle {
  display: flex;
  overflow: hidden;
  border-radius: 25px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(245, 241, 234, 0.12);
  backdrop-filter: blur(12px);
}
.mode-btn {
  padding: 9px 26px;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.55);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.mode-btn:hover { color: rgba(245, 241, 234, 0.85); }
.mode-btn.active { color: #F5F1EA; background: rgba(103, 176, 196, 0.25); }
.mode-btn:focus-visible { outline: 2px solid #67B0C4; outline-offset: -2px; }

.color-bar {
  display: flex;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 241, 234, 0.12);
  backdrop-filter: blur(12px);
}
.color-bar[hidden] { display: none; }

.swatch {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.swatch:hover { transform: scale(1.15); }
.swatch:focus-visible { outline: 2px solid #67B0C4; outline-offset: 3px; }
.swatch.active {
  border-color: #F5F1EA;
  box-shadow: 0 0 12px rgba(103, 176, 196, 0.5);
}

.swatch .label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 10px;
  white-space: nowrap;
  color: #F5F1EA;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.swatch:hover .label,
.swatch:focus-visible .label { opacity: 1; }

/* El navbar de photo-sphere-viewer va oculto: usamos nuestros controles */
.psv-container { background: #0A0A0A; }

@media (max-width: 640px) {
  .controls { bottom: 14px; gap: 9px; }
  .mode-btn { padding: 8px 18px; font-size: 10px; }
  .color-bar { gap: 9px; padding: 8px 14px; }
  .swatch { width: 26px; height: 26px; }
}
