/* Estilos globales */
body, html {
  /*  height: 100%; */
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #eeeeee; /* Fondo celeste muy claro */
    color: #209BBB; /* Color de texto global */
}

#container {
    max-width: 800px;
    background-color: #fff; /* Fondo blanco */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 70%; /* o cualquier valor que desees */
    margin: 0 auto;
    padding-top: 80px;
    padding-left: 30px;
    margin-top: 30px;
    padding-bottom: 120px;
    width: 90%;
    
}
/*Imagen de producto no encontrado*/
.notfound-img {
    width: 120px;
    height: auto;
    display: block; /* Para centrar el bloque */
    margin: 30px auto 0; /* 30px de margen superior, centrado horizontalmente */
}
/*Text product not found*/
#text-notfound {
    padding: 20px 20px 0 20px; /* Top: 20px, Right: 20px, Bottom: 0, Left: 20px */
    
    margin-top: -25px;
    height: 490;
}




/* Animación para mostrar la imagen después de 2 segundos */
@keyframes showImage {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


#scanner-container {
    position: relative;
    width: 350px;
    height: 480px;
    margin: 0 auto; /* Para centrar el contenedor */
    
    /* Ajuste responsivo para pantallas más pequeñas */
  
    box-sizing: border-box; /* Incluir padding y border en el cálculo del ancho total */
}



/*Mirilla video*/
/* Superposición del PNG transparente */
.scanner-overlay {
    position: absolute;
    top: 50%; /* Colocar en el centro vertical */
    left: 50%; /* Colocar en el centro horizontal */
    width: 350px; /* Ancho de la imagen */
    height: 150px; /* Alto de la imagen */
    transform: translate(-50%, -50%); /* Centrar ajustando en ambos ejes */
    pointer-events: none; /* Permite hacer clic a través de la superposición */
    background-image: url('/public/icons/mirilla.gif'); /* Ruta al PNG transparente */
    background-size: contain; /* Asegura que la imagen se ajuste dentro del contenedor */
    background-repeat: no-repeat; /* No repetir la imagen */
    opacity: 0; /* Imagen inicialmente invisible */
    animation: showImage 4s forwards; /* Espera 2 segundos para aparecer */
}

/* Media query para pantallas pequeñas (móviles) */
@media only screen and (max-width: 600px) {
    .scanner-overlay {
        top: 25%;
    }

 
}






#scanner-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 350px;
    height: 380px;
    pointer-events: none; /* Para evitar que el canvas interfiera con la interacción del video */
}



/* Zona para el resultado del escaneo */
#product-result {
    font-size: 18px;
    margin-top: 10px;
    text-align: left;
}

#product-result.green {
    color: #28a745;
}

#product-result.red {
    color: #dc3545;
}

/* Contenedor para el status y el botón */
.status-container {
    display: flex;
    align-items: center; /* Alinea verticalmente */
    position: relative;
    width: 100%; /* Asegura que el contenedor ocupe todo el ancho */
    margin-bottom: 20px; /* Espacio inferior */
}

/* Contenedor adicional para asegurar el centrado del círculo */
.status-indicator-wrapper {
    flex-grow: 1; /* Esto empuja el contenido de los extremos hacia los lados */
    display: flex;
    justify-content: center; /* Centra el círculo dentro de su contenedor */
}

/* Estilos para el indicador de estado del producto */
#product-status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: red; /* Solo para visualización, puedes cambiarlo */
    margin-right: -100px;
}

/* Estilos para el botón de agregar a favoritos */
#favorite-btn {
    background-color: #11B3DB;
    color: white;
    border: none;
    padding: 5px 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 10px;
    margin-left: auto; /* Mantiene el botón en el extremo derecho */
}

#favorite-btn:hover {
    background-color: #209BBB;  /* Cambia el color al pasar el cursor */
}


#product-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    margin-bottom: 20px;
}

#product-detail-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
}

#product-image {
    max-width: 100px;
    border-radius: 10px;
    margin-right: 20px;
}

#product-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

#product-name,
#product-brand {
    font-size: 18px;
    margin: 5px 0;
}

