#soto-chat {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 420px;
  height: 520px;
  background-color: #f3f3f3;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;

  /* Aparece centrado y suavemente */
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  animation: appearCenter 0.6s ease-out forwards;
}

.chat-avatar {
  position: absolute;
  top: 17px;
  left: 10px;
  width: 70px;
  height: 75px;
  border-radius: 70%;
  overflow: hidden;
  box-shadow: 0 0 0px rgba(0,0,0,0.1);
  animation: bounceInLeft 0.9s ease-out;
  z-index: 1000;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-header {
  padding: 42px 50px 32px 80px;
  font-weight: bold;
  font-size: 16px;
  border-bottom: 1px solid #ddd;
  position: relative;
  background-color: #fff;
   font-family: "Lexend", sans-serif;
}

/* Eliminado el botón de cerrar */
.close-chat-btn {
  display: none;
}

#chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Lexend", sans-serif;
}

/* BURBUJAS DE TEXTO */
.bot-message,
.user-message {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 70%;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.3;
  font-size: 14px;
}

/* Estilo del bot */
.bot-message {
    
  background-color: #e0e0e0;
  align-self: flex-start;
}

/* Estilo del usuario */
.user-message {
  background-color: #e0e0e0;
  color: rgb(0, 0, 0);
  align-self: flex-end;
}

#user-input {
  border: none;
  border-top: 1px solid #ccc;
  padding: 10px;
  font-size: 14px;
  outline: none;
  font-family: "Lexend", sans-serif;
}

@keyframes appearCenter {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes bounceInLeft {
  0% {
    transform: translateX(-100px);
    opacity: 0;
  }
  60% {
    transform: translateX(10px);
    opacity: 1;
  }
  80% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}
@media (max-width: 768px) {
    #soto-chat {
        /* Centrado para móvil */
        position: fixed !important; 
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;

        /* Ajustes de tamaño para móvil */
        width: 70% !important; 
        height: 55vh !important;
        
        /* Aseguramos que el chat esté arriba de todo */
        z-index: 9999 !important;
    }
}