﻿/* Loader */
.page-loader {
    position: fixed;
    inset: 0;
    background: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

    .page-loader.hide {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

.infinity-loader {
    width: 100px;
    height: 50px;
    filter: drop-shadow(0 4px 16px rgba(59, 130, 246, 0.4));
}

.infinity-path {
    fill: none;
    stroke: url(#loaderGradient);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    /*      * Bu satır "boyutu değişmeyen çizgiyi" oluşturur. 
     * 120 birimlik görünür bir çizgi ve 265 birimlik görünmez bir boşluk tanımlar.
    */
    stroke-dasharray: 80 305;
    stroke-dashoffset: 0;
    /*      * Bu satır animasyonu tanımlar:
     * 3s: Animasyonun toplam süresi.
     * ease-in-out: Hızlanıp yavaşlama efekti için.
     * infinite: Sonsuz döngü için.
    */
    animation: infinityMove 4s ease-in-out infinite;
    will-change: stroke-dashoffset;
}

/*  * Bu keyframe, çizginin "görünmez yol" üzerinde kesintisizce 
 * ve sıfırlanma hissi olmadan hareket etmesini sağlar.
 */
@keyframes infinityMove {
    0% {
        stroke-dashoffset: 385;
    }

    100% {
        stroke-dashoffset: -385;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .infinity-loader {
        width: 80px;
        height: 40px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .infinity-path {
        animation-duration: 5s;
    }
}
