/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root{
    --very-light-pink:#C7C7C7;
    --White: #FFFFFF;
    --Text-input-field:#F7F7F7;
    --Black:#000000;
    --Hospital-green:#ACD9B2;
    --button-nigth:#434344;
    --buttons:#4A69BD;
    --alert:#E80C0C;
    --sm :1.4rem;
    --md:1.6rem;
    --lg:2.0rem;
    --text-dni:#BBBBC1
}
html {
    font-size: 62.5%;
}
body {
    font-family: Arial, sans-serif;
    background-color: var(--White);
    display: flex;
    flex-direction: column;
    font-family: "Quicksand", serif;

}
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}
body {
    font-family: "Quicksand", serif;
    background-image: url("../images/dia.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed; /* Para que no se desplace */
    min-height: 100vh;
    width: 100%;
}
/* estilo al logo*/
header {
    display: flex;
    justify-content: center; /* Centra el logo horizontalmente */
    align-items: center; /* Alinea el logo verticalmente */
    width: 100%; 
    margin: 25px 0; /* Margen superior e inferior de 20px */
    /* Asegura que el header ocupe todo el ancho */
}

header img {
    max-width: 30%;
    height: auto;
    display: block; /* Asegura que la imagen se muestre correctamente */
}
/*botones de asistencia*/
/*para el modal*/


.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;  /* Limita el ancho del modal */
    width: 400px;   
    position: relative; /* Ancho predeterminado */
}

#modalMessage{
    font-size: 2.0rem;
    font-weight: bold;
    white-space: pre-line;
}

#closeModal:hover {
    background-color: #d32f2f;}

/* Modal Styles */


#closeErrorModal, #closeSuccessModal {
    cursor: pointer;
    font-size: 20px;
    color:  var(--Black);
    font-size: 1.8rem;
    font-weight: bold;
}
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo oscuro y semitransparente */
    z-index: 1; /* Asegúrate de que la capa esté por encima del contenido */
    display: none; /* Oculto por defecto */
}
.icon {
    font-size: 40px;
    margin-top: 10px;
    display: block;
    color: green;
}
#errorMessage{
    font-size: 1.4rem;
    font-weight: bold;
    color: red;
}
#cameraErrorMessage{
    font-size: 1.4rem;
    font-weight: bold;
    color: red;
}

#successModal, #errorModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 200;
}

#closeCameraErrorModal, #closeErrorModal,#closeSuccessModal{
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    background-color: var(--buttons);
    border-radius: 5px;
}
/**/


/* estilo al contenedor */
.container {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}
h1 {
    color: #333333;
    font-size: 2.8rem;
    margin-bottom: 20px;
}
/*hour and date*/
.formAssistant_date{
    display: flex;
    flex-direction: row;
    margin-top: 20px ;
    gap: 150px;
    align-items: center;

    
}
.formAssistant_date div{
    font-size: 2.0rem; 
    display: flex;
    border: 1px solid #050505;
    border-radius: 5px;
    font-weight: bold;
    color: var(--Black);
    width: 200px;
    height: 80px;
    justify-content: center;
    align-items: center;
}
/*DNI*/
.formAssistant{
    font-size: 1.9rem;
  
}

/*botones de asistencia*/

.button-container {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-bottom: 20px;
}
.attendance-button, .absence-button, .round-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 100px;
    font-size: 1.6rem;
    font-weight: bold;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.attendance-button {
    background-color:var(--buttons);
}
.attendance-button i {
    font-size: 3rem;
    margin-bottom: 5px;
}
.attendance-button:hover {
    background-color: #0056b3;
}
.absence-button {
    background-color: var(--button-nigth);
}
.round-button {
    background-color: #fbb03b;
}
.absence-button i {
    font-size: 3rem;
    margin-bottom: 5px;
}
.absence-button:hover {
    background-color: #23272b;
}
form {
    display: flex;
    flex-direction: column;
    align-items: center;
}
label {
    font-size: 1.8rem;
    margin: 15px 15px;
    font-weight: bold;
    color: #555555;
}
/*mensaje de error o bienvenida*/
#formAssistant_message {
  width: 100%;
}
.message {
    font-size: 1.8rem;
    color: var(--Black);
    margin-top: 20px;
}
.message.error {
    color: var(--Black);
    font-weight:500;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    border: 1px solid var(--alert);
    color: #F40D0D;

}
.message.valid{
    color: var(--sussecc);
    border: 1px solid #218838;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    font-weight: bold;
    color: #218838;
}




.custom-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: rgba(199, 0, 0, 0.966); /* Color de la bolita */
    color: white; /* Color del signo */
    border-radius: 50%; /* Hace que sea redonda */
    text-align: center;
    line-height: 20px; /* Centra verticalmente el texto */
    font-weight: bold; /* Negrita para el signo */
    font-family: Arial, sans-serif; /* Fuente del signo */
    margin-right: 8px; /* Espacio a la derecha del ícono */
}