.ingredients-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    background-color: #F0F8FA; /* Fondo celeste claro */
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 90%;
    max-width: 600px;
}

.ingredients-content {
    display: flex;
    align-items: center;
}

.ingredients-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}

.ingredients-icon {
    width: 50px;
    height: 50px;
    margin-right: 20px;
}

#ingredients-list {
    font-size: 16px;
    text-align: left; /* Asegura que los ingredientes estén alineados a la izquierda */
}

.ingredients-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Asegura que el título y la imagen estén en extremos opuestos */
    margin-bottom: 10px;
}

.ingredientes-icon-img {
    width: 30%;
    height: auto;
    margin-right: 20px; /* Espacio entre la imagen y el texto */
}

.ingredients-text {
    width: 70%;
    text-align: left; /* Asegura que el texto esté alineado a la izquierda */
}

/*Zona del escaneo manual*/
/* Estilos específicos para la nueva sección "manual" */
.manual-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
    margin: 30px auto;
}

.manual-content h1 {
    color: #209BBB; /* Color azul intermedio */
    font-size: 24px;
    margin-bottom: 20px;
}

#product-code-input {
    width: 70%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #11B3DB; /* Borde azul brillante */
    font-size: 16px;
    color: #313;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

#product-name-input {
    width: 70%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #11B3DB; /* Borde azul brillante */
    font-size: 16px;
    color: #313;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

#product-code-input:focus {
    outline: none;
    border-color: #209BBB; /* Azul intermedio */
    box-shadow: 0 0 5px rgba(17, 179, 219, 0.5);
}
/*Fin zona escaneo manual*/

/* Cada sección */
.section {
    display: none; /* Ocultar todas las secciones por defecto */
    overflow: auto; /* Permite desplazamiento si el contenido es grande */
    width: 100%;
    padding-top: 20px;
}


/* Menú fijo en la parte inferior */
#menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #11b3db; /* Fondo azul claro brillante */
    color: black !important;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 10px;
    transition: background-color 0.5s ease;
}

#menu button {
    background: none;
    border: none;
    color: black;
    cursor: pointer;
    flex: 1;
    min-width: 60px;
    padding: 0;
    box-sizing: border-box;
}

#menu button img {
    max-width: 100%;
    height: 50px; /* Ajusta según tus necesidades */
    object-fit: contain;
}

#menu button:hover {
    background-color: #3AB3D2; /* Azul suave */
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 600px) {
    #menu button img {
        height: 40px; /* Ajusta según tus necesidades para pantallas pequeñas */
    }
}

.language-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em; /* Ajusta el tamaño de la fuente según sea necesario */
    margin: 5px 0; /* Margen superior e inferior */
    padding: 10px; /* Añade relleno para hacer los botones más grandes */
    transition: background-color 0.3s; /* Transición suave para el cambio de color de fondo */
}

.language-button:hover {
    background-color: #f0f0f0; /* Color de fondo al pasar el cursor */
}

.language-button:active {
    background-color: #d0d0d0; /* Color de fondo al hacer clic */
}

select {
    width: 70%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ccc; /* Agrega un borde de 1px de ancho y color gris claro */
    color: #313;
}

/* Ajuste de los estilos de la lista desplegable de alergias */
.select2-container .select2-selection--multiple {
    background-color: #ffffff; /* Fondo blanco */
    color: #333; /* Color del texto */
}

.select2-dropdown {
    background-color: #ffffff; /* Fondo blanco */
    color: #333; /* Color del texto */
}

.select2-results__option {
    color: #333; /* Color del texto de las opciones */
    background-color: #ffffff; /* Fondo blanco */
}

.select2-results__option--highlighted {
    background-color: #e6e6e6; /* Fondo gris claro cuando se resalta */
    color: #333; /* Color del texto */
}

/* Estilos para los botones con efecto de pulsación */
.botones {
    border: none;
    color: white;
    padding: 14px 28px;
    cursor: pointer;
    border-radius: 5px;
    background-color: #11B3DB; /* Azul brillante */
    transition: transform 0.3s ease-in-out; /* Transición suave del efecto de pulsación */
    margin-top: 12px;
}

