﻿/* From Uiverse.io by Userluckytian */

/* display loader in center start */
.loading {
    position: fixed; /* To ensure it's positioned relative to the viewport */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the loader */
    z-index: 9999; /* High z-index to stay on top of other elements */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Full width for responsiveness */
    height: 100%; /* Full height for responsiveness */
    background-color: rgba(255, 255, 255, 0.8); /* Optional: A semi-transparent background */
}

    .loading svg {
        height: 96px; /* Increased size */
        width: 128px; /* Increased size */
    }

#back, #front, #front2 {
    stroke: #007bff; /* Adjust loader color (example: Bootstrap Primary) */
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: dash 1.5s infinite ease-in-out;
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* display loader in center end */
.loading svg polyline {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

    .loading svg polyline#back {
        fill: none;
        stroke: #ff4d5033;
    }

    .loading svg polyline#front {
        fill: none;
        stroke: #00ffff;
        stroke-dasharray: 48, 144;
        stroke-dashoffset: 192;
        animation: dash_682 2s linear infinite;
        animation-delay: 0s;
    }

    .loading svg polyline#front2 {
        fill: none;
        stroke: #00ffff;
        stroke-dasharray: 48, 144;
        stroke-dashoffset: 192;
        animation: dash_682 2s linear infinite;
        animation-delay: 1s;
    }

@keyframes dash_682 {
    72.5% {
        opacity: 0;
    }

    to {
        stroke-dashoffset: 0;
    }
}
