/* ESTILOS PARA EL FONDO */
.background {
    background-image: url("FondoPortalExamenes.png?v=1.4");
    background-position: center;
    background-size: cover; /* Ajustar a 100% 100% */
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: -1;
  }

/* ESTILOS OCULTAR CLAVE */
.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 2;
}

.toggle-password:hover {
    color: #333;
}

/* ESTILOS DE ACCESIBILIDAD */
.accessibility-bar {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Poppins', sans-serif;
}

.access-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* LETRAS DE TAMAÑO Y ALTO CONTRASTE */
.access-label {
    font-size: 14px;
    color: #fff; /* Texto negro en modo normal */
    font-weight: 500;
}

.size-controls {
    display: flex;
    gap: 5px;
}

.size-btn {
    font-size: 14px;
    cursor: pointer;
    color: #c9c9c9;
    font-weight: normal;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-btn.larger {
    font-size: 16px;
    font-weight: bold;
}

.size-btn:hover {
    color: #fff;
}

/* SWITCH DE CONTRASTE */
.contrast-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.contrast-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;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3e8e41;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Modo contraste */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast .login-box,
body.high-contrast .modal-content {
    background-color: #000 !important;
    color: #fff !important;
    border: 0px solid #fff !important;
}

body.high-contrast input,
body.high-contrast button {
    background-color: #3e8e41;
    color: #fff;
    font-weight: 500;
    border: 0px solid #fff !important;
    
}

/* MODO CONTRASTE Y ALTO CONTRASTE*/
body.high-contrast .access-label {
    color: #fff !important; /* Texto blanco en modo contraste (como foto 2) */
}

body.high-contrast .size-btn {
    color: #fff !important;
}

  /* ESTILOS PARA PANTALLAS PEQUEÑAS 
  @media screen and (max-width: 480px) {
    .background {
      background-image: url("FondoPortalMovil.png?v=1.4");
      background-size: cover;
      background-position: calc(50% - 1%) center;
    } 
      .login-box{
      left:0;
      }
      .h2{
      font-size: 60px;
      margin-bottom: -100px;
      }
      .h3{
      font-size: 25px;
      left: 0;
      }
      .logo{
      left: 0;
      }
      
      
}*/
  
  /* ETILOS PARA CAJA CENTRAL */
  .login-box {
    left: 0;
    width: 325px;
    text-align: center;
    margin: 30px auto 0 auto; /* Agregar un margen superior */
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.50);
    position: relative; /* Agregar position: relative */
  }


/* ESTILOS PARA EL LOGO BOX ------------------------------------------------------------*/


.logo-div {
    left: 0;
    width: 350px;
    margin: 15px auto 0 auto; /* Agregar un margen superior */
    margin-bottom: -25px;
    margin-top: 25px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    position: relative; /* Agregar position: relative */
  }

/* Estilos para el logo */
  .logo-box {
    left: 0%;
    width:  235px;
    height: 60px;  
    margin-bottom: 0px;
  }

/* Fin logo-box ------------------------------------------------------------*/


/* ESTILOS PARA LOGO 18 AÑOS ------------------------------------------------------------*/



.box-18{
    width: 355px;
    left: 0%;
    margin: 30px auto 0 auto; /* Agregar un margen superior */
    margin-top: 45px;
    margin-bottom: -25px;
    padding: 15px;
    text-align: center;
    position: relative; /* Agregar position: relative */
  }

/* Estilos para el logo */
.logo-18{
    width:  80px;
    height: 80px;
    left: 0;
  }