.botones:hover {
    background-color: #209BBB; /* Azul intermedio */
}

.botones:active {
    transform: scale(0.90); /* Reduce ligeramente el tamaño del botón cuando se hace clic */
}

/* Estilos específicos para la sección de inicio */
.inicio-content {
   
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
   /* height: calc(100vh - 50px); *//* Altura completa menos el menú del footer */
    text-align: center;
    position: relative;
    margin-right: 0px;
    background: #eeeeee;
    color: #000000 !important;
    padding: 20px;
    display: flex;
    margin-top: 30px;
    background-color: #d6d6d6;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    margin: 70px auto 30px auto;
}

.logo {
    max-width: 250px; 
    width: 80%;
    height: auto;
    margin-bottom: 20px; /* Espacio debajo del logo */
    margin-top: 20px;
    border-radius: 5%; /* Hace que la imagen tenga bordes redondeados */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* Sombra */
}

.text {
    font-size: 18px;
    text-align: justify;
    padding:20px;
    margin:25px;
    margin-left: 10%;
    margin-right: 10%;
    margin-bottom: 55px;
}

.text a {
    color: #11B3DB; /* Enlace con color azul brillante */
    text-decoration: none;
}

.text a:hover {
    text-decoration: underline;
}

/* Estilos específicos para la sección de configuración */
.configuracion-content {
   /* padding: 20px;
    width: 100%; /* Asegúrate de que ocupe todo el ancho disponible */
    margin: 10px;
    text-align: center !important;
}

.configuracion-content h1 {
    /* Estilos específicos para los h1 dentro de .configuracion-content */
    color: #209BBB; /* Azul intermedio */
    font-size: 24px;
    text-align: center;
    width: 100%; /* Asegúrate de que ocupe todo el ancho disponible */
    margin-top: 70px;
}

.configuracion-content h2 {
    /* Estilos específicos para los h2 dentro de .configuracion-content */
    color: #209BBB; /* Azul intermedio */
    font-size: 20px;
}

/* Estilos específicos para la sección de escaneo */
.escaneo-content {
    padding: 20px;
    margin-top: 70px;
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-start; 
    align-items: center;
   
}
.scan-content {
    padding: 20px;
    margin-top: 50px;
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-start; /* Evita que el contenido desborde hacia arriba */
    align-items: center;
    
}
/* Estilos específicos para la sección de resultado */
.resultado-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Evita que el contenido se pierda arriba si es muy largo */
    text-align: center;
    margin-top: 30px;
}

/* Estilos específicos para la sección de historial */
.historial-content {
    padding: 20px;
    height: calc(100vh - 100px); /* Ajusta esta altura según sea necesario */
    overflow-y: auto; /* Habilita el scroll vertical */
}

/* Ajuste para el contenedor de la lista de historial */
#history-list {
    max-height: 100%; /* Asegura que el contenedor no exceda la altura máxima */
    overflow-y: auto; /* Habilita el scroll vertical */
}

/* Historial */
.history-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
}

.history-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
}

.history-info {
    flex: 1;
}

.history-status.suitable {
    color: #28a745;
}

.history-status.not-suitable {
    color: #dc3545;
}

.history-date {
    font-size: 0.8em;
    color: #777;
}

.history-delete, .history-details {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    margin-left: 5px;
}


/* Clase para el contenedor del formulario de registro */
.register-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding-right: 50px;
    padding-left: 50px;
}

/* Estilo general para el formulario */
.register-container form {
    display: flex;
    flex-direction: column;
}

