/* Modern, subtle animations for Cartly */

/* Base animation variables */
:root {
    --animation-duration-fast: 0.15s;
    --animation-duration-normal: 0.25s;
    --animation-duration-slow: 0.4s;
    --animation-easing: cubic-bezier(0.16, 1, 0.3, 1);
    --animation-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Fade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Slide animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Animation classes */
.animate-fade-in {
    animation: fadeIn var(--animation-duration-normal) var(--animation-easing);
}

.animate-fade-in-instant {
    animation: fadeIn var(--animation-duration-fast) var(--animation-easing);
}

.animate-fade-in-up {
    animation: fadeInUp var(--animation-duration-normal) var(--animation-easing);
}

.animate-fade-in-scale {
    animation: fadeInScale var(--animation-duration-normal)
        var(--animation-easing);
}

.animate-slide-in-right {
    animation: slideInRight var(--animation-duration-normal)
        var(--animation-easing);
}

.animate-slide-in-down {
    animation: slideInDown var(--animation-duration-normal)
        var(--animation-easing);
}

/* Speed variations */
.animate-fast {
    animation-duration: var(--animation-duration-fast) !important;
}

.animate-slow {
    animation-duration: var(--animation-duration-slow) !important;
}

/* Staggered animations for lists */
.animate-stagger > :nth-child(1) {
    animation-delay: 0ms;
}
.animate-stagger > :nth-child(2) {
    animation-delay: 50ms;
}
.animate-stagger > :nth-child(3) {
    animation-delay: 100ms;
}
.animate-stagger > :nth-child(4) {
    animation-delay: 150ms;
}
.animate-stagger > :nth-child(5) {
    animation-delay: 200ms;
}
.animate-stagger > :nth-child(6) {
    animation-delay: 250ms;
}
.animate-stagger > :nth-child(7) {
    animation-delay: 300ms;
}
.animate-stagger > :nth-child(8) {
    animation-delay: 350ms;
}
.animate-stagger > :nth-child(9) {
    animation-delay: 400ms;
}
.animate-stagger > :nth-child(10) {
    animation-delay: 450ms;
}

/* Interactive animations */
.hover-lift {
    transition: transform var(--animation-duration-fast) var(--animation-easing);
}

.hover-lift:hover {
    transform: translateY(-1px);
}

.hover-scale {
    transition: transform var(--animation-duration-fast) var(--animation-easing);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Focus and active states */
.focus-ring {
    transition: box-shadow var(--animation-duration-fast)
        var(--animation-easing);
}

.focus-ring:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Notification animations */
@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.notification-item {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all var(--animation-duration-normal) var(--animation-easing);
}

.notification-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notification-hide {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

/* Notification styles */
.notification-container {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dark .notification-container {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.notification-success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.dark .notification-success {
    border-left: 4px solid #10b981;
    color: #34d399;
}

.notification-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.dark .notification-error {
    color: #fca5a5;
}

.notification-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.notification-success .notification-icon {
    background: #10b981;
    color: white;
}

.notification-error .notification-icon {
    background: #ef4444;
    color: white;
}

.notification-close {
    transition: all var(--animation-duration-fast) var(--animation-easing);
    opacity: 0.6;
    border-radius: 4px;
    padding: 2px;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.dark .notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 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;
    }

    .animate-stagger > * {
        animation-delay: 0ms !important;
    }

    .notification-item {
        transition: none !important;
    }
}*/