/* Estilos para el input de texto */
/* Estilos para el input */
/* Estilos para el input */
/* Estilos para el input */
input[type="tel"] {
    margin-top: 5px;
    margin-bottom: 0;
    padding: 10px 0; /* Solo un poco de relleno vertical */
    width: 90%;
    font-size: 2.0rem;
    border: none; /* Eliminar bordes por defecto */
    border-bottom: 2px solid var(--Black); /* Solo el borde inferior */
    color: var(--Black);
    font-weight: bold;
    letter-spacing: 5px;
    position: relative; /* Permite la posición de los elementos */
    z-index: 1;
    outline: none; 
    background-color: transparent; /* Evita que el fondo celeste aparezca */
    text-align: center; /* Alinea el texto al centro horizontalmente */
    height: 40px; /* Ajusta la altura del input */
}


#cameraContainer {
    margin-top: 20px;
    width: 100%;
    position: relative;
    display: none; 
}
#video {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #cccccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
#captureButton {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1.6rem;
    font-weight: bold;
    color: #ffffff;
    background-color: #4A69BD;;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
#captureButton:hover {
    background-color: #4A69BD;
}
#registrarBtn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    background-color: #4A69BD;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 30px;
}
/**/
#imgPreview{
    border-radius: 8px;
    margin-bottom: 15px;
}
#registrarBtn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
#registrarBtn:hover:enabled {
    background-color: #0056b3;
}
/*btn camera*/
#captureButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;

}
#mensaje {
    margin-top: 20px;
    font-size: 16px;
    color: #555555;
}
canvas {
    display: none;
}
.administrator {
    position: absolute; /* Permite posicionar el botón respecto al contenedor */
    background-color: #555555;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 5px 5px;
    font-size: 1.5rem;
    cursor: pointer;

    /* Cambia la posición del botón */
    
    right: 15px; /* Espacio desde el lado derecho */
    bottom: 10px; /* Espacio desde el borde inferior */
}
.administrato{
    position: absolute; /* Permite posicionar el botón respecto al contenedor */
    background-color: var(--buttons);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 5px 5px;
    font-size: 1.5rem;
    cursor: pointer;

    /* Cambia la posición del botón */
    left: 15px; /* Espacio desde el lado derecho */
    bottom: 10px; /* Espacio desde el borde inferior */
}

.administrator > a {
    text-decoration: none;
    color: #333333;
    font-weight: bold;
}
.administrato > a {
    text-decoration: none;
    color: #333333;
    font-weight: bold;
}

footer {
    width: 100%;
    /* background-color: #f1f1f1; */
    text-align: center;
  
    margin-top: auto; /* Empuja el footer hacia abajo */
}

@media (max-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    .modal-content {
        width: 80%; /* En pantallas más pequeñas, el modal ocupará el 80% del ancho */
    }
    .modal-text {
        font-size: 18px; /* Fuente más pequeña para dispositivos móviles */
    }
    .logo img{
        width: 100%;
    }
    .container {
        /* max-height: 100vh; */
        padding: 15px;
        width: 90%;
    }
    h1 {
        font-size: 20px;
    }
    input[type="tel"] {
        font-size: 14px;
        padding: 8px;
    }
    .formAssistant_date > #horaActual, #datenow {
        font-size: 16px;
    }
    #captureButton, #registrarBtn {
        font-size: 14px;
        padding: 8px 15px;
    }
    .button-container {
       
        gap: 100px;
        
    }
    .attendance-button, .absence-button {
        width: 200px;
        height: 80px;
    }
    .formAssistant_date{
      
        gap: 80px;
            
    }
    .formAssistant_date div{
    
        width: 180px;
        height: 80px;
}


}
@media (max-width: 480px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        height: 100vh;
     
    }
    .modal-content {
        width: 90%; /* En pantallas muy pequeñas, el modal ocupará el 90% del ancho */
    }
    .modal-text {
        font-size: 16px; /* Fuente aún más pequeña para pantallas pequeñas */
    }
    header img {
        max-width: 90%;
        height: auto;
        display: block; /* Asegura que la imagen se muestre correctamente */
    }
    .formAssistant{
        font-size: 1.5rem;
    }
    .logo img{
        padding:20px  0px ;
    }
    .message {
        font-size: 1.4rem;
    }
    .container {
        /* max-height: 100vh; */
        padding: 15px;
        width: 90%;
    }
    h1 {
        font-size: 18px;
    }
    #captureButton, #registrarBtn {
        padding: 12px 15px;
        font-size: 1.2ren;
    }
    .button-container {
      
        gap: 20px;
      
    }
    /*btonnes de asistencia*/
    .attendance-button, .absence-button {
        width: 134px;
        height: 71px;
    }
    .title_assistant{
        font-size: 2.0rem;
        font-weight: bold;
    }
    .administrator{
        font-size: 1.0rem;
        
    }
    .administrato{
        font-size: 1.0rem;
        
    }
    .formAssistant_date{
       
        gap: 15px;
    }
    .formAssistant_date div{
    
        width: 128px;
        height: 54px;}
}

