/* Museum Configurator / WooCommerce AJAX cart feedback. */

.woocommerce div.product form.cart .single_add_to_cart_button.mc-cart-ajax-loading {
    position: relative;
    cursor: progress;
    opacity: .72;
    padding-right: 46px;
    transition: opacity .2s ease, box-shadow .25s ease, transform .25s ease;
}

.woocommerce div.product form.cart .single_add_to_cart_button.mc-cart-ajax-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 17px;
    width: 15px;
    height: 15px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, .28);
    border-top-color: #d4b06a;
    border-radius: 50%;
    animation: mc-cart-button-spin .65s linear infinite;
}

.woocommerce div.product form.cart .single_add_to_cart_button.mc-cart-ajax-added {
    animation: mc-cart-button-added .72s cubic-bezier(.2,.75,.25,1);
}

.header-right .cart-value.mc-cart-value-pop,
.cart-value.mc-cart-value-pop {
    animation: mc-cart-value-pop .72s cubic-bezier(.2,.85,.25,1);
    transform-origin: 50% 50%;
}

.header-right .cart-box.mc-cart-auto-open .widget_shopping_cart {
    opacity: 1;
    visibility: visible;
    top: 50px;
}

.header-right .widget_shopping_cart .mc-cart-raster-preview,
.woocommerce-mini-cart .mc-cart-raster-preview {
    object-fit: contain;
}

.mc-cart-fly-preview {
    position: fixed;
    z-index: 100000;
    width: 76px;
    height: 76px;
    margin: 0;
    padding: 5px;
    object-fit: contain;
    pointer-events: none;
    border: 1px solid rgba(212, 176, 106, .72);
    border-radius: 10px;
    background: rgba(20, 20, 20, .92);
    box-shadow:
        0 12px 34px rgba(0, 0, 0, .34),
        0 0 18px rgba(212, 176, 106, .18);
    will-change: transform, opacity;
}

.mc-cart-toast {
    position: fixed;
    z-index: 100001;
    min-width: 190px;
    max-width: min(360px, calc(100vw - 24px));
    padding: 10px 14px;
    border: 1px solid rgba(212, 176, 106, .42);
    border-radius: 8px;
    background: rgba(25, 25, 25, .97);
    color: #ead39d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .34);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(7px) scale(.98);
    transition: opacity .2s ease, transform .24s cubic-bezier(.2,.75,.25,1);
}

.mc-cart-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes mc-cart-button-spin {
    to { transform: rotate(360deg); }
}

@keyframes mc-cart-button-added {
    0% { box-shadow: 0 0 0 rgba(212, 176, 106, 0); }
    36% {
        transform: translateY(-1px);
        box-shadow: 0 0 0 4px rgba(212, 176, 106, .12), 0 0 22px rgba(212, 176, 106, .24);
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(212, 176, 106, 0);
    }
}

@keyframes mc-cart-value-pop {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(212, 176, 106, 0); }
    34% {
        transform: scale(1.65) rotate(-7deg);
        background-color: #d4b06a;
        color: #171717;
        box-shadow: 0 0 0 6px rgba(212, 176, 106, .16), 0 0 18px rgba(212, 176, 106, .55);
    }
    62% { transform: scale(.92) rotate(2deg); }
    100% { transform: scale(1) rotate(0); box-shadow: 0 0 0 rgba(212, 176, 106, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .single_add_to_cart_button.mc-cart-ajax-loading::after,
    .single_add_to_cart_button.mc-cart-ajax-added,
    .cart-value.mc-cart-value-pop {
        animation: none !important;
    }

    .mc-cart-fly-preview {
        display: none !important;
    }

    .mc-cart-toast {
        transition: none;
    }
}
