body {
      margin: 0;
      font-family: sans-serif;
      background-color: #f5f5f5;
      overflow: hidden;
    }

    header {
      background-color: #f6f6f6;
      color: white;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px 20px;
    }

    header img.logo {
      height: 50px;
      
    }

    header .idioma {
      font-weight: bold;
    }

    .lang-option{
      color:white;
    }

    .camera-container {
      position: relative;
      width: 100%;
      height: calc(100vh - 65px); /* Resto del espacio tras el header */
      overflow: hidden;
      background: black;
    }

    video#video {
      width: 100vw;
      height: 100vh;
      object-fit: contain;  /* Muestra TODO el video sin recortar */
    }
    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    .btn {
      position: absolute;
      background-color: transparent;
      padding: 10px;
      border: 'none';
      color: rgba(255, 255, 255, 0);
      cursor: pointer;
      pointer-events: auto;
    }

   .btn-back {
    background-color: transparent;
  position: absolute;
  left: 15px;
  top: 2vh; /* Ajuste proporcional con vh */
  z-index: 999;
  border: none;
  border-radius: 0;

}

.btn-flash {
  position: absolute;
  top: 2vh; /* Mismo valor que .btn-back para alineación */
  left: 60px;
  z-index: 999;
}

.btn-back img, 
.btn-flash img {
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: none;
  border-radius: 0;
}


    .focus-frame {
      position: absolute;
      top: 45%;
      left: 50%;
      transform: translate(-50%, -50%);
      pointer-events: none;
    }

    .btn-capture {
      position: absolute;
      bottom: 15vh;
      left: 50%;
      transform: translateX(-50%);
      background-color: transparent;
      width: 70px;
      height: 70px;
      display: flex;
      justify-content: center;
      align-items: center;
      pointer-events: auto;
      border: none;
      border-radius: 0;
    }


    .btn-capture img {
      width: 80px;
      height: 80px;
    }


    /* Overlay de resultados */
.result-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.result-actions button:active {
    background-color: rgba(0, 0, 0, 0.1); /* efecto de sombreado al click */
    transform: scale(0.95);
}


.result-card {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: fixed;
    left: 50%;
    
    top: clamp(5vh, 50%, calc(100% - 5vh));
    transform: translate(-50%, -50%);
}

.result-header {
    background: #2a8b61;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    
}

    .result-header h3 {
        margin: 0;
        font-size: 1.2rem;
        text-align: center;
    }

.confidence-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: bold;
}

.result-content {
  padding: 20px;
  text-align: center;
}

.main-container-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 15px;
  display: block;
}

.residue-info {
  text-align: left;
}

.info-row {
  margin-bottom: 15px;
}

.info-label {
    font-weight: bold;
    color: #555;
    display: block;
    margin-bottom: 15px;
    text-align: center;
    background: #f0f0f0;
    border-radius: 15px;
    padding: 7px;
}

.container-badges {
    
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    justify-content: center;
}

.container-badge {
  
  padding: 6px 12px;
  
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.container-badge img {
    width: 35px;
    height: 25px;
    object-fit: contain;
    display: block; 
}


.result-actions {
    display: flex;
    border-top: 1px solid #eee;
    transition: transform 0.2s, width 0.2s, height 0.2s;
}

.action-btn {
  flex: 1;
  padding: 15px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.btn-aceptar {
  background: #2a8b61;
  color: white;
  flex: 1;
  padding: 15px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}


.result-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
  flex-direction: column;
}

.photo-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  z-index: -1;
}



.cancel-button {
    background: #e74c3c;
    color: white;
    margin-top: 10px;
    margin-bottom: 15px;
}

.galeria-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.galeria-confirm-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    text-align: center;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.confirm-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#confirmar-galeria {
    background: #4CAF50;
    color: white;
}

#cancelar-galeria {
    background: #f44336;
    color: white;
}

.info-value {
    display: block;
    max-height: 350px; 
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    word-break: break-word;
}

/* Fondo del modal */
.modal-encuesta {
    display: none; /* se mantiene oculto al inicio */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Caja del modal */
.modal-contenido {
    background: white;
    display: flex; /* flex vertical */
    flex-direction: column; /* columna para orden: título → estrellas → botón */
    gap: 15px; /* separación entre elementos */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

    /* Título */
    .modal-contenido h2 {
        margin: 0;
        font-size: 20px;
        font-weight: bold;
    }

/* Estrellas */
.estrellas {
    display: flex;
    justify-content: center;
    font-size: 30px;
}

.estrella {
    cursor: pointer;
    margin: 0 5px;
    color: #ccc;
    transition: color 0.2s ease;
}

    .estrella.activa {
        color: #FFD700; /* Amarillo dorado */
    }

/* Botón */
.btn-encuesta {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

    .btn-encuesta:hover {
        background-color: #45a049;
    }



/* Tablets (pantallas medianas) */
@media (max-width: 1024px) {
    .info-value {
        max-height: 350px;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .info-value {
        max-height: 300px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .info-value {
        max-height: 200px;
        font-size: 0.9rem; /* texto un pelín más pequeño si quieres */
    }
}




    /* Opcional: estilo de scrollbar para navegadores Webkit (Chrome, Edge, Safari) */
    .info-value::-webkit-scrollbar {
        width: 6px;
    }

    .info-value::-webkit-scrollbar-track {
        background: transparent;
    }

    .info-value::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
    }