/* Animaciones Navideñas Mejoradas para la Calculadora de Salario de Navidad */

/* Respetar prefers-reduced-motion para accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Efecto de nieve sutil con máscara */
.snow-container {
    overflow: hidden;
    pointer-events: none;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 0.8em;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.6);
    animation: snowfall linear infinite;
    z-index: 1;
    opacity: 0.7;
}

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

/* Luces navideñas mejoradas */
.christmas-lights {
    position: relative;
}

.light {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: twinkle 1.8s ease-in-out infinite;
    box-shadow: 0 0 8px currentColor;
}

.light:nth-child(3n+1) {
    background: #ef4444;
    color: #ef4444;
}

.light:nth-child(3n+2) {
    background: #10b981;
    color: #10b981;
}

.light:nth-child(3n+3) {
    background: #f59e0b;
    color: #f59e0b;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.8);
        filter: drop-shadow(0 0 0 currentColor);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px currentColor);
    }
}

/* Efecto de brillo diagonal mejorado */
@keyframes shine {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }
    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

.animate-shine {
    animation: shine 2s ease-in-out infinite;
}

/* Animación de regalo mejorada */
@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

.animate-giftBounce {
    animation: giftBounce 2s ease-in-out infinite;
}

/* Efecto de pulso navideño sutil */
@keyframes christmas-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Efecto de gradiente animado sutil */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Efecto de confeti mejorado */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #ef4444, #10b981, #f59e0b, #8b5cf6);
    animation: confetti-fall 3s linear infinite;
    border-radius: 2px;
}

/* Efecto de estrella brillante */
@keyframes star-twinkle {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.8) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(180deg);
    }
}

.star-twinkle {
    animation: star-twinkle 2s ease-in-out infinite;
}

/* Efecto de nieve sutil con CSS */
@keyframes snow {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 1000px 2000px, -500px 1500px, 500px 1000px;
    }
}

.animate-snowslow {
    animation: snow 22s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .snowflake {
        font-size: 0.6em;
    }
    
    .light {
        width: 4px;
        height: 4px;
    }
    
    .confetti {
        width: 6px;
        height: 6px;
    }
}

/* Efectos de hover mejorados */
.group:hover .animate-shimmer {
    animation-duration: 1s;
}

.christmas-lights:hover .light {
    animation-duration: 0.8s;
}

/* Efectos de focus para accesibilidad */
.focus-visible\:ring-amber-300\/70:focus-visible {
    --tw-ring-color: rgb(252 211 77 / 0.7);
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

/* Efectos de transición suaves */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Efectos de escala mejorados */
.hover\:scale-\[1\.015\]:hover {
    transform: scale(1.015);
}

.active\:scale-\[0\.98\]:active {
    transform: scale(0.98);
}

/* Efectos de sombra mejorados */
.shadow-xl {
    --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.hover\:shadow-2xl:hover {
    --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
