.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

@media (max-width: 768px) {
    .chat-container {
        width: 90%;
        height: 60vh;
        right: 5%;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        width: 95%;
        height: 70vh;
        right: 2.5%;
    }
}

.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 90px;
    height: 90px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: translateY(-30%) scale(1);
  }
  50% {
    transform: translateY(-30%) scale(1.3);
  }
  100% {
    transform: translateY(-30%) scale(1);
  }
}

@media (max-width: 480px) {
    .chat-button {
        width: 50px;
        height: 50px;
    }
}

.chat-header {
    background: #007bff;
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-input-container {
    padding: 10px;
    border-top: 1px solid #ddd;
    background: white;
    display: flex;
    gap: 10px;
}

.message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 10px;
    max-width: 95%;
    word-wrap: break-word;
}

.user-message {
    background: #007bff;
    color: white;
    margin-left: auto;
}

.bot-message {
    background: #e9ecef;
    color: black;
}

.bot-message ul,
.bot-message ol {
    margin: 10px 0;
    padding-left: 10px;
}

.bot-message li {
    margin: 5px 0;
}

.chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
}

.send-button {
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.close-button {
    cursor: pointer;
    padding: 5px;
}

.scroll-indicator {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.arrow-down {
  position: absolute;
  width: 30px;
  height: 30px;
  left: 30px;
  border-right: 10px solid #333;
  border-bottom: 10px solid #333;
  transform: rotate(45deg);
  animation: bounce 1.5s infinite ease-in-out;
  margin-top: -30px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(10px) rotate(45deg);
  }
  60% {
    transform: translateY(5px) rotate(45deg);
  }
}

@media (max-width: 575.98px) {
  .arrow-down {
    width: 20px;
    height: 20px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
  }
}

.typing-indicator {
    display: none; /* Oculto por defecto */
    justify-content: center;
    gap: 5px;
    padding: 10px;
    background: #f8f9fa; /* Fondo para que combine con el chat */
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}