/**
 * Christmas Festival Theme CSS - OVERLAY EFFECTS ONLY
 * Standard CSS for Hyva theme compatibility
 * Creates overlay effects WITHOUT modifying existing theme
 * All effects are positioned as overlays that don't interfere with existing design
 * NO modifications to existing theme elements - PURE OVERLAY SYSTEM
 * 
 * IMPORTANT: Effects only show when JavaScript adds the specific classes
 * This ensures admin configuration controls visibility
 */

/**
 * Christmas Theme CSS - Reference Implementation
 * Only includes CSS for: Snow Web Component, Running Santa, Christmas Tree
 */

/* Main Christmas Effects Container */
#christmas-effects-container.christmas-effects-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
    /* Hidden by default, shown only after full page load via JavaScript */
    display: none;
}

/* Show container only when JavaScript has initialized it */
#christmas-effects-container.christmas-effects-container[data-initialized="true"],
#christmas-effects-container.christmas-effects-container.initialized {
    display: block;
}

#christmas-effects-container * {
    pointer-events: none;
}

/* Running Santa Animation - Reference Implementation */
@keyframes running-santa {
    0% {
        left: -300px;
        top: 5%;
        transform: scaleX(1) rotate(-15deg);
    }
    1% {
        left: -300px;
        top: 5%;
        transform: scaleX(1) rotate(-15deg);
    }
    11% {
        left: calc(100% + 300px);
        top: 40%;
        transform: scaleX(1) rotate(10deg);
    }
    16% {
        left: calc(100% + 300px);
        top: 40%;
        transform: scaleX(1) rotate(10deg);
    }
    16.5% {
        left: calc(100% + 300px);
        top: 35%;
        transform: scaleX(-1) rotate(10deg);
    }
    23% {
        left: -300px;
        top: 8%;
        transform: scaleX(-1) rotate(-15deg);
    }
    28% {
        left: -300px;
        top: 8%;
        transform: scaleX(-1) rotate(-15deg);
    }
    28.5% {
        left: -300px;
        top: 60%;
        transform: scaleX(1) rotate(20deg);
    }
    35% {
        left: calc(100% + 300px);
        top: 20%;
        transform: scaleX(1) rotate(-20deg);
    }
    40% {
        left: calc(100% + 300px);
        top: 20%;
        transform: scaleX(1) rotate(-20deg);
    }
    40.5% {
        left: calc(100% + 300px);
        top: 75%;
        transform: scaleX(-1) rotate(-15deg);
    }
    47% {
        left: -300px;
        top: 45%;
        transform: scaleX(-1) rotate(12deg);
    }
    52% {
        left: -300px;
        top: 45%;
        transform: scaleX(-1) rotate(12deg);
    }
    52.5% {
        left: -300px;
        top: 12%;
        transform: scaleX(1) rotate(18deg);
    }
    59% {
        left: calc(100% + 300px);
        top: 65%;
        transform: scaleX(1) rotate(-18deg);
    }
    64% {
        left: calc(100% + 300px);
        top: 65%;
        transform: scaleX(1) rotate(-18deg);
    }
    64.5% {
        left: calc(100% + 300px);
        top: 25%;
        transform: scaleX(-1) rotate(-22deg);
    }
    71% {
        left: -300px;
        top: 80%;
        transform: scaleX(-1) rotate(22deg);
    }
    76% {
        left: -300px;
        top: 80%;
        transform: scaleX(-1) rotate(22deg);
    }
    76.5% {
        left: -300px;
        top: 30%;
        transform: scaleX(1) rotate(12deg);
    }
    83% {
        left: calc(100% + 300px);
        top: 70%;
        transform: scaleX(1) rotate(-8deg);
    }
    88% {
        left: calc(100% + 300px);
        top: 70%;
        transform: scaleX(1) rotate(-8deg);
    }
    88.5% {
        left: calc(100% + 300px);
        top: 15%;
        transform: scaleX(-1) rotate(-25deg);
    }
    95% {
        left: -300px;
        top: 50%;
        transform: scaleX(-1) rotate(25deg);
    }
    100% {
        left: -300px;
        top: 50%;
        transform: scaleX(-1) rotate(25deg);
    }
}

/* Snow Effect Web Component - High z-index to appear above all content */
#christmas-effects-container sk-animation {
    z-index: 99999 !important;
    position: fixed !important;
    pointer-events: none !important;
}

#christmas-effects-container sk-animation * {
    pointer-events: none !important;
}

#christmas-effects-container .sk-animation-running-santa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    z-index: 99998;
    pointer-events: none;
    overflow: hidden;
}

#christmas-effects-container .sk-animation-running-santa img {
    position: absolute;
    left: -300px;
    width: 300px;
    height: auto;
    object-fit: contain;
    animation: running-santa 100s linear infinite;
}

@media (max-width: 768px) {
    #christmas-effects-container .sk-animation-running-santa img {
        width: 200px;
        left: -200px;
    }
    
    #christmas-effects-container .sk-animation-christmas-tree {
        right: 0;
    }
    
    #christmas-effects-container .sk-animation-christmas-tree img {
        width: 100px;
    }
}

/* Christmas Tree - Reference Implementation */
#christmas-effects-container .sk-animation-christmas-tree {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: auto;
    height: auto;
    z-index: 99998;
    pointer-events: none;
}

#christmas-effects-container .sk-animation-christmas-tree img {
    width: 230px;
    height: auto;
}



/* Performance Optimization - Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
    #christmas-effects-container sk-animation,
    #christmas-effects-container .sk-animation-running-santa,
    #christmas-effects-container .sk-animation-christmas-tree {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
} 