/*
 * KG Code – Global Add to Cart Spinner
 */

.add_to_cart_button.loading {
    position: relative !important;
    pointer-events: none;
}

/* Grey overlay with blur */
.add_to_cart_button.loading::after {
    content: '';

    position: absolute;
    inset: 0;

    background: rgba(100, 100, 100, 0.55);
    backdrop-filter: blur(2px);

    border-radius: inherit;

    z-index: 10;
}

/* White spinner */
.add_to_cart_button.loading::before {
    content: '';

    position: absolute;

    top: 50%;
    left: 50%;

    width: 18px;
    height: 18px;

    margin: -9px 0 0 -9px;

    border: 2px solid white;
    border-right-color: transparent;

    border-radius: 50%;

    animation: kgcode-cart-spinner 0.6s linear infinite;

    z-index: 20;
}

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