/* Workflow Chat Visualization */
.workflow-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    width: 100%;
    padding-top: 10px;
}

.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    /* Align avatars to bottom of message */
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
}

.chat-message:nth-child(1) {
    animation-delay: 0.2s;
}

.chat-message:nth-child(2) {
    animation-delay: 1.2s;
}

.chat-message:nth-child(3) {
    animation-delay: 2.5s;
}

.platform-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.platform-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.user-avatar {
    width: 100%;
    height: 100%;
    background: #cbd5e1;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-bubble {
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #334155;
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
}

.review-bubble {
    background: #fee2e2;
    /* Light red for bad review */
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

/* AI Response (Right Side) */
.chat-message.ai-response {
    flex-direction: row;
    justify-content: flex-end;
}

.chat-message.ai-response .message-bubble {
    background: #84CC16;
    /* Brand Lime */
    color: #000;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 16px;
    font-weight: 500;
}

.chat-message.ai-response .platform-icon {
    order: 2;
    /* After message */
    margin-left: 0;
}

.review-stars {
    color: #ef4444;
    font-size: 10px;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

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

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

/* =========================================
   RESPONSIVE WORKFLOW CHAT
   ========================================= */

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
    .workflow-chat {
        padding: var(--spacing-sm);
        gap: 10px;
    }

    .chat-message {
        gap: 8px;
    }

    .platform-icon {
        width: 24px;
        height: 24px;
    }

    .platform-icon img {
        width: 16px;
        height: 16px;
    }

    .message-bubble {
        padding: 8px 12px;
        font-size: 11px;
        max-width: 90%;
        border-radius: 14px;
    }

    .chat-message.ai-response .message-bubble {
        border-radius: 14px;
        border-bottom-right-radius: 4px;
        border-bottom-left-radius: 14px;
    }

    .review-stars {
        font-size: 9px;
    }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .workflow-chat {
        padding: var(--spacing-md);
    }

    .message-bubble {
        font-size: 11.5px;
        max-width: 80%;
    }

    .platform-icon {
        width: 26px;
        height: 26px;
    }

    .platform-icon img {
        width: 17px;
        height: 17px;
    }
}