/**
 * Live AI Description Styles
 */

/* Generating state */
.ai-generating {
    padding: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
    min-height: 100px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loading dots animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Typing cursor effect */
.ai-text.typing::after {
    content: '|';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* AI text styling */
.ai-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Complete state */
.complete .ai-text {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0.8;
    }
    to {
        opacity: 1;
    }
}

/* Error state */
.error {
    color: #d32f2f;
    padding: 20px;
    background: #ffebee;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ai-text {
        font-size: 14px;
        padding: 15px;
    }
    
    .ai-generating {
        padding: 15px;
        min-height: 80px;
    }
}
