/**
 * AJAX Add to Cart notification styles
 */

.ajax-cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.ajax-cart-notification--show {
    transform: translateX(0);
    opacity: 1;
}

.ajax-cart-notification__content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.ajax-cart-notification--success {
    border-left: 4px solid #4caf50;
}

.ajax-cart-notification--success .icon {
    color: #4caf50;
}

.ajax-cart-notification--error {
    border-left: 4px solid #f44336;
}

.ajax-cart-notification--error .icon {
    color: #f44336;
}

.ajax-cart-notification .icon {
    flex-shrink: 0;
}

/* Loading spinner for cart item buttons */
.cart-item__remove.loading {
    pointer-events: none;
    opacity: 0.6;
}

.cart-item__remove.loading svg {
    display: none;
}

.cart-item__remove.loading::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner-rotate 0.6s linear infinite;
}

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

/* Mobile responsive */
@media (max-width: 767px) {
    .ajax-cart-notification {
        left: 1rem;
        right: 1rem;
        top: 1rem;
        max-width: none;
    }
}