/* Estilo para los labels */
.register-container label {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Estilo para los campos de entrada */
.register-container input[type="email"],
.register-container input[type="text"],
.register-container input[type="password"] {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* Estilo para el botón de registro */
.register-container button[type="submit"] {
    padding: 10px;
    background-color: #209BBB;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

/* Hover y focus para el botón */
.register-container button[type="submit"]:hover,
.register-container button[type="submit"]:focus {
    background-color: #5ebad2;
}

/* Estilo para los mensajes de error */
.register-container .error-message {
    color: red;
    font-size: 12px;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .register-container {
        padding: 15px;
        margin: 30px auto;
        padding-right: 50px;
        padding-left: 50px;
    }

    .register-container button[type="submit"] {
        font-size: 14px;
        padding: 8px;
    }
}


/* styles para login
/* Estilo para centrar todo el contenido en la página */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    height: auto;
    margin: 0;
    overflow-x: hidden;
}

/* Estilo para el contenedor de idiomas */
.languages {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    /*margin-top: -200px;
    gap: 10px;*/
}

.languages-ini {

    justify-content: center;
    margin-bottom: 20px;
    /*margin-top: -200px;
    gap: 10px;*/
}

/* Estilo para el contenedor de idiomas */
.languages2 {
    display: flex;
    justify-content: center;
   /* margin-bottom: 20px;
    margin-top: -200px;
    gap: 10px;*/
}

/* Quitar cualquier estilo adicional de los botones de idioma */
.language-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

/* Clase específica para los contenedores de login, reset y reset-password */
.login-container,
.reset-container,
.reset-password-container {
    max-width: 75%;
    width: 100%;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estilo para los labels del formulario */
.login-container label,
.reset-container label,
.reset-password-container label {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: bold;
    width: 100%;
}

/* Estilo para los campos de entrada del formulario */
.login-container input[type="email"],
.login-container input[type="password"],
.reset-container input[type="email"],
.reset-container input[type="password"],
.reset-password-container input[type="email"],
.reset-password-container input[type="password"] {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* Estilo para el botón de login/reset */
.login-container button[type="submit"],
.reset-container button[type="submit"],
.reset-password-container button[type="submit"] {
    padding: 10px;
    background-color: #209BBB;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s;
}

/* Hover y focus para el botón */
.login-container button[type="submit"]:hover,
.login-container button[type="submit"]:focus,
.reset-container button[type="submit"]:hover,
.reset-container button[type="submit"]:focus,
.reset-password-container button[type="submit"]:hover,
.reset-password-container button[type="submit"]:focus {
    background-color: #5ebad2;
}

/* Ajustes responsivos */
@media (max-width: 500px) {
    .login-container,
    .reset-container,
    .reset-password-container {
        padding: 15px;
    }

    .login-container button[type="submit"],
    .reset-container button[type="submit"],
    .reset-password-container button[type="submit"] {
        font-size: 14px;
        padding: 8px;
    }
}


/* Estilos página premium */
.subscription-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #f9f9f9;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative; /* Agregamos esto para posicionar elementos dentro del contenedor */
}

/* Ubicar el menú de selección de moneda en la parte superior derecha */
.subscription-container .currency-select-wrapper {
    
    top: 20px; /* Distancia desde la parte superior */
    right: 20px; /* Distancia desde la parte derecha */
}

.currency-select-wrapper label {
    font-weight: bold;
    margin-right: 10px;
}

.currency-select-wrapper select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
    border: 3px solid #209BBB;
    color: #209BBB;
    width: 30%;
}


.subscription-info {
    margin-bottom: 20px;
}

.subscription-options {
    margin-bottom: 20px;
}

.subscription-options label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

#subscribeButton {
    background-color: #11B3DB;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#subscribeButton:hover {
    background-color: #3AB3D2;
}

/* Estilos para el menú de hamburguesa */
#hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 30px;
    cursor: pointer;
    z-index: 1000;
    color: #415a60;
}


/* Estilos para el menú lateral */
.side-menu {
    height: 100%;
    width: 0;
    max-width: 320px; /* Evita que crezca desproporcionadamente en PC */
    position: fixed;
    top: 0;
    left: 0;
    background-color: #11b3db;
    overflow-x: hidden;
    overflow-y: auto; /* Permite scroll vertical si los elementos no caben */
    transition: 0.5s;
    padding-top: 60px;
    z-index: 999;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.side-menu a {
    padding: 12px 20px;
    text-decoration: none;
    font-size: 18px; /* Tamaño de letra más estético y balanceado */
    color: #fff;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.side-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15); /* Efecto hover elegante */
}

.side-menu a img {
    width: 24px !important;
    height: 24px !important;
    margin-right: 12px !important;
    margin-left: 0 !important;
    object-fit: contain;
    flex-shrink: 0;
}

.side-menu .close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.side-menu .close-btn:hover {
    transform: scale(1.1);
}

/* Para que el contenido principal no se vea afectado por el menú lateral */
#container {
    transition: margin-left 0.5s;
}

