/* Base styles */
#chat-container {
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 1em;
}

.chat-btn {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: #007bff;
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    z-index: 999;
    transition: background 0.3s ease;
}

.chat-btn:hover {
    background: #0056b3;
}
.bot-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.chat-popup {
    display: none;
    position: fixed;
    bottom: 60px;
    right: 15px;
    width: 350px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 999;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background: #007bff;
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.chat-header .bot-img {
    width: 30px !important;
    height: 30px !important; 
    border-radius: 50%;
    margin-right: 10px;
}

.chat-area {
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease;
}

.bot-msg, .user-msg {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.bot-msg {
    justify-content: flex-start;
}

.user-msg {
    justify-content: flex-end;
}

.bot-msg .msg, .user-msg .msg {
    padding: 10px;
    border-radius: 12px;
    max-width: 70%;
    word-wrap: break-word;
    transition: background 0.3s ease;
}

.bot-msg .msg {
    background: #f1f1f1;
}

.user-msg .msg {
    background: #007bff;
    color: #fff;
}

.chat-input-area {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #007bff;
    outline: none;
}

.chat-submit {
    background: #007bff;
    border: none;
    padding: 8px;
    margin-left: 5px;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chat-submit:hover {
    background: #0056b3;
}

.chat-submit i {
    font-size: 18px;
}

.close-chat-window {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    margin-left: auto; /* Align close button to the right */
}

/* Responsive styles */
@media only screen and (max-width: 600px) {
    #chat-container {
        bottom: 10px;
        right: 10px;
    }

    .chat-popup {
        width: 90%;
        bottom: 70px;
        right: 10px;
        max-width: none;
    }

    .chat-btn {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
    }

    .chat-header .bot-img {
        width: 25px;
        height: 25px;
    }

    .chat-input {
        font-size: 14px;
    }

    .chat-submit i {
        font-size: 16px;
    }
}
