/* Estilos generales */
.tarjeta {
  z-index: 999;
  position: fixed;
  bottom: 20px; 
  left: 40px; 
  background-color: #fff; 
  color: #000; 
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 20px; /* Aumentar el padding */
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
  display: none; 
  max-width: 25%; 
  box-sizing: border-box; /* Asegura que el padding no expanda el ancho total */
}

.encabezado {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #000;
}

.foto {
  width: 104px;
  height: 104px;
  background-color: #ccc;
  border-radius: 50%;
  margin-right: 6px;
  background-image: url('../images/juan-carlos-rico.png');
  background-size: cover;
}

.informacion {
  text-align: left;
}

.nombre {
  font-weight: bold;
}

.horario {
  font-size: 14px;
}

.cerrar-btn {
  cursor: pointer;
  color: red;
  margin-bottom: 82px;
  font-size: 14px;
  position: relative;
}

/* Pseudo-elemento para mostrar el texto alternativo */
.cerrar-btn::after {
  content: 'Minimizar'; /* Texto alternativo */
  position: absolute;
  top: -30px; /* Posiciona el texto por encima del elemento */
  left: 50%; /* Centra el texto horizontalmente */
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Pseudo-elemento para mostrar el texto alternativo cuando el usuario pasa el mouse sobre el elemento */
.cerrar-btn:hover::after {
  opacity: 1;
}

.mensaje-container {
  padding-top: 20px;
  padding-bottom: inherit;
}

.mensaje {
  background-color: #fff;
  padding: 1px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

.estilotextarea {
  width: 100%;
  height: 100px;
  border: 2px solid #990000;
  margin-bottom: 20px; /* Añadir margen inferior */
}  

.whatsapp-btn {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px; /* Reducir tamaño del botón */
  background-color: #25D366;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  text-align: center;
  margin: 0;
  font-size: 14px;
}

.abrir-chat-btn {
  position: fixed;
  bottom: 140px; 
  left: 20px; 
  width: 80px; 
  height: 80px; 
  background-color: #25D366;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none; 
  z-index: 990; 
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  box-shadow: 2px 0px 10px;
  background-image: url('../images/whatsapp-boton-red-social.png'); /* Ruta a la imagen de WhatsApp */
  background-repeat: no-repeat; /* Evita que la imagen se repita */
  background-position: center; /* Centra la imagen en el botón */
  background-size: 200%; /* Tamaño de la imagen */
  transition: filter 0.3s ease; /* Transición para el cambio de filtro */
}

/* Estilo para cambiar el cursor al pasar el mouse sobre el botón */
.abrir-chat-btn:hover {
  filter: brightness(1.2); /* Aumenta el brillo de la imagen al pasar el mouse */
}

.chat-footer {
  text-align: center;
  position: relative;
  padding: 0px;
}

/* Estilos responsivos */
@media only screen and (max-width: 768px) {
  .tarjeta {
    left: 10px;
    right: 10px;
    padding: 15px;
    max-width: 70%;
    margin: 0 auto;
    box-sizing: border-box; /* Asegura que el padding no expanda el ancho total */
  }

  .encabezado {
    flex-direction: row;
  }

  .foto {
    width: 40px;
    height: 40px;
  }
  .whatsapp-btn {
    padding: 6px 14px; /* Reducir tamaño del botón */
    margin: 0;
    font-size: 13px;
  }
}

@media only screen and (max-width: 480px) {
  .tarjeta {
    left: 5px;
    right: 5px;
    padding: 10px;
    margin: auto;
    max-width: 80%;
    margin-bottom: 70px;
    margin-left: inherit;
  }

  .encabezado {
    flex-direction: row;
  }

  .abrir-chat-btn {
    position: fixed;
    bottom: 18px;
    left: 20px;
  }

  .foto {
    width: 50px;
    height: 50px;
  }    
  .whatsapp-btn {
    padding: 6px 12px; /* Reducir tamaño del botón */
    margin: 0;
    font-size: 11px;
  }
}
