/**
 * Beautiful Order Receipt - Additional Animations
 */

/* Fade animations */
.bor-fade-in {
    animation: bor-fadeIn 0.5s ease-out forwards;
}

@keyframes bor-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide animations */
.bor-slide-up {
    animation: bor-slideUp 0.5s ease-out forwards;
}

@keyframes bor-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for buttons */
.bor-pulse {
    animation: bor-pulse 2s infinite;
}

@keyframes bor-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Bounce animation */
.bor-bounce {
    animation: bor-bounce 0.5s ease-out;
}

@keyframes bor-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Shake animation for errors */
.bor-shake {
    animation: bor-shake 0.5s ease-out;
}

@keyframes bor-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Glow effect */
.bor-glow {
    animation: bor-glow 2s ease-in-out infinite alternate;
}

@keyframes bor-glow {
    from {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5),
                    0 0 10px rgba(102, 126, 234, 0.3);
    }
    to {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.8),
                    0 0 20px rgba(102, 126, 234, 0.5);
    }
}

/* Confetti animation */
.bor-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.bor-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: bor-confetti-fall 3s ease-out forwards;
}

@keyframes bor-confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(-100px) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Stagger animation helper */
.bor-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.bor-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.bor-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.bor-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.bor-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.bor-stagger > *:nth-child(6) { animation-delay: 0.6s; }
.bor-stagger > *:nth-child(7) { animation-delay: 0.7s; }
.bor-stagger > *:nth-child(8) { animation-delay: 0.8s; }
.bor-stagger > *:nth-child(9) { animation-delay: 0.9s; }
.bor-stagger > *:nth-child(10) { animation-delay: 1s; }

/* Float animation */
.bor-float {
    animation: bor-float 3s ease-in-out infinite;
}

@keyframes bor-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Success checkmark animation (enhanced) */
.bor-success-icon {
    position: relative;
}

.bor-success-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: bor-ripple 1s ease-out forwards;
}

@keyframes bor-ripple {
    to {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

/* Button hover lift effect */
.bor-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bor-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Shimmer loading effect */
.bor-shimmer {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: bor-shimmer 1.5s infinite;
}

@keyframes bor-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Gradient animation */
.bor-gradient-animate {
    background-size: 200% 200%;
    animation: bor-gradient 3s ease infinite;
}

@keyframes bor-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