/* Fin logo-box ------------------------------------------------------------*/
  
 /* ESTILOS PARA IMAGEN DE FONDO */
  body {
    margin: 0;
    padding: 0;
  }
  
  /* Estilos para el logo */
  .logo {
    width: 100px;
    height: 100x;
    margin-bottom: 20px;
  }
  
  /* Estilos para los campos de ingreso de datos */
  .input-container {
    margin-bottom: 15px;
    position: relative;
  }
  
  .input-container label {
    background-color: #fff important;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    padding-left: 10px;
    font-family: 'Poppins', sans-serif;
  }
  
  input[type="text"],
  input[type="password"] {
    width: 70%;
    padding: 12px 20px;
    box-sizing: border-box;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background-color: #fff !important;
    text-align: center;
  }
  
  input[type="text"]:hover,
  input[type="password"]:hover {
    background-color: #000;
    padding-left: 0;
  }
  
  /* Estilos para el botón de acceso */
  button {
    width: 55%;
    background-color: #258e2d;
    color: white;
    padding: 12px 20px;
    margin-top: 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
  }
  
  button:hover {
    transform: scale(1.0);
    background-color: #4CAF50;
  }
  
  button:focus {
    outline: none;
  }
  
  /* Estilos para el texto de ingreso de rut y clave */
  .label-text {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 5px;
    text-align: center;
  }
  
  /* Estilos para el modal */
  .modal {
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  }

  .modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 78%;
    max-width: 370px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    top: 0;
    margin-top: 80px;
    transform: translateY(0);
  }
      @media screen and (min-width: 1920px) and (min-height: 1080px) {
    .modal-content {
      /* Aquí van los estilos específicos para pantallas Full HD */
      margin-top: 100px; /* Ajusta este valor según tus necesidades */
    }
  }

  .modal h2 {
    margin-top: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 18.5px;
  }
  
  .modal-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    width: 200px;
  }
  
  .modal-btn:hover {
    background-color: #3e8e41;
    width: 70%;
  }
  
  /* Estilos para botones del modal2 */
  #modal2 .modal-content button {
  width: 200px;
  font-size: 16px;
  }
  #modal2 .modal-content h2 {
  font-size: 22px;
  }

/* Estilos para el botón de volver al inicio */
.volver-btn {
  text-align: center;
  justify-content: center;
  left: 95px;
  width: 160px;
  position:absolute;
  bottom: -48px;
  padding: 10px;
  background-color: #2F73CF !important;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  opacity: 1;
  transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
  z-index: 9999;
  transform: none;
}

.volver-btn:hover {
  opacity: 1;
  background-color:#fff !important;
  color: #2F73CF !important;
  font-weight: 500;
  transition: opacity 0.5s ease-in-out;
}

.volver-btn:focus {
  outline: none;
}

/*BOTON NUEVO-------------------------------------------------------------*/

.contenedors {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px; /* Puedes ajustar la altura */
}
.botons {
    margin-top: 30px;
    width: 150px;
    padding: 10px 20px;
    background-color: #2F73CF;
    color: white;
    border: none;
    cursor: pointer;
}

.botons:hover {
  opacity: 1;
  background-color:#fff !important;
  color: #2F73CF !important;
  font-weight: 500;
  transition: opacity 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.botons:focus {
  outline: none;
}

/* FIN BOTON NUEVO-------------------------------------------------------------*/

/*18-------------------------------------------------------------*/

.contenedors-18 {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px; /* Puedes ajustar la altura */
}

    .logo-18{
    margin-top: 110px;
    text-align: center;
    width:  80px;
    height: 80px;
    left: 0;
  }


/* FIN 18-------------------------------------------------------------*/

/*TITULO SUCURSAL-------------------------------------------------------------*/

.contenedors-titulo {
    margin-top: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px; /* Puedes ajustar la altura */
}

    h2.titulo{
    font-family: 'Poppins', sans-serif;
    font-size: 25px;
    color: #fff;
    font-weight: 500;
    text-align: center;
  }

/* FIN TITULO SUCRURSAL-------------------------------------------------------------*/

/*TITULO SUCURSAL-------------------------------------------------------------*/

.contenedors-sucursales {
    margin-top: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px; /* Puedes ajustar la altura */
}

    h3.sucursales{
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #fff;
    font-weight: 500;
    text-align: center;
  }

/* FIN TITULO SUCRURSAL-------------------------------------------------------------*/


h2.titulo{
    left: 0%;
    font-family: 'Poppins', sans-serif;
    font-size: 25px;
    color: #fff;
    font-weight: 500;
    text-align: center;
    }
    
h3.sucursales{
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #fff;
    font-weight: 500;
    text-align: center;
    left: 0%;
}


/* ESTILOS DE BOTON PARA CERRAR MODAL */
.close-btn {
  width: 26px;
  height: 26px;
  position: absolute;
  top: -10px;
  right: 6px;
  padding: 0;
  background-color: #2F73CF;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;
}
.close-btn:hover {
  opacity: 1;
  background-color: #3789d3;
}
.close-btn:focus {
  outline: none;
}

/* Estilos para el botón de cerrar el modal2 */
#modal2 #close-btn2 {
  width: 25px;
  height: 25px;
  position: absolute;
  top: -11px;
  right: 7px;
  padding: 0;
  background-color: #0b08c7;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size:11px;
  opacity: 0.8;
  transition: opacity 0.3s ease-in-out;
  z-index: 10000;
}
#modal2 #close-btn2:hover {
  opacity: 1;
  background-color: #0b08c7;
}

