/**
 * Cart Item Entrance Animations
 * Follows existing patterns from booking-animations.css
 *
 * @package TravelerChildTheme
 * @since 3.2.0
 */

/* Staggered entrance animation for cart items */
@keyframes cartItemSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation to cart item wrappers */
.cart-item-wrapper {
    animation: cartItemSlideIn 0.35s ease-out backwards;
}

/* Stagger delays for first 6 items - creates cascade effect */
.cart-item-wrapper:nth-child(1) { animation-delay: 0.05s; }
.cart-item-wrapper:nth-child(2) { animation-delay: 0.1s; }
.cart-item-wrapper:nth-child(3) { animation-delay: 0.15s; }
.cart-item-wrapper:nth-child(4) { animation-delay: 0.2s; }
.cart-item-wrapper:nth-child(5) { animation-delay: 0.25s; }
.cart-item-wrapper:nth-child(6) { animation-delay: 0.3s; }

/* Enhanced checkout button hover state */
.cart__btn--checkout {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart__btn--checkout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
}

/* Mobile checkout button also gets the effect */
.cart__btn--checkout-mobile {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart__btn--checkout-mobile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
}

/* Accessibility: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .cart-item-wrapper {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .cart__btn--checkout:hover,
    .cart__btn--checkout-mobile:hover {
        transform: none;
        box-shadow: none;
    }
}
