/**
 * Öğretmen listesi yüklenirken gösterilen overlay ve animasyon.
 * Sadece öğretmen listesi alanını kaplar; harici kütüphane yok.
 */

/* Wrapper: loading overlay sadece bu alanı kaplasın */
.teachers-list-section {
    position: relative;
    min-height: 320px;
    margin-top: 1rem;
}

/* Overlay – soft gri + hafif blur, öğretmen grid alanıyla aynı bölge */
.teachers-list-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    z-index: 10;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.teachers-list-loading--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Spinner – sade, kurumsal daire animasyonu */
.teachers-list-loading__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: teachers-loading-spin 0.85s linear infinite;
}

.teachers-list-loading__text {
    font-size: 1rem;
    font-weight: 500;
    color: #475569;
    letter-spacing: 0.02em;
}

.teachers-list-loading__dots {
    display: inline-block;
    min-width: 1.2em;
    text-align: left;
    animation: teachers-loading-pulse 1.2s ease-in-out infinite;
}

@keyframes teachers-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes teachers-loading-pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

/* Mobil uyum */
@media (max-width: 768px) {
    .teachers-list-section {
        min-height: 260px;
    }

    .teachers-list-loading {
        min-height: 240px;
        padding: 1.5rem;
        border-radius: 12px;
    }

    .teachers-list-loading__spinner {
        width: 40px;
        height: 40px;
        border-width: 2.5px;
    }

    .teachers-list-loading__text {
        font-size: 0.9375rem;
    }
}

/* Dark theme (sayfa tema değişkeni kullanıyorsa) */
html[data-theme="dark"] .teachers-list-loading,
html.dark-theme .teachers-list-loading {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(51, 65, 85, 0.8);
}

html[data-theme="dark"] .teachers-list-loading__spinner,
html.dark-theme .teachers-list-loading__spinner {
    border-color: rgba(96, 165, 250, 0.25);
    border-top-color: #60a5fa;
}

html[data-theme="dark"] .teachers-list-loading__text,
html.dark-theme .teachers-list-loading__text {
    color: #94a3b8;
}