#modal2 #close-btn2:focus {
  outline: none;
}

/* Estilos para el modal3 */
/* Estilos para el botón de cerrar el modal3 */
#modal3 #close-btn3 {
  width: 25px;
  height: 25px;
  position: absolute;
  top: -11px;
  right: 7px;
  padding: 0;
  background-color: #0b08c7;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size:13px;
  opacity: 0.8;
  transition: opacity 0.3s ease-in-out;
  z-index: 10000;
}

#modal3 .modal-content{
  font-size: 0.9rem;
  position: fixed;
  width: 60vw; /* Ancho del modal en función del ancho de la pantalla */
  left: 27vw; /* centrar el modal horizontalmente */
  height: 30vh; /* Altura del modal en función de la altura de la pantalla */
  margin-top: 17vh; /* centrar el modal verticalmente */
  padding-left: 3vw;
  padding-right: 14vw;
}

#modal3 .modal-content h2 {
  font-size: 18px;
  margin-top: -5px;
  text-align: center;
  margin-left: 80px;
  width: 100%; /* Ocupar todo el ancho del contenedor */
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  /* Estilos para dispositivos móviles */
  #modal3 .modal-content {
    width: 100%; /* Ancho completo en dispositivos móviles */
    left: 0; /* Eliminar el desplazamiento lateral */
    padding-right: 0; /* Eliminar el relleno derecho */
  }
}

/* Estilos para pantallas Full HD (1920x1080) */
@media screen and (min-width: 1920px) {
  #modal3 .modal-content {
    width: 50vw; /* Ajusta estos valores según necesites */
    left: 32vw;
    height: 19vh;
    margin-top: 15vh;
    padding-left: 2vw;
    padding-right: 14vw;
    height: 14vw;
  }
}

/* Estilos para pantallas 1600x900 */
@media screen and (min-width: 1600px) and (max-width: 1919px) {
  #modal3 .modal-content {
    width: 60vw;
    left: 31vw;
    height: 29vh;
    margin-top: 15vh;
    padding-left: 0.5vw;
    padding-right: 14vw;
  }
}

/* Estilos para pantallas de celulares (menos de 600px de ancho) */
@media screen and (max-width: 599px) {
  #modal3 .modal-content {
    font-size: 0.6rem;
    width: 90vw; /* Ajusta estos valores según necesites */
    left: 0vw;
    height: 34vh;
    margin-top: 16vh;
    padding-left: 1vw;
    padding-right: 9vw;
  }
}

@media screen and (max-width: 599px) {
#modal3 .modal-content h2 {
  font-size: 16px;
  margin-left: 25px;
  }
}

@media screen and (min-width: 1920px) {
  #modal3 .modal-content h2 {
    margin-left: 114px;
    }
  }

