/**
 * File: loader.css
 * Description: Defines styles for the loading animation with light and dark mode support and smooth transitions.
 * Author: Luke
 * Created: 2025-06-12
 * Updated: 2025-06-20
 * Version: 1.2.0
 */

/* Define CSS variables for light and dark modes */
:root {
    --loader-stroke: #003B5B;
    --transition-duration: 0.3s;
}

[data-theme="dark"] {
    --loader-stroke: #60A5FA;
}

/* Loader */
#loader {
    width: 3.25em;
    transform-origin: center;
    animation: rotate4 2s linear infinite;
    display: none;
    margin: 20px auto;
}

circle {
    fill: none;
    stroke: var(--loader-stroke);
    stroke-width: 2;
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: dash4 1.5s ease-in-out infinite;
    transition: stroke var(--transition-duration) ease;
}

/* Animations */
@keyframes rotate4 {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash4 {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dashoffset: -125px;
    }
}