/* Botón de cierre */
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    font-weight: bold;
    font-size: 24px;
    cursor: pointer;
    color: black;
    text-decoration: none;
}

/* Ensure that the container is positioned relative so the close button can be positioned inside it */
.contact-container {
    position: relative;
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Adjust the close button to be inside the container */
.close-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    font-weight: bold;
    font-size: 24px;
    cursor: pointer;
    color: black;
    text-decoration: none;
}


.contact-container h1 {
    text-align: center;
    margin-bottom: 20px;
}

.contact-container form {
    display: flex;
    flex-direction: column;
}

.contact-container label {
    margin-bottom: 8px;
    font-weight: bold;
}

.contact-container input, 
.contact-container textarea {
    margin-bottom: 16px;
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.contact-container button {
    padding: 10px;
    font-size: 18px;
    background-color: #11B3DB;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.contact-container button:disabled {
    background-color: #ccc;
}

.contact-container p {
    text-align: center;
    color: red;
    font-size: 16px;
}


/* Estilo para el overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Superponer sobre todos los demás elementos */
}

/* Estilo para el GIF de carga */
.loading-gif {
    width: 80%; /* Reducir el tamaño del GIF al 80% */
    max-width: 150px; /* Tamaño máximo para que no sea demasiado grande */
    border-radius: 10px;
}

/* El customAlert siempre encima de cualquier otro modal */
#customAlert {
    z-index: 10001 !important;
}

/* Estilos base para el modal, o alerta personalizada */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    z-index: 9999; /* Superposición sobre todo */
    padding: 20px 0;
    box-sizing: border-box;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 80%;
    max-width: 400px;
    margin: auto; /* Centrado vertical y horizontal automático en flexbox */
    box-sizing: border-box;
}

.modal-logo {
    width: 60px;
    height: auto;
    margin-bottom: 20px;
}

.modal-button {
    padding: 10px 20px;
    margin: 10px;
    background-color: #209BBB;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-button:hover {
    background-color: #41b3d0;
}

.modal-button:active {
    transform: scale(0.98); /* Pequeña animación al hacer clic */
}

/* Responsive */
@media (max-width: 600px) {
    .modal-content {
        width: 90%;
    }
}

/* Estilos para el overlay de confirmación personalizado */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo semitransparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Por encima de todos los elementos */
}

/* Caja del mensaje de confirmación */
.custom-confirm-box {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estilo para el logo en la confirmación */
.confirm-logo {
    width: 60px;
    margin-bottom: 20px;
}

/* Estilo para los botones */
.confirm-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.confirm-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #209BBB;
    color: white;
    cursor: pointer;
    font-size: 16px;
    width: 45%;
    transition: background-color 0.3s ease;
}

.confirm-button:hover {
    background-color: #41b3d0;
}

.confirm-button[data-translate="no"] {
    background-color: #95a2a6;
}

#video-container {
    position: fixed; /* Fijar el video en toda la pantalla */
    top: 0;
    left: 0;
    width: 100vw;  /* Ancho completo de la pantalla */
    height: 100vh; /* Alto completo de la pantalla */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Asegurar que el video esté encima de otros elementos */
    background-color: black; /* Fondo negro */
}

video {
    width: 100%; /* Asegurarse de que el video ocupe todo el ancho */
    height: auto; /* Mantener la relación de aspecto del video */
    object-fit: cover; /* El video cubrirá el contenedor manteniendo la proporción */
    display: block;
}
/*TUTORIAL*/

/* Aseguramos que todo el tutorial esté por encima de los demás elementos */
#alerta {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #151717; /* Color de fondo con opacidad */
    z-index: 9999; /* Muy alto para que esté por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* El contenedor ocupa el espacio necesario para las diapositivas */
