/* ============================================
   ANIMATIONS.CSS
   Consolidated animation library for Remote Lockers
   ============================================ */

/* --------------------------------------------
   GRADIENT ANIMATIONS
   -------------------------------------------- */

/* Custom gradient animation */
@keyframes gradient {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

@keyframes gradient-x {
    0%,
    100% {
        transform: translateX(0%);
    }
    50% {
        transform: translateX(-100%);
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* --------------------------------------------
   SLIDE ANIMATIONS
   -------------------------------------------- */

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

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

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

@keyframes slideInAndHighlight {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    60% {
        opacity: 1;
        transform: translateX(2px);
    }
    80% {
        background-color: rgba(45, 212, 191, 0.2);
    }
    100% {
        background-color: transparent;
    }
}


/* Toast Animations */

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* --------------------------------------------
   FADE ANIMATIONS
   -------------------------------------------- */

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

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


/* Modal backdrop animation */
@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal content animation */
@keyframes scaleInModal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --------------------------------------------
   BAR/CHART ANIMATIONS
   -------------------------------------------- */

@keyframes growBar {
    from {
        width: 0;
    }
    to {
        width: var(--bar-width, 100%);
    }
}

@keyframes expand-line {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* --------------------------------------------
   LOADING/SHIMMER ANIMATIONS
   -------------------------------------------- */

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------
   PULSE ANIMATIONS
   -------------------------------------------- */

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes subtle-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}


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

/* --------------------------------------------
   PROGRESS ANIMATIONS
   -------------------------------------------- */

@keyframes progress {
    from {
        width: 0;
    }
    to {
        width: var(--progress);
    }
}

/* --------------------------------------------
   UTILITY CLASSES
   -------------------------------------------- */

/* Slide animations */
.slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

.slide-in-top {
    animation: slideInFromTop 0.3s ease-out forwards;
}

.slide-in-highlight {
    animation: slideInAndHighlight 0.6s ease-out forwards;
}

.toast-notification {
    animation: toastSlideIn 0.3s ease-out;
}

.toast-notification.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* Fade animations */
.fade-in {
    animation: fade-in 0.3s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.slide-in-up {
    animation: slideInUp 0.4s ease-out forwards;
}

/* Bar/Chart animations */
.animate-grow-bar {
    animation: growBar 0.6s ease-out forwards;
}

.animate-line {
    animation: expand-line 1.5s ease-out forwards;
}

/* Loading animations */
.animate-shimmer {
    animation: shimmer 1.5s infinite;
    background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

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

/* Pulse animations */
.status-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Gradient animations */
.animated-gradient {
    background-size: 200% 200%;
    animation: gradient 6s ease infinite;
}

.gradient-underline {
    background: linear-gradient(90deg, #06b6d4, #14b8a6, #fb923c);
    height: 3px;
    background-size: 200% 100%;
    animation: gradient-x 3s ease infinite;
}

/* Progress bar */
.progress-bar {
    animation: progress 0.5s ease-out forwards;
}

/* --------------------------------------------
   ANIMATION DELAY UTILITIES
   Use CSS variables for staggered animations
   -------------------------------------------- */

.animate-delay-100 {
    animation-delay: 100ms;
}

.animate-delay-200 {
    animation-delay: 200ms;
}

.animate-delay-300 {
    animation-delay: 300ms;
}

.animate-delay-400 {
    animation-delay: 400ms;
}

.animate-delay-500 {
    animation-delay: 500ms;
}

.animate-delay-600 {
    animation-delay: 600ms;
}

.animate-delay-700 {
    animation-delay: 700ms;
}

.animate-delay-800 {
    animation-delay: 800ms;
}

.animate-delay-900 {
    animation-delay: 900ms;
}

.animate-delay-1000 {
    animation-delay: 1000ms;
}

/* Staggered animation utility for list items */
.animate-stagger > *:nth-child(1) {
    animation-delay: 100ms;
}

.animate-stagger > *:nth-child(2) {
    animation-delay: 200ms;
}

.animate-stagger > *:nth-child(3) {
    animation-delay: 300ms;
}

.animate-stagger > *:nth-child(4) {
    animation-delay: 400ms;
}

.animate-stagger > *:nth-child(5) {
    animation-delay: 500ms;
}

.animate-stagger > *:nth-child(6) {
    animation-delay: 600ms;
}

.animate-stagger > *:nth-child(7) {
    animation-delay: 700ms;
}

.animate-stagger > *:nth-child(8) {
    animation-delay: 800ms;
}

.animate-stagger > *:nth-child(9) {
    animation-delay: 900ms;
}

.animate-stagger > *:nth-child(10) {
    animation-delay: 1000ms;
}

/* --------------------------------------------
   ANIMATION DURATION UTILITIES
   -------------------------------------------- */

.animate-duration-fast {
    animation-duration: 150ms;
}

.animate-duration-normal {
    animation-duration: 300ms;
}

.animate-duration-slow {
    animation-duration: 600ms;
}

.animate-duration-slower {
    animation-duration: 1000ms;
}

/* --------------------------------------------
   ANIMATION TIMING FUNCTION UTILITIES
   -------------------------------------------- */

.animate-ease {
    animation-timing-function: ease;
}

.animate-ease-in {
    animation-timing-function: ease-in;
}

.animate-ease-out {
    animation-timing-function: ease-out;
}

.animate-ease-in-out {
    animation-timing-function: ease-in-out;
}

.animate-linear {
    animation-timing-function: linear;
}

/* */