/* Modern festive styles with animations */

/* Snowflake animation */
@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) translateX(100px);
        opacity: 0.5;
    }
}

@keyframes snowfall-left {
    0% {
        transform: translateY(-10vh) translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) translateX(-100px);
        opacity: 0.5;
    }
}

/* Generate multiple snowflakes */
.snowflake {
    position: absolute;
    top: -10vh;
    color: white;
    font-size: 1em;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Snowfall container - prevent horizontal overflow */
#snowfall {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Map marker bounce animation */
@keyframes marker-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Sleigh flying animation */
@keyframes sleigh-fly {
    0% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(5px) translateY(-2px);
    }

    100% {
        transform: translateX(0) translateY(0);
    }
}

/* Pulse glow effect for important elements */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgb(196 30 58 / 50%);
    }

    50% {
        box-shadow: 0 0 20px rgb(196 30 58 / 80%);
    }
}

/* Smooth marker transitions */
.leaflet-marker-icon {
    transition: all 0.5s ease-in-out;
}

/* Custom marker cluster styles */
.marker-cluster-small {
    background-color: rgb(196 30 58 / 60%);
}

.marker-cluster-small div {
    background-color: rgb(196 30 58 / 80%);
    color: white;
    font-weight: bold;
}

.marker-cluster-medium {
    background-color: rgb(22 91 51 / 60%);
}

.marker-cluster-medium div {
    background-color: rgb(22 91 51 / 80%);
    color: white;
    font-weight: bold;
}

.marker-cluster-large {
    background-color: rgb(255 215 0 / 60%);
}

.marker-cluster-large div {
    background-color: rgb(255 215 0 / 80%);
    color: #333;
    font-weight: bold;
}

/* Smooth transitions for all interactive elements */
button, a, .clickable {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
*:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .snowflake {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gradient-to-r,
    .bg-gradient-to-b,
    .bg-gradient-to-br {
        background: #C41E3A !important;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    #snowfall {
        display: none;
    }
    
    #map {
        page-break-inside: avoid;
    }
}

/* Legacy styles for compatibility */
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ensure map fills container properly */
#map {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentcolor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-left: 0.5em;
}

/* Responsive map height adjustments */
@media (width <= 768px) {
    #map {
        min-height: 400px;
    }
}

/* Santa icon animation on hover */
.santa-marker:hover {
    animation: markerBounce 0.6s ease-in-out;
}

/* Festive scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #165B33;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #C41E3A;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}