#alerta .tutorial-container {
    display: flex;
    width: calc(90vw * 5);
    transition: transform 0.5s ease-in-out;
}

#alerta .tutorial-slide {
    min-width: 90vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
}

#alerta button {
    padding: 10px 20px;
    background-color: #209BBB;
    color: white;
    border: none;
    cursor: pointer;
    margin: 10px;
}

#alerta .btn-skip {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #209BBB;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10000; /* Asegura que esté por encima de todo */
    display: block;
}

/* Aseguramos que los párrafos dentro del tutorial tengan el ancho correcto */
#alerta p {
    max-width: 250px;
    word-wrap: break-word;
    text-align: center;
}

/* Deshabilitar la interacción de los elementos debajo del tutorial */


#alerta {
    pointer-events: all; /* Solo permite interacción dentro del tutorial */
}

#alerta img {
    border-radius: 10px;
}

/* =====================================================
   EXTRA PROFILES – Premium Feature
   ===================================================== */

.extra-profiles-section {
    margin-top: 24px;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.profiles-divider {
    border: none;
    border-top: 2px solid #e0f4fb;
    margin: 24px 0 16px;
}

.profiles-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
    text-align: center;
}

/* Profile cards list */
.extra-profiles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #e8f8fd 0%, #d0f0fa 100%);
    border: 1.5px solid #b0e4f5;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(17, 179, 219, 0.10);
    transition: box-shadow 0.2s;
}

.profile-card:hover {
    box-shadow: 0 4px 16px rgba(17, 179, 219, 0.18);
}

.profile-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-card-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a6e8a;
}

.profile-card-diet {
    font-size: 12px;
    color: #209BBB;
    text-transform: capitalize;
}

.profile-card-allergies {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.profile-card-actions {
    display: flex;
    gap: 8px;
}

.btn-edit-profile,
.btn-delete-profile {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-edit-profile {
    background-color: #11B3DB;
    color: #fff;
}

.btn-delete-profile {
    background-color: #dc3545;
    color: #fff;
}

.btn-edit-profile:hover,
.btn-delete-profile:hover {
    opacity: 0.85;
}

.btn-edit-profile:active,
.btn-delete-profile:active {
    transform: scale(0.95);
}

/* Add Profile button */
.btn-add-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #11B3DB 0%, #0d8fb0 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 4px;
}

.btn-add-profile:hover {
    opacity: 0.90;
}

.btn-add-profile:active {
    transform: scale(0.97);
}

.btn-add-profile:disabled {
    background: #aaa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Inline profile form */
.profile-form-container {
    background: #f5fbfe;
    border: 1.5px solid #b0e4f5;
    border-radius: 14px;
    padding: 18px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(17, 179, 219, 0.08);
}

.profile-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.profile-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #209BBB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-name-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #b0e4f5;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.profile-name-input:focus {
    outline: none;
    border-color: #11B3DB;
    box-shadow: 0 0 0 3px rgba(17, 179, 219, 0.12);
}

.profile-diet-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #b0e4f5;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

.profile-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn-save-profile {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #11B3DB 0%, #0d8fb0 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-save-profile:hover { opacity: 0.88; }

.btn-cancel-profile {
    flex: 1;
    padding: 10px;
    background: #e9e9e9;
    color: #555;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel-profile:hover { background: #d5d5d5; }

/* Multi-profile scan results */
.multi-profile-results {
    width: 90%;
    max-width: 600px;
    margin-top: 16px;
}

.multi-profile-results h3 {
    font-size: 14px;
    color: #209BBB;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-result-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #f5fbfe;
    border: 1.5px solid #ddf0f8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.profile-result-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-result-name {
    font-weight: 700;
    font-size: 14px;
    color: #1a6e8a;
    flex: 1;
}

.profile-result-verdict {
    font-size: 13px;
    color: #444;
    font-weight: 500;
}

/* =====================================================
   DESKTOP UI FIX – Mobile app frame
   ===================================================== */
@media (min-width: 768px) {
    body, html {
        background-color: #d1d1d1;
    }
    #container {
        width: 100%;
        max-width: 800px;
        min-height: 100vh;
        margin: 20px auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.15);
        border-radius: 0; /* Match phone screen edge */
        background-color: #eeeeee;
        position: relative;
        padding-bottom: 120px; /* Space for the bottom menu */
    }
    #menu {
        max-width: 800px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 15px 15px 0 0;
    }
}


