/* Estilos generales del cuerpo y otros elementos */
body {
  margin: 0;
  overflow: hidden;
  background-color: #000;
  font-family: sans-serif;
}

#renderCanvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}

html, body {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

#renderCanvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Contenedor del botón de captura unificado */
#unified-capture-container {
  position: absolute;
  pointer-events: none;
  touch-action: none;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 997;
}

#unified-capture-btn {
  position: absolute;
  pointer-events: auto;
  touch-action: auto;
  width: 70px; /* Ajusta el tamaño del botón */
  height: 70px;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333; /* Color de fondo del botón */
  border: 2px solid white; /* Borde blanco para el círculo interior */
  border-radius: 50%; /* Para hacerlo redondo */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#unified-capture-btn:active {
  background-color: #555; /* Color cuando está presionado */
}

/* Contenedor del preview */
#capture-preview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0; /* Asegura que cubra todo el ancho */
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Contenido del preview (imagen y video) */
.preview-content {
  max-width: 90%;
  max-height: 70%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-content img,
.preview-content video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

/* Botones dentro del preview */
.close-btn,
.share-btn {
  padding: 0.8em 1.5em;
  border: none;
  background: #444;
  color: #fff;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 15px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 0.5em;
  line-height: 1;
}

.share-btn {
  background: #007bff;
}

.share-btn:hover {
  background: #0056b3;
}

/* Clases para ocultar/mostrar elementos */
.hidden {
  display: none !important;
}

/* capture.css */

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(70,90,255, 0.7); /* Fondo negro con 50% de transparencia */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 998; /* Asegura que esté por encima de otros elementos */
  opacity: 0; /* Start fully transparent */
  visibility: hidden; /* Start hidden to prevent interaction */
  /* Transition for fade-out: opacity fades, then visibility changes after opacity transition */
  transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
}

#loading-overlay.show {
  opacity: 1; /* Fully visible */
  visibility: visible; /* Make it visible */
  /* Transition for fade-in: opacity fades, visibility changes immediately */
  /* The transition-delay: 0s ensures any inherited delay for visibility is overridden */
  transition-delay: 0s;
}

.loading-spinner {
  width: 60px; /* Ancho del spinner */
  height: 60px; /* Alto del spinner */
  border: 7px solid rgba(255, 255, 255, 0.25); /* Borde del círculo base, color claro semi-transparente */
  border-top-color: #ffffff; /* Color del segmento que gira, blanco opaco */
  border-radius: 50%; /* Hace que el borde sea circular */
  animation: spin 1s linear infinite; /* Animación de rotación */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Contenedor de los botones de captura */
.capture-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 10px;
  z-index: 999; /* Para que aparezca sobre la vista AR */
}

.capture-controls button {
  padding: 0.6em 1em;
  border: none;
  background: #333;
  color: #fff;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.capture-controls button:hover {
  background: #555;
}

.d-none{
    display: none !important;
}

#capture-close-btn {
  pointer-events: auto;
  touch-action: auto;
  position: absolute; /* Changed from absolute to fixed for viewport positioning */
  top: 15px;    /* Adjust as needed for padding from the top of the screen */
  right: 15px;   /* Adjust as needed for padding from the right of the screen */
  background-color: white;
  color: black;
  border: 1px solid black;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  z-index: 1000; /* Ensure it's above the capture button, may need adjustment depending on other elements */
}

#recording-border-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border: 5px solid red;
  box-sizing: border-box; /* So border doesn't add to width/height */
  pointer-events: none; /* Allows clicks to go through */
  z-index: 9998; /* Below capture UI but above most other things */
}
/* Estilos para el botón de captura unificado */