/* Generating Indicator with Bot Animation */
.generating-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 24px;
    background: linear-gradient(135deg,
        rgba(255, 211, 43, 0.05) 0%,
        rgba(255, 211, 43, 0.1) 50%,
        rgba(255, 211, 43, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 211, 43, 0.2);
    min-width: 340px;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.generating-indicator-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.generating-bot-icon {
    width: 32px;
    height: 40px;
    flex-shrink: 0;
    animation: bot-pulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 211, 43, 0.4));
}

.generating-text {
    color: var(--qboid-yellow);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline;
    text-align: left;
}

.generating-dots {
    display: inline-flex;
    gap: 2px;
    margin-left: 2px;
    visibility: hidden; /* Hidden by default, shown after text types */
}

.generating-dots span {
    color: var(--qboid-yellow);
    font-size: 18px;
    font-weight: bold;
    animation: dot-blink 1.4s infinite;
}

.generating-dots span:nth-child(1) {
    animation-delay: 0s;
}

.generating-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.generating-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bot-pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 8px rgba(255, 211, 43, 0.4));
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
        filter: drop-shadow(0 0 12px rgba(255, 211, 43, 0.6));
    }
    50% {
        transform: scale(1.15) rotate(0deg);
        filter: drop-shadow(0 0 16px rgba(255, 211, 43, 0.8));
    }
    75% {
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 0 12px rgba(255, 211, 43, 0.6));
    }
}

@keyframes dot-blink {
    0%, 20%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* Workflow Titles Popup */
.workflow-titles-popup {
    margin-top: 12px;
    padding: 0;
    background: rgba(17, 24, 39, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 211, 43, 0.15);
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    animation: popup-appear 0.3s ease-out;
    display: flex;
    flex-direction: column;
    gap: 0;
}

@keyframes popup-appear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.workflow-title-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 0;
    background: rgba(255, 211, 43, 0.05);
    border-radius: 0;
    animation: item-appear 0.3s ease-out;
    line-height: 1;
}

.workflow-title-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.workflow-title-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

@keyframes item-appear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.workflow-checkmark {
    color: var(--qboid-yellow);
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    animation: checkmark-pop 0.3s ease-out;
}

@keyframes checkmark-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.workflow-title-text {
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Scrollbar styling for popup */
.workflow-titles-popup::-webkit-scrollbar {
    width: 6px;
}

.workflow-titles-popup::-webkit-scrollbar-track {
    background: rgba(255, 211, 43, 0.05);
    border-radius: 3px;
}

.workflow-titles-popup::-webkit-scrollbar-thumb {
    background: rgba(255, 211, 43, 0.3);
    border-radius: 3px;
}

.workflow-titles-popup::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 211, 43, 0.5);
}

/* Message text container for generating indicator */
.message-text:has(.generating-indicator) {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}
