﻿.ai-loader {
    --ai-text: #444;
    --ai-subtle: #e0e0e0;
    --ai-accent: #4A90E2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    margin: 20px 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--ai-text);
    text-align: center;
}

/* Dark mode override */
.ai-loader--dark {
    --ai-text: #f1f1f1;
    --ai-subtle: rgba(255,255,255,0.25);
    --ai-accent: #6CB6FF;
}

.hidden {
    display: none !important;
}

/* Spinner */
.ai-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid var(--ai-subtle);
    border-top: 4px solid var(--ai-accent);
    border-radius: 50%;
    animation: ai-spin 0.9s linear infinite;
    margin-bottom: 14px;
}

@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mesaj yazısı */
.ai-message {
    font-size: 15px;
    min-height: 22px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Fade animasyonu */
.ai-fade-out {
    opacity: 0;
    transform: translateY(4px);
}

.ai-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Nokta animasyonu */
.ai-message::after {
    content: '';
    display: inline-block;
    width: 18px;
    text-align: left;
    animation: ai-dots 1.5s steps(3, end) infinite;
}

@keyframes ai-dots {
    0% {
        content: '';
    }

    33% {
        content: '.';
    }

    66% {
        content: '..';
    }

    100% {
        content: '...';
    }
}



/*2. ai loder*/

.ai-thinking-container {
    position: relative;
}

/* İçerik blur */
.ai-thinking-active > *:not(.ai-thinking-overlay) {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

/* Overlay */
.ai-thinking-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: inherit;
    z-index: 999;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Spinner */
.ai-spinner {
    width: 54px;
    height: 54px;
    border: 5px solid #dbeafe;
    border-top: 5px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Text */
.ai-thinking-text {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a8a;
}

    .ai-thinking-text span {
        animation: blink 1.4s infinite;
    }

        .ai-thinking-text span:nth-child(2) {
            animation-delay: .2s;
        }

        .ai-thinking-text span:nth-child(3) {
            animation-delay: .4s;
        }

@keyframes blink {
    0%,80%,100% {
        opacity: .2;
    }

    40% {
        opacity: 1;
    }
}