/* Veila App - Animations & Micro-interactions */

/* Moon Loading Animation */
.moon-loading {
    display: inline-block;
    font-size: 1.5rem;
    animation: moonPulse 2s ease-in-out infinite;
}

@keyframes moonPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 0.7;
    }
    25% { 
        transform: scale(1.1) rotate(5deg);
        opacity: 0.9;
    }
    50% { 
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }
    75% { 
        transform: scale(1.1) rotate(-5deg);
        opacity: 0.9;
    }
}

/* AI Loading Messages */
.ai-loading-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Simplified loading message without card styling */
.loading-message-simple {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.5rem 0 !important;
    margin: 0.5rem auto !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-message-simple .moon-loading {
    font-size: 1.2rem;
}

/* Enhanced loading message with branded text */
.loading-message-enhanced {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1rem 0 !important;
    margin: 0.5rem auto !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-style: italic;
    font-weight: 300;
    text-align: center;
    min-height: 1.2rem;
    opacity: 0.8;
    animation: textFade 1.2s ease-in-out infinite;
}

.loading-content .moon-loading {
    font-size: 1.5rem;
}

@keyframes textFade {
    0%, 100% { 
        opacity: 0.6;
    }
    50% { 
        opacity: 0.9;
    }
}

/* Apply moon animation to workspace loading messages */
.ai-message.loading {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.25rem !important;
    margin: 0.25rem 0 !important;
}

.ai-message.loading .ai-message-header {
    display: none;
}

.ai-message.loading .ai-message-content {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: none !important;
    padding: 0 !important;
}

.ai-message.loading .ai-message-content:before {
    content: "🌙";
    animation: moonPulse 2s ease-in-out infinite;
}

/* Message Slide Animation */
@keyframes messageSlide {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Micro-interactions */
@keyframes magneticPulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

@keyframes shimmerGold {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* CTA Button Shimmer Effect */
.cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.1), transparent);
    background-size: 200px 100%;
    animation: shimmerGold 3s infinite;
    pointer-events: none;
}

/* Feature Card Hover Effect */
.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.feature-card:hover::after {
    opacity: 1;
}

/* Success Pulse Animation */
.success-pulse {
    animation: magneticPulse 2s infinite;
}

/* Enhanced Loading Dots */
.loading-dot {
    width: 0.4rem;
    height: 0.4rem;
    background: linear-gradient(45deg, var(--accent-electric), var(--accent-rose-gold));
    border-radius: 50%;
    animation: loading 1.4s ease-in-out infinite both;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* Text Selection */
::selection {
    background: rgba(124, 58, 237, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(124, 58, 237, 0.3);
    color: var(--text-primary);
}

/* Fade In Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Utility Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}