/* Estilos para el Chatbot flotante de WhatsApp */

.whatsapp-chat-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
}

.whatsapp-chat-btn:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
}

.chatbot-header {
    background-color: #0056b3;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.chatbot-header img {
    margin-right: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
}

.chatbot-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.chatbot-input {
    display: flex;
    padding: 10px;
    background-color: #f0f0f0;
}

#chatbot-message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

#chatbot-send-button {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Estilos para los mensajes dentro del chatbot */
.message {
    margin-bottom: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    margin-left: auto;
    background-color: #0056b3;
    color: white;
    padding: 10px;
    border-radius: 15px 15px 0 15px;
}

.bot-message {
    margin-right: auto;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 15px 15px 15px 0;
}

.question-counter {
    font-size: 11px;
    color: #777;
    margin-top: 5px;
    text-align: right;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.suggestion-button {
    background-color: #e7f3ff;
    border: 1px solid #0056b3;
    color: #0056b3;
    padding: 8px 12px;
    margin: 3px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.suggestion-button:hover {
    background-color: #0056b3;
    color: white;
}

.typing-indicator {
    display: flex;
    padding: 10px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #999;
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1.5s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.5s;
}

.typing-dot:nth-child(3) {
    animation-delay: 1s;
}

@keyframes typing {
    0% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.4;
        transform: scale(1);
    }
}

/* Animación para mostrar/ocultar el chatbot */
.chatbot-slide-in {
    animation: slideIn 0.3s forwards;
    display: flex;
}

.chatbot-slide-out {
    animation: slideOut 0.3s forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Hacemos que el chatbot sea adaptable a móviles */
@media (max-width: 576px) {
    .chatbot-container {
        width: 90%;
        height: 80%;
        bottom: 70px;
        right: 5%;
        left: 5%;
    }
}