/* Contenedor principal */
.babylonjs-360-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
}

.babylonjs-360-viewer.fullscreen-active {
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 9999;
}

.babylonjs-360-viewer.fullscreen-active canvas {
  width: 100%;
  height: 100%;
}

/* Panel de controles */
.babylonjs-360-viewer .viewer-controls {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 9vh;
  left: 0;
  pointer-events: none;
  -webkit-transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
  z-index: 20;
}

/* Grupos de controles */
.babylonjs-360-viewer .reset-complete {
  position: absolute;
  bottom: 29vh;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  z-index: 25;
}

.babylonjs-360-viewer .zoom-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.babylonjs-360-viewer .rotation-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  pointer-events: auto;
}

.babylonjs-360-viewer .horizontal-rotations {
  display: flex;
  gap: 10px;
}

/* Botones */
.babylonjs-360-viewer .viewer-controls button {
  background: rgba(255, 255, 255, 0);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 30px !important;
  height: 30px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  color: #333;
  padding: 0;
  pointer-events: auto;
}

/* Hover */
.babylonjs-360-viewer .viewer-controls button:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* D-Pad */
.babylonjs-360-viewer .directional-pad {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  pointer-events: auto;
}

.babylonjs-360-viewer .dpad-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.babylonjs-360-viewer .dpad-cell {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Iconos */
.babylonjs-360-viewer .viewer-controls button i {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  display: block;
  text-align: center;
  color: #333;
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Hover icono */
.babylonjs-360-viewer .viewer-controls button:hover i {
  color: #0066cc;
}

.babylonjs-360-viewer.fullscreen-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999;
  background-color: white !important;
}

/* Controles de video */
.babylonjs-360-viewer .video-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  z-index: 10;
}

.babylonjs-360-viewer .video-controls button {
  background: rgba(255, 255, 255, 0);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #333;
  transition: all 0.2s ease;
  padding: 0;
  cursor: pointer;
}

.babylonjs-360-viewer .video-controls button:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.babylonjs-360-viewer .video-controls button i {
  font-size: 25px !important;
  width: 25px !important;
  height: 25px !important;
  line-height: 25px !important;
  display: block;
  text-align: center;
  color: #333;
  pointer-events: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.babylonjs-360-viewer .video-controls button:hover i {
  color: #0066cc;
}

.babylonjs-360-viewer .video-controls input[type="range"] {
  height: 5px;
  flex-grow: 1;
  accent-color: #0066cc;
  background: #333;
  border-radius: 5px;
  appearance: none;
}

.babylonjs-360-viewer .video-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  border: 1px solid #333;
  cursor: pointer;
}
.babylonjs-360-viewer .video-controls input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  border: 1px solid #333;
  cursor: pointer;
}

.babylonjs-360-viewer .video-controls .volume-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.babylonjs-360-viewer .video-controls .volume-container input#volumeSlider {
  position: absolute;
  bottom: 80px;
  left: 42.5%;
  transform: translateX(-50%) rotate(-90deg);
  width: 100px;
  height: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  background: #333;
  border-radius: 5px;
  appearance: none;
  accent-color: #0066cc;
  z-index: 5;
}

.babylonjs-360-viewer .video-controls .volume-container input#volumeSlider.visible {
  opacity: 1;
  pointer-events: auto;
}

.babylonjs-360-viewer .video-controls .progress-wrapper {
  flex: 1;
  margin-right: 45px; /* Reserva espacio para que el botón no se traslape */
}

.babylonjs-360-viewer .video-controls .progress-wrapper input[type="range"] {
  width: 100%;
  height: 5px;
  accent-color: #0066cc;
  background: #333;
  border-radius: 5px;
  appearance: none;
}
