/* Messenger-Style Chat Bubble CSS */

/* Chat message row (contains avatar + bubble) */
.chat-message-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in-out;
}

.chat-message-row.user {
    flex-direction: row;
    /* User: avatar left, bubble right */
}

.chat-message-row.ai {
    flex-direction: row-reverse;
    /* AI: avatar right, bubble left */
}

/* Avatar styling */
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-avatar.user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chat-avatar.ai {
    background: linear-gradient(135deg, #00d2ff 0%, #3a47d5 100%);
    color: white;
}

/* Chat bubble styling */
.chat-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    line-height: 1.5;
}

.chat-bubble-user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-left-radius: 4px;
    /* Tail effect */
}

.chat-bubble-ai {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-right-radius: 4px;
    /* Tail effect */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar for chat container */
#chatContainer::-webkit-scrollbar {
    width: 8px;
}

#chatContainer::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#chatContainer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

#chatContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}