/* 
 * Santa Flying Animation
 * Lightweight SVG-based animation with random flight paths
 */

/* Santa Container */
#santa-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    width: 150px;
    height: 100px;
}

/* Santa SVG wrapper */
#santa-sleigh {
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* Random flight path animations */
@keyframes fly-diagonal-1 {
    0% {
        left: -200px;
        top: 20%;
        transform: scale(1) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(0deg);
    }
    100% {
        left: 110%;
        top: 10%;
        transform: scale(0.8) rotate(5deg);
    }
}

@keyframes fly-diagonal-2 {
    0% {
        left: -200px;
        top: 30%;
        transform: scale(0.8) rotate(-10deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        left: 110%;
        top: 15%;
        transform: scale(1) rotate(10deg);
    }
}

@keyframes fly-wave {
    0% {
        left: -200px;
        top: 25%;
        transform: translateY(0) rotate(-5deg);
    }
    25% {
        transform: translateY(-30px) rotate(0deg);
    }
    50% {
        transform: translateY(0) rotate(5deg);
    }
    75% {
        transform: translateY(-20px) rotate(0deg);
    }
    100% {
        left: 110%;
        top: 25%;
        transform: translateY(0) rotate(5deg);
    }
}

@keyframes fly-arc {
    0% {
        left: -200px;
        top: 40%;
        transform: scale(0.9) rotate(-8deg);
    }
    30% {
        top: 15%;
        transform: scale(1.1) rotate(2deg);
    }
    70% {
        top: 10%;
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        left: 110%;
        top: 20%;
        transform: scale(1) rotate(8deg);
    }
}

@keyframes fly-spiral {
    0% {
        left: -200px;
        top: 35%;
        transform: scale(0.9) rotate(-15deg);
    }
    25% {
        top: 20%;
        transform: scale(1) rotate(-5deg);
    }
    50% {
        top: 12%;
        transform: scale(1.15) rotate(5deg);
    }
    75% {
        top: 22%;
        transform: scale(1.05) rotate(-8deg);
    }
    100% {
        left: 110%;
        top: 18%;
        transform: scale(0.9) rotate(15deg);
    }
}

@keyframes fly-swoop {
    0% {
        left: -200px;
        top: 15%;
        transform: scale(1) rotate(-12deg);
    }
    40% {
        top: 35%;
        transform: scale(1.1) rotate(0deg);
    }
    70% {
        top: 20%;
        transform: scale(1.2) rotate(8deg);
    }
    100% {
        left: 110%;
        top: 25%;
        transform: scale(0.85) rotate(5deg);
    }
}

@keyframes fly-smooth-climb {
    0% {
        left: -200px;
        top: 40%;
        transform: scale(0.95) rotate(-8deg);
    }
    20% {
        top: 35%;
        transform: scale(1) rotate(-4deg);
    }
    40% {
        top: 25%;
        transform: scale(1.1) rotate(0deg);
    }
    60% {
        top: 15%;
        transform: scale(1.15) rotate(4deg);
    }
    80% {
        top: 10%;
        transform: scale(1.2) rotate(8deg);
    }
    100% {
        left: 110%;
        top: 12%;
        transform: scale(0.9) rotate(12deg);
    }
}

@keyframes fly-zigzag {
    0% {
        left: -200px;
        top: 28%;
        transform: scale(1) rotate(-6deg);
    }
    20% {
        top: 18%;
        transform: scale(1.08) rotate(2deg);
    }
    40% {
        top: 32%;
        transform: scale(1.12) rotate(-4deg);
    }
    60% {
        top: 16%;
        transform: scale(1.1) rotate(4deg);
    }
    80% {
        top: 28%;
        transform: scale(1.05) rotate(-3deg);
    }
    100% {
        left: 110%;
        top: 20%;
        transform: scale(0.88) rotate(6deg);
    }
}

/* Santa animation classes - assigned randomly */
#santa-container.path-1 {
    animation: fly-diagonal-1 30s ease-in-out;
}

#santa-container.path-2 {
    animation: fly-diagonal-2 30s ease-in-out;
}

#santa-container.path-3 {
    animation: fly-wave 30s ease-in-out;
}

#santa-container.path-4 {
    animation: fly-arc 30s ease-in-out;
}

#santa-container.path-5 {
    animation: fly-spiral 30s ease-in-out;
}

#santa-container.path-6 {
    animation: fly-swoop 30s ease-in-out;
}

#santa-container.path-7 {
    animation: fly-smooth-climb 30s ease-in-out;
}

#santa-container.path-8 {
    animation: fly-zigzag 30s ease-in-out;
}

/* Sleigh rocking animation */
@keyframes sleigh-rock {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(2deg);
    }
    75% {
        transform: rotate(-2deg);
    }
}

#santa-sleigh {
    animation: sleigh-rock 1s ease-in-out infinite;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    #santa-container {
        animation: none !important;
        display: none;
    }
    
    #santa-sleigh {
        animation: none !important;
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    #santa-container {
        width: 100px;
        height: 70px;
    }
}