@media (max-width: 600px) {
    #container {
        width: 100%;
        padding-top: 20px;
        padding-left: 0;
        padding-right: 0;
        margin-top: 0;
        box-sizing: border-box;
    }

    .inicio-content {
        margin-top: 15px;
        width: calc(100% - 24px);
        padding: 16px;
    }

    .logo {
        width: clamp(120px, 65vw, 220px);
        margin-top: 5px;
    }

    .text {
        font-size: 16px;
        padding: 12px;
        margin-bottom: 70px;
    }
}


#inicio {
    overflow: visible;
}

.inicio-content {
    box-sizing: border-box;
    width: min(90%, 500px);
    margin: 20px auto 30px auto;
    padding: 20px;
}

.logo {
    display: block;
    width: clamp(130px, 55vw, 250px);
    max-width: 100%;
    height: auto;
    margin: 10px auto 20px auto;
    object-fit: contain;
}

.text {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 55px 0;
    padding: 20px;
}



.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    animation: fadeIn 0.3s ease, fadeOut 0.5s ease 4s forwards;
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* =====================================================
   TOGGLE SWITCH (Push Notifications)
   ===================================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #27AE60; /* Veggie Scan green */
}

input:focus + .slider {
  box-shadow: 0 0 1px #27AE60;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* ======= OFFLINE MODE STYLES ======= */

/* Menu turns orange when offline */
.offline-mode #menu {
    background-color: #e67e22;
}

/* Floating pill indicator — hidden by default, shown via body.offline-mode */
#offline-pill {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(230, 126, 34, 0.92);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 2px 12px rgba(230, 126, 34, 0.35);
    display: none;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.offline-mode #offline-pill {
    display: flex;
    animation: offlinePillSlideIn 0.4s ease;
}

/* Settings notice — hidden by default */
#offline-settings-notice {
    display: none;
}

@keyframes offlinePillSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Disabled settings appearance when offline */
.offline-mode .configuracion-content select,
.offline-mode .configuracion-content input,
.offline-mode .configuracion-content .language-button,
.offline-mode .configuracion-content .botones,
.offline-mode .configuracion-content .btn-add-profile,
.offline-mode .configuracion-content .btn-save-profile {
    opacity: 0.45;
    pointer-events: none;
}

.offline-mode #offline-settings-notice {
    display: block !important;
    text-align: center;
    color: #e67e22;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 8px;
}

/* Deshabilitar y cambiar color de la hamburguesa offline */
.offline-mode #hamburger-menu {
    pointer-events: none !important;
    opacity: 0.8;
}

.offline-mode #hamburger-menu span {
    background-color: #e67e22 !important;
}

/* ======= END OFFLINE MODE STYLES ======= */

/* ======= PRODUCT CONTRIBUTION STYLES ======= */
.contrib-input, .contrib-textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 0px;
    border: 1.5px solid #b0e4f5;
    border-radius: 8px;
    background-color: #f7fdff;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contrib-input:focus, .contrib-textarea:focus {
    outline: none;
    border-color: #209BBB;
    box-shadow: 0 0 0 3px rgba(32, 155, 187, 0.15);
}

.contrib-textarea {
    height: 60px;
    resize: none;
}

.contrib-btn-photo {
    background-color: #e8f8fd;
    color: #1a6e8a;
    border: 1.5px dashed #b0e4f5;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.contrib-btn-photo:hover {
    background-color: #d0f0fa;
    border-color: #209BBB;
}

.contrib-btn-photo:active {
    transform: scale(0.97);
}

.contrib-indicator {
    font-size: 11px;
    margin-top: 4px;
    font-weight: bold;
}

.contrib-btn-action {
    padding: 10px 12px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    border-radius: 8px !important;
}
/* ======= END PRODUCT CONTRIBUTION STYLES ======= */