/* General Styles */
body {
    font-family: Arial, sans-serif;
}

/* Chatbot Floating Button */
#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    z-index: 1000;
}

/* Chatbot Modal */
#chatbot-modal {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    /* Animation properties */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.hidden {
    display: none;
}

/* When the chatbot is visible */
#chatbot-modal.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Chatbot Content */
#chatbot-content {
    display: flex;
    flex-direction: column;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
}

/* Chatbot Header */
#chatbot-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chatbot-header button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Chatbot Messages */
#chatbot-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.user-message,
.bot-message {
    max-width: 70%;
    margin: 10px;
    padding: 10px;
    border-radius: 15px;
    word-wrap: break-word;
    font-size: 14px;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.bot-message {
    background-color: #e0e0e0;
    color: #333;
    align-self: flex-start;
    border-top-left-radius: 0;
}

/* Chatbot Input */
#chatbot-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

#chatbot-user-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#chatbot-send {
    margin-left: 10px;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/* Typing Indicator */
#typing-indicator {
    display: flex;
    align-items: center;
    margin: 10px;
    height: 24px;
    /* Adjust alignment to match bot messages */
    align-self: flex-start;
}
#typing-indicator.hidden {
    display: none;
}

.typing-dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #e0e0e0;
    border-radius: 50%;
    animation: typing 1s infinite;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}
.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% {
        opacity: 0.2;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
    }
}
