/* ============================================
   DECOR PREMIUM CRM — Animation Library
   Reusable keyframes & utility classes
   ============================================ */

/* ── Shimmer / Skeleton Loading ── */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* ── Glow Pulse ── */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(198, 169, 108, 0.15);
    }

    50% {
        box-shadow: 0 0 20px rgba(198, 169, 108, 0.3), 0 0 40px rgba(198, 169, 108, 0.1);
    }
}

.animate-glow {
    animation: glowPulse 3s ease-in-out infinite;
}

/* ── Stagger Fade In Up ── */
@keyframes staggerFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item {
    opacity: 0;
    animation: staggerFadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stagger-item:nth-child(1) {
    animation-delay: var(--stagger-1);
}

.stagger-item:nth-child(2) {
    animation-delay: var(--stagger-2);
}

.stagger-item:nth-child(3) {
    animation-delay: var(--stagger-3);
}

.stagger-item:nth-child(4) {
    animation-delay: var(--stagger-4);
}

.stagger-item:nth-child(5) {
    animation-delay: var(--stagger-5);
}

.stagger-item:nth-child(6) {
    animation-delay: var(--stagger-6);
}

.stagger-item:nth-child(7) {
    animation-delay: var(--stagger-7);
}

/* ── Float / Hover ── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ── Gradient Background Shift ── */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ── Ripple Effect ── */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ── Shine Sweep (for cards) ── */
@keyframes shineSweep {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }

    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

/* ── Scale Pop ── */
@keyframes scalePop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    60% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pop {
    animation: scalePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ── Slide In Right (Toasts) ── */
@keyframes slideInRight {
    from {
        transform: translateX(120px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* ── Slide Out Right (Toast dismiss) ── */
@keyframes slideOutRight {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    to {
        transform: translateX(120px) scale(0.95);
        opacity: 0;
    }
}

/* ── Fade In ── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Fade In Up ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Slide Up (Page transitions) ── */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slideUp {
    animation: slideUp 0.3s ease forwards;
}

/* ── Bar Fill (Dashboard charts) ── */
@keyframes barFill {
    from {
        width: 0%;
    }
}

.animate-bar {
    animation: barFill 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Number Count Up ── */
@keyframes countPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.animate-count {
    animation: countPulse 0.3s ease;
}

/* ── Toast progress bar ── */
@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* ── Pulse Badge (improved) ── */
@keyframes pulseBadge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ── Ripple Dot ── */
@keyframes rippleDot {
    0% {
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(248, 113, 113, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
    }
}

/* ── Gradient text shimmer ── */
@keyframes textShimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold-light), var(--color-gold), var(--color-gold-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s linear infinite;
}