/**
 * Prime RoadRunners - Christmas Theme 2024
 * Festive styling for the holiday season
 */

/* Christmas Color Variables */
:root {
    --christmas-red: #c41e3a;
    --christmas-green: #0f7a3e;
    --christmas-gold: #ffd700;
    --christmas-white: #fffafa;
    --christmas-dark-red: #8b0000;
    --christmas-light-green: #90ee90;
    --christmas-snow: #ffffff;
}

/* Snowfall Animation */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowfall;
    animation-duration: 10s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    color: var(--christmas-snow);
    font-size: 1em;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10px) translateX(0) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(100px) rotate(360deg);
        opacity: 0.3;
    }
}

/* Christmas Gradient Background */
.christmas-bg {
    background: linear-gradient(135deg,
        #c41e3a 0%,
        #0f7a3e 50%,
        #c41e3a 100%) !important;
    background-size: 200% 200% !important;
    animation: christmas-gradient 15s ease infinite !important;
}

@keyframes christmas-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Christmas Header Decoration */
.christmas-header::before {
    content: '🎄';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    animation: twinkle 2s ease-in-out infinite;
}

.christmas-header::after {
    content: '🎅';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    animation: twinkle 2s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.6; transform: translateY(-50%) scale(1.1); }
}

/* Christmas Lights Border */
.christmas-lights {
    position: relative;
    border-top: 4px solid transparent;
    border-image: repeating-linear-gradient(
        90deg,
        var(--christmas-red) 0px,
        var(--christmas-red) 20px,
        var(--christmas-green) 20px,
        var(--christmas-green) 40px,
        var(--christmas-gold) 40px,
        var(--christmas-gold) 60px
    );
    border-image-slice: 1;
    animation: lights-flow 3s linear infinite;
}

@keyframes lights-flow {
    0% { border-image-source: repeating-linear-gradient(90deg, var(--christmas-red) 0px, var(--christmas-red) 20px, var(--christmas-green) 20px, var(--christmas-green) 40px, var(--christmas-gold) 40px, var(--christmas-gold) 60px); }
    33% { border-image-source: repeating-linear-gradient(90deg, var(--christmas-green) 0px, var(--christmas-green) 20px, var(--christmas-gold) 20px, var(--christmas-gold) 40px, var(--christmas-red) 40px, var(--christmas-red) 60px); }
    66% { border-image-source: repeating-linear-gradient(90deg, var(--christmas-gold) 0px, var(--christmas-gold) 20px, var(--christmas-red) 20px, var(--christmas-red) 40px, var(--christmas-green) 40px, var(--christmas-green) 60px); }
    100% { border-image-source: repeating-linear-gradient(90deg, var(--christmas-red) 0px, var(--christmas-red) 20px, var(--christmas-green) 20px, var(--christmas-green) 40px, var(--christmas-gold) 40px, var(--christmas-gold) 60px); }
}

/* Christmas Card Styling */
.christmas-card {
    position: relative;
    border: 2px solid var(--christmas-gold);
    box-shadow: 0 8px 24px rgba(196, 30, 58, 0.2),
                inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.christmas-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        var(--christmas-red),
        var(--christmas-gold),
        var(--christmas-green),
        var(--christmas-red));
    background-size: 400% 400%;
    z-index: -1;
    border-radius: inherit;
    animation: christmas-border-glow 4s ease infinite;
    opacity: 0.3;
}

@keyframes christmas-border-glow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Christmas Button Styling */
.christmas-btn {
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-dark-red)) !important;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4) !important;
    position: relative;
    overflow: hidden;
}

.christmas-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: christmas-btn-shimmer 3s ease infinite;
    pointer-events: none;
}

@keyframes christmas-btn-shimmer {
    0%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.christmas-btn:hover {
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6) !important;
}

/* Christmas Status Badges */
.status-pending.christmas-mode {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b6914;
    border: 2px solid #ffd700;
}

