/* Base styles for chatbot container */
.chatbot-container {
    width: 400px;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 10px;
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #f5f5f5;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    z-index: 1000;

}
.chatbot-profile-pic {
    width: 40px; /* Size of the picture */
    height: 40px;
    border-radius: 50%; /* Makes the image circular */
    margin-right: 10px;
    object-fit: cover; /* Ensures the image covers the circle area without distortion */
}

.chatbot-profile {
    display: flex;
    align-items: center; /* Align the text with the image vertically */
}

/* Chatbot header */
.chatbot-header {
    background-color: #0078ff;
    color: white;
    padding: 8px;
    font-weight: bold;
    text-align: left;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* Chatbot body */
.chatbot-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth; /* Ensures smooth scrolling */
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Message bubbles */
.message {
    padding: 10px;
    border-radius: 18px;
    max-width: 70%;
    margin-bottom: 10px;
}

.user-message {
    background-color: #0084FF; /* Facebook Messenger user bubble color */
    color: white;
    align-self: flex-end;
    border-radius: 18px;
    border-bottom-right-radius: 0; /* Makes the bottom-right corner flat */
    padding: 10px;
    margin: 5px 0;
    max-width: 80%; /* Adjust bubble width */
    word-wrap: break-word;
    margin-left: auto; /* Pushes the bubble to the right */
    text-align: left;
}

.bot-message {
    background-color: #F1F0F0; /* Facebook Messenger bot bubble color */
    color: black;
    align-self: flex-start;
    border-radius: 18px;
    border-bottom-left-radius: 0; /* Makes the bottom-left corner flat */
    padding: 10px;
    margin: 5px 0;
    max-width: 80%;
    word-wrap: break-word;
    margin-right: auto; /* Pushes the bubble to the left */
    text-align: left;
}

/* Input area */
.chat-footer {
    padding: 10px;
    background-color: white;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-input {
    width: 80%;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    outline: none;
    background-color: #f5f5f5;
}

.send-button {
    background-color: #0078ff;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    outline: none;
}

/* User choice buttons outside message bubble */
#chatbot-buttons {
    padding: 10px;
    text-align: center;
    background-color: white;
}

.chatbot-button_choise {
    background-color: white;
    border: 2px solid #007bff;
    color: #007bff;
    padding: 10px 20px;
    font-size: 12px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    margin: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.chatbot-button_choise:hover {
    background-color: #007bff;
    color: white;
}

.chatbot-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
        animation: shake 1s ease-in-out; /* Apply the shake animation */


}

/* Typing indicator */
.typing-indicator {
    display: inline-block;
    margin-left: 10px;
}

.typing-indicator .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    background-color: #bfbfbf;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chatbot-container {
        width: 100%;
        height: 100%;
        bottom: 0;
        left: 0;
        border-radius: 0;
    }
    
    .chatbot-body {
        padding: 5px;
    }
    
    .chat-input {
        width: calc(100% - 50px); /* Adjust width for smaller screens */
    }
    
    .send-button {
        padding: 8px;
        font-size: 14px;
    }
    
    #chatbot-buttons {
        padding: 5px;
    }
    
    .chatbot-button_choise {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .chatbot-button {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        height: 100%;
        width: 100%;
        border-radius: 0;
        bottom: 0;
        left: 0;
    }
    
    .chat-input {
        width: calc(100% - 60px); /* Adjust width for very small screens */
    }
    
    .send-button {
        padding: 8px;
        font-size: 14px;
    }
    
    .chatbot-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(0); }
    75% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}