/* Para hacer mas anchas las columas de la tabla */
#tabla-sql th,
#tabla-sql td {
  min-width: 130px;
  padding-bottom: 15px;
}

@media screen and (max-width: 599px) {
  #tabla-sql th,
  #tabla-sql td {
    min-width: 64px;
    padding-bottom: 20px;
    padding-left: 1vw;
    }
  }

@media screen and (min-width: 1600px) and (max-width: 1919px) {
  #tabla-sql th,
  #tabla-sql td {
    min-width: 130px;
    font-size: 12px;
    }
  }

@media screen and (min-width: 1920px) {
  #tabla-sql th,
  #tabla-sql td {
    min-width: 141px;
    }
  }
  
#modal3 #info-Paciente {
  font-size: 0.9rem;
  display: block;
  font-weight: bold;
  text-align: left;
  margin-top: 1.5vw;
}

#modal3 #info-Rut {
  font-size: 0.9rem;
  display: block;
  font-weight: bold;
  text-align: left;
}

@media screen and (max-width: 599px) {
  #modal3 #info-Paciente,
  #modal3 #info-Rut {
    padding-left: 1vw;
    font-size: 12px;
    }
  }

@media screen and (min-width: 1600px) and (max-width: 1919px) {
  #modal3 #info-Paciente,
  #modal3 #info-Rut {
    padding-left: 1vw;
    }
  }

/* Para separar la tabla del H2 */
#tabla-sql {
  margin-top: 34px;
}

/* Estilos para el mensaje de error */
.message {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2em;
  border-radius: 12px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  z-index: 9999;
  max-width: 90vw; 
  box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.75); /* Agrega una sombra */
}

@media screen and (min-width: 1600px) and (max-width: 1919px) and (min-height: 900px) and (max-height: 1080px) {
  .message {
    /* Aquí van los estilos específicos para pantallas de 1600x900 */
    font-size: 1em;
    max-width: 38vw;
    top: 355px;
    padding: 3em;
  }
}

@media screen and (min-width: 1920px) and (min-height: 1080px) {
  .message {
    /* Aquí van los estilos específicos para pantallas Full HD */
    font-size: 1.2em;
    max-width: 35vw;
    top: 360px;
    padding: 1em;
  }
}

.error {
  background-color: #f44336;
  color: white;
  /*max-width: 400px;  ajusta el ancho máximo según tus necesidades */
  border-radius: 10px; /* Agregar un radio de borde */
  padding: 2em; /* Ajustar el relleno */
  box-sizing: border-box; /* Incluir el borde y el relleno en el ancho máximo */
  box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.75); /* Agrega una sombra */
  display: flex; /* Alinear verticalmente el botón de cerrar */
  align-items: flex-start;
  justify-content: flex-end;
}

/* Establecer diferentes estilos para pantallas más pequeñas */
@media screen and (max-width: 768px) {
  .error {
    max-width: 90vw;
    font-size: 1em;
    top: 40%; /* ver si es necesario o negativo y borrar */
    padding: 2em;
    min-width: 360px;
  }
}

/* Establecer diferentes estilos para pantallas más grandes */
@media screen and (min-width: 1200px) {
  .error {
    font-size: 1.2em;
    max-width: 40vw;
    padding: 2em;
  }
}

/* Estilos para el botón de cerrar el mensaje de error */
.closerror-button {
  position: absolute;
  top: 0.15rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background-color: transparent;
  border: none;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  line-height: 1rem;
  cursor: pointer;
  z-index: 1;
  padding: 0;
  opacity: 0.7; /* Ajustar la transparencia según tus necesidades */
}

.closerror-button:hover {
  background-color: transparent;
  color: #140aaa; /* Establecer un color diferente para el texto */
}

#loader {
  border: 8px solid #f3f3f3; /* Color de fondo */
  border-top: 10px solid #3498db; /* Color del spinner */
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 2s linear infinite;
  position: absolute;
  top: 38%;
  left: calc(50% - 20px);
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: none; /* El loader se oculta por defecto */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}