.status-accepted.christmas-mode {
    background: linear-gradient(135deg, #0f7a3e, #90ee90);
    color: #ffffff;
    border: 2px solid #0f7a3e;
}

.status-delivered.christmas-mode {
    background: linear-gradient(135deg, #c41e3a, #ff6b6b);
    color: #ffffff;
    border: 2px solid #c41e3a;
}

/* Christmas Toast Notifications */
.notification.christmas-mode {
    background: linear-gradient(135deg, var(--christmas-red), var(--christmas-dark-red));
    border: 2px solid var(--christmas-gold);
    box-shadow: 0 8px 20px rgba(196, 30, 58, 0.4);
}

.notification.christmas-mode::before {
    content: '🎄 ';
    font-size: 1.2em;
}

/* Christmas Loading Spinner */
.loading.christmas-mode {
    border: 3px solid var(--christmas-light-green);
    border-top: 3px solid var(--christmas-red);
    animation: spin 0.8s linear infinite, christmas-spinner-color 2s ease infinite;
}

@keyframes christmas-spinner-color {
    0%, 100% { border-top-color: var(--christmas-red); }
    33% { border-top-color: var(--christmas-green); }
    66% { border-top-color: var(--christmas-gold); }
}

/* Christmas Order Item */
.order-item.christmas-mode {
    border-left: 4px solid var(--christmas-red);
    background: linear-gradient(to right, rgba(196, 30, 58, 0.05), rgba(255, 255, 255, 0.95));
}

.order-item.christmas-mode:hover {
    background: linear-gradient(to right, rgba(15, 122, 62, 0.05), rgba(255, 255, 255, 0.95));
    border-left-color: var(--christmas-green);
}

/* Christmas Stats Card */
.stat-card.christmas-mode {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95),
        rgba(255, 215, 0, 0.1));
    border: 2px solid var(--christmas-gold);
    position: relative;
    overflow: hidden;
}

.stat-card.christmas-mode::before {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2em;
    opacity: 0.2;
    animation: twinkle 2s ease-in-out infinite;
}

/* Christmas Badge */
.christmas-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-gold));
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 10px;
    animation: christmas-badge-pulse 2s ease-in-out infinite;
}

@keyframes christmas-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Christmas Modal */
.modal-content.christmas-mode {
    border: 3px solid var(--christmas-gold);
    box-shadow: 0 15px 40px rgba(196, 30, 58, 0.3);
}

/* Christmas Greeting Banner */
.christmas-greeting {
    background: linear-gradient(135deg, #c41e3a, #0f7a3e);
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: christmas-greeting-glow 3s ease-in-out infinite;
}

.christmas-greeting::before {
    content: '🎅 ';
}

.christmas-greeting::after {
    content: ' 🎄';
}

@keyframes christmas-greeting-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3); }
    50% { box-shadow: 0 6px 25px rgba(196, 30, 58, 0.6); }
}

/* Santa Sleigh Animation */
.santa-sleigh {
    position: fixed;
    bottom: 20px;
    right: -200px;
    font-size: 3em;
    z-index: 9998;
    animation: santa-fly 20s linear infinite;
    pointer-events: none;
}

@keyframes santa-fly {
    0% { right: -200px; bottom: 20px; }
    10% { right: 50%; bottom: 80vh; }
    20% { right: 100%; bottom: 20px; }
    100% { right: 100%; bottom: 20px; }
}

/* Christmas Tree Decoration */
.christmas-tree-decoration {
    position: fixed;
    bottom: 0;
    left: 20px;
    font-size: 4em;
    z-index: 10;
    animation: tree-sway 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tree-sway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .snowflake {
        font-size: 0.8em;
    }

    .christmas-header::before,
    .christmas-header::after {
        font-size: 1.5em;
    }

    .santa-sleigh {
        font-size: 2em;
    }

    .christmas-tree-decoration {
        font-size: 3em;
        left: 10px;
    }
}

/* Toggle Christmas Mode */
.christmas-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-green));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.christmas-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.christmas-toggle::before {
    content: '🎄 ';
}
