/* Custom CSS for single product page add-to-cart and quantity */

/* Cart form styling for simple and variable products in Elementor */
:is(.elementor-product-simple .cart, .elementor-product-variable .woocommerce-variation-add-to-cart) {
    height: 50px;
    margin-top: 10px;
}

/* Quantity container */
.quantity {
    width: 100%;
    gap: 15px;
    display: none;
}

/* Custom quantity container */
.quantity .fb-quantity-container {
    display: flex;
    width: 100%;
    height: 100%;
    background: #fff;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    padding: 5px;
}

/* Child divs in container */
.fb-quantity-container > div {
    flex-basis: 32%;
    display: flex;
    justify-content: center;
    align-items: center;
} 

/* Quantity box styling */
.fb-quantity-box {
    flex-direction: column;
    font-family: inherit;
    flex-grow: 1;
    justify-content: space-between !important;
}

/* Quantity span */
.fb-quantity-span {
    width: 100%;
    font-size: 1.1rem;
    line-height: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

/* Text span below quantity */
.fb-text-span {
    font-size: .6rem;
    opacity: .9;
}

/* Button styling */
.fb-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* SVG transitions */
.fb-btn svg {
    transition: .2s ease;
}

.fb-btn:hover svg {
    fill: var(--e-global-color-accent);
}

/* Hide minus SVG by default */
.fb-btn .minus_svg {
    display: none;
}

/* Go to shop button */
.fb-go-to-shop {
    height: 100%;
    border-radius: 10px;
    font-family: inherit;
    flex-basis: 100%;
    display: flex;
    background: var(--e-global-color-primary);
    justify-content: center;
    align-items: center;
    color: #fff !important;
    font-weight: 500;
    font-size: .9rem;
}

/* Single add to cart button */
.single_add_to_cart_button {
    margin: 0 !important;
    background: var(--e-global-color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loader animation */
.quantity-loader {
    --loader-width: 8px;
    --loader-color1: #fff;
    --loader-color2: #cccccc9f;
    width: var(--loader-width);
    aspect-ratio: 1;
    border-radius: 50%;
    animation: loading 1s infinite linear alternate;
}

/* Loader in quantity span */
.fb-quantity-span .quantity-loader {
    --loader-width: 7px;
    width: var(--loader-width);
    --loader-color1: #000000b6;
    --loader-color2: rgba(105, 105, 105, 0.624);
}

@keyframes loading {
    0%   { box-shadow: calc(3px + var(--loader-width)) 0 var(--loader-color1), calc(-1 * var(--loader-width) - 3px) 0 var(--loader-color2); background: var(--loader-color1); }
    33%  { box-shadow: calc(3px + var(--loader-width)) 0 var(--loader-color1), calc(-1 * var(--loader-width) - 3px) 0 var(--loader-color2); background: var(--loader-color2); }
    66%  { box-shadow: calc(3px + var(--loader-width)) 0 var(--loader-color2), calc(-1 * var(--loader-width) - 3px) 0 var(--loader-color1); background: var(--loader-color2); }
    100% { box-shadow: calc(3px + var(--loader-width)) 0 var(--loader-color2), calc(-1 * var(--loader-width) - 3px) 0 var(--loader-color1); background: var(--loader-color1); }
}