/* Opaque overlay hides the temporary empty-basket display. */
body.custom-side-cart-loading #cfw-side-cart::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: 9998;

    background: #fff;
    cursor: wait;
    pointer-events: auto;
}

/* Spinner centred within the side cart. */
body.custom-side-cart-loading #cfw-side-cart::after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 9999;

    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;

    box-sizing: border-box;
    border: 3px solid #ddd;
    border-top-color: #222;
    border-radius: 50%;

    animation: custom-side-cart-spin 0.7s linear infinite;
    pointer-events: none;
}

/* Rotation animation. */
@keyframes custom-side-cart-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    body.custom-side-cart-loading #cfw-side-cart::after {
        animation: none;
    }
}