/* Avatar aligned left */
.msg-wrapper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.msg-wrapper .emoji-avatar {
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.bot-msg, .user-msg {
    background-color: #f1f1f1;
    border-radius: 12px;
    padding: 8px 12px;
    max-width: 80%;
    line-height: 1.4;
}

/* Scrollbar styling */
#aibc-chatbox::-webkit-scrollbar {
    width: 8px;
}
#aibc-chatbox::-webkit-scrollbar-track {
    background: #f0f0f0;
}
#aibc-chatbox::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
}

#aibc-chat-container {
    width: 100%;
    max-width: 360px;
    height: 500px;
    max-height: 80vh;
    min-height: 400px;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    position: relative;
}

/* Messenger-style header */
#aibc-header {
    background-color: #0084ff;
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    font-weight: 600;
}
.emoji-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
}

#aibc-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

#aibc-header .status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff00;
    border-radius: 50%;
    margin-left: 6px;
}

/* Chat box */
#aibc-chatbox {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Messages */
.user-msg, .bot-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    display: inline-block;
    position: relative;
}

.user-msg {
    background-color: #dcf8c6;
    align-self: flex-end;
}

.bot-msg {
    background-color: #f1f0f0;
    align-self: flex-start;
}

/* Input Area */
#aibc-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

#aibc-user-input {
    flex: 1;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}

#aibc-send-btn {
    padding: 8px 14px;
    margin-left: 8px;
    background: #0084ff;
    border: none;
    color: white;
    border-radius: 20px;
    cursor: pointer;
}

/* Avatars */
.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 6px;
    object-fit: cover;
}

.msg-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.bot-wrapper {
    flex-direction: row;
}

.user-wrapper {
    flex-direction: row-reverse;
}

#typing-indicator {
    font-style: italic;
    font-size: 13px;
    color: gray;
}
