/* Chatbot Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background-color 0.2s;
}

.chat-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.chat-popup {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.5);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.chat-popup.show {
    display: flex;
    transform: scale(1);
}

.chat-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header .close-btn {
    cursor: pointer;
    font-size: 24px;
    font-weight: normal;
}

.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f4f7f9;
    display: flex;
    flex-direction: column;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 80%;
    line-height: 1.4;
}

.chat-message.user {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.bot {
    background-color: #e9eaf0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* Typing indicator styles */
.chat-message.bot.typing::after {
    content: '...';
    display: inline-block;
    vertical-align: bottom;
    animation: typing-dots 1.5s infinite;
    width: 1.2em;
    text-align: left;
}

@keyframes typing-dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
    100% { content: '.'; }
}
.chat-message.bot.typing {
    font-style: italic;
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.chat-footer input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    margin-right: 10px;
    outline: none;
}

.chat-footer button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-footer button:hover {
    background-color: #0056b3;
}