/* Radio Insular Web Popup - Animations */

/* Visualizer Animations */
@keyframes visualizer-bar {
    0%, 100% {
        transform: scaleY(0.3);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(0.4);
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary);
    }
    50% {
        box-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

/* Loading Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes wave {
    0%, 60%, 100% {
        transform: initial;
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* Wobble Animation */
@keyframes wobble {
    0% {
        transform: translateX(0%);
    }
    15% {
        transform: translateX(-25%) rotate(-5deg);
    }
    30% {
        transform: translateX(20%) rotate(3deg);
    }
    45% {
        transform: translateX(-15%) rotate(-3deg);
    }
    60% {
        transform: translateX(10%) rotate(2deg);
    }
    75% {
        transform: translateX(-5%) rotate(-1deg);
    }
    100% {
        transform: translateX(0%);
    }
}

/* Flip Animation */
@keyframes flip {
    from {
        transform: perspective(400px) rotateY(0);
        animation-timing-function: ease-out;
    }
    40% {
        transform: perspective(400px) translateZ(150px) rotateY(170deg);
        animation-timing-function: ease-out;
    }
    50% {
        transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1);
        animation-timing-function: ease-in;
    }
    80% {
        transform: perspective(400px) rotateY(360deg) scale(0.95);
        animation-timing-function: ease-in;
    }
    to {
        transform: perspective(400px) scale(1);
        animation-timing-function: ease-in;
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
    }
    50% {
        text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary);
    }
}

/* Progress Bar Animation */
@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Heartbeat Animation */
@keyframes heartbeat {
    0%, 50%, 100% {
        transform: scale(1);
    }
    25%, 75% {
        transform: scale(1.1);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.4s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.4s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.4s ease-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

.scale-out {
    animation: scaleOut 0.3s ease-out;
}

.zoom-in {
    animation: zoomIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.wobble {
    animation: wobble 1s ease-in-out;
}

.bounce {
    animation: bounce 1s ease-in-out;
}

.flip {
    animation: flip 0.6s ease-in-out;
}

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

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

.rotate {
    animation: rotate 2s linear infinite;
}

.spin {
    animation: spin 1s linear infinite;
}

/* Delayed Animations */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Animation Durations */
.duration-fast {
    animation-duration: 0.15s;
}

.duration-normal {
    animation-duration: 0.3s;
}

.duration-slow {
    animation-duration: 0.5s;
}

.duration-slower {
    animation-duration: 1s;
}

/* Animation Fill Modes */
.fill-forwards {
    animation-fill-mode: forwards;
}

.fill-backwards {
    animation-fill-mode: backwards;
}

.fill-both {
    animation-fill-mode: both;
}

/* Animation Iteration Counts */
.infinite {
    animation-iteration-count: infinite;
}

.once {
    animation-iteration-count: 1;
}

.twice {
    animation-iteration-count: 2;
}

/* Animation Play States */
.paused {
    animation-play-state: paused;
}

.running {
    animation-play-state: running;
}

/* Hover Animations */
.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px var(--primary);
    transition: box-shadow 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.2s ease;
}

/* Focus Animations */
.focus-pulse:focus {
    animation: pulse-glow 1s ease-in-out;
}

.focus-scale:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Loading State Animations */
.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Stagger Animation for Lists */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }
.stagger-item:nth-child(9) { animation-delay: 0.9s; }
.stagger-item:nth-child(10) { animation-delay: 1s; }

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .pulse-dot,
    .pulse-glow,
    .heartbeat,
    .float,
    .rotate,
    .spin {
        animation: none !important;
    }
}
