/* ============================================================
   Combat Animations — Global War Table Effects
   Shared animation keyframes and utility classes for the
   initiative tracker combat experience.
   ============================================================ */

/* === SPOTLIGHT ENTRANCE — card slides in when encounter starts === */
@keyframes rw-combat-card-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === DEFEAT ANIMATION — card shrinks out on death === */
@keyframes rw-combat-card-defeat {
    from {
        opacity: 1;
        transform: scale(1);
        filter: grayscale(0) brightness(1);
    }
    to {
        opacity: 0.5;
        transform: scale(0.96);
        filter: grayscale(0.7) brightness(0.6);
    }
}

/* === TURN START FLASH — brief gold highlight === */
@keyframes rw-turn-start-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(196, 160, 64, 0.6);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(196, 160, 64, 0.4);
    }
    100% {
        box-shadow: 0 0 12px 0 rgba(196, 160, 64, 0.2);
    }
}

/* === CONDITION APPLIED PULSE — arcane purple ripple === */
@keyframes rw-condition-applied {
    0% {
        box-shadow: 0 0 0 0 rgba(106, 74, 138, 0.5);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(106, 74, 138, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(106, 74, 138, 0);
    }
}

/* === LEGENDARY ACTION SPEND — gold pip drain === */
@keyframes rw-legendary-spend {
    0% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(196, 160, 64, 0.6);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(196, 160, 64, 0);
    }
}

/* === INITIATIVE ROLLED — bounce settle === */
@keyframes rw-init-rolled {
    0% { transform: translateY(-4px); opacity: 0; }
    60% { transform: translateY(2px); opacity: 1; }
    100% { transform: translateY(0); }
}

/* === BUTTON GLOW RINGS — localized press feedback === */
@keyframes rw-btn-glow-gold {
    0% { box-shadow: 0 0 0 0 rgba(196, 160, 64, 0.6); }
    50% { box-shadow: 0 0 16px 6px rgba(196, 160, 64, 0.25); }
    100% { box-shadow: 0 0 0 10px rgba(196, 160, 64, 0); }
}

@keyframes rw-btn-glow-cyan {
    0% { box-shadow: 0 0 0 0 rgba(72, 176, 192, 0.6); }
    50% { box-shadow: 0 0 16px 6px rgba(72, 176, 192, 0.25); }
    100% { box-shadow: 0 0 0 10px rgba(72, 176, 192, 0); }
}

@keyframes rw-btn-glow-blood {
    0% { box-shadow: 0 0 0 0 rgba(184, 58, 26, 0.6); }
    50% { box-shadow: 0 0 16px 6px rgba(184, 58, 26, 0.25); }
    100% { box-shadow: 0 0 0 10px rgba(184, 58, 26, 0); }
}

@keyframes rw-btn-glow-verdant {
    0% { box-shadow: 0 0 0 0 rgba(61, 138, 85, 0.6); }
    50% { box-shadow: 0 0 16px 6px rgba(61, 138, 85, 0.25); }
    100% { box-shadow: 0 0 0 10px rgba(61, 138, 85, 0); }
}

/* === SPOTLIGHT SWEEP — golden wash on active combatant turn change === */
@keyframes rw-spotlight-sweep {
    0% { box-shadow: -20px 0 30px rgba(196, 160, 64, 0.4); }
    40% { box-shadow: 0 0 24px rgba(196, 160, 64, 0.5); }
    100% { box-shadow: 0 0 14px rgba(196, 160, 64, 0.2); }
}

/* === HOTBAR TOGGLE GLOW — ring pulse on drawer open === */
@keyframes rw-hotbar-toggle-glow {
    0% { box-shadow: 0 0 0 0 rgba(196, 160, 64, 0.5); }
    60% { box-shadow: 0 0 12px 4px rgba(196, 160, 64, 0.15); }
    100% { box-shadow: 0 0 0 6px rgba(196, 160, 64, 0); }
}
