/** Compatibility with Elementor Pro **/

@import '../../../assets/sass/config';
@import '../../../assets/sass/mixins';
@import '../../../assets/sass/direction';


// Elementor menu cart widget
.elementor-menu-cart__container {
    .cart-header {
        display: none;
    }
}

.elementor-menu-cart__main {
    min-height: 0;
}

.elementor-menu-cart--cart-type-mini-cart .mini-basket-empty {
    margin-bottom: 2rem;
}

.elementor-menu-cart__product-name {
    line-height: 1.43;
}

.elementor-menu-cart__product-price .quantity {
    border: none;
    height: auto;
}

// Cart Dropdown
.elementor-menu-cart__container {
    .cart-title {
        font-size: 1.14286em;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0;
        line-height: 1.4;
        margin-bottom: 0;
    }

    .cart-count {
        >i {
            font-size: 1.0909em;
            line-height: 1.6364;
        }
    }

    .cart_list {
        margin: side-values(0 -1.9rem 0 0);
        padding: side-values(0 1.5rem 0 0);
    }

    .cart-item-meta a:hover {
        color: var(--alpha-primary-color);
    }

    .total {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 1rem 0 2rem;
        padding: 0.125em 0;
        font-size: 1.14286em;
        text-transform: capitalize;
        line-height: 3;
        color: var(--alpha-change-color-dark-1);
        letter-spacing: -0.025em;
        border-top: 1px solid var(--alpha-change-border-color);

        strong {
            font-size: 0.875em;
            color: var(--alpha-change-color-dark-1);
        }

        strong,
        .amount {
            font-weight: 600;
        }

        &:first-of-type {
            margin-top: 2rem;
        }

        >strong {
            font-weight: 400;
            color: var(--alpha-body-color);
        }
    }

    .buttons {
        a {
            display: flex;
            justify-content: center;
            padding: 1.2rem 0.6rem;
            line-height: 1.45;
            color: var(--alpha-change-color-dark-1);
            background-color: transparent;
            border-color: var(--alpha-change-color-dark-1);
            border-width: 1px;

            &:hover,
            &:active,
            &:focus {
                border-color: var(--alpha-primary-color);
                background-color: var(--alpha-primary-color);
                color: var(--alpha-change-color-light-1);
            }

            &+a {
                margin-top: 2rem;
            }
        }

        .checkout {
            @include button-variant(var(--alpha-change-color-dark-1),
                var(--alpha-change-color-dark-1-hover));
        }
    }

    .d-loading.small i {
        top: calc(50% - 3px);
    }

    .mini-list {
        max-height: 33rem;
        margin: 0;
        padding-#{$left}: 0;
        padding-#{$right}: 5px;
        list-style: none;
        overflow-y: scroll;
        overflow-x: hidden;
        text-transform: capitalize;

        +.buttons {
            margin-top: 2rem;
            margin-bottom: 0;
            border-top: 1px solid var(--alpha-change-border-color-light);
            padding-top: 20px;
        }
    }

    .mini-item {
        display: flex;
        position: relative;
        align-items: center;
        padding: 1rem 0;

        &:last-child {
            padding-bottom: 0;
        }

        a {
            padding: 0;
        }

        >a:nth-child(2) {
            flex: 0 0 8rem;
            max-width: 8rem;
            padding: 0;

            img {
                width: 100%;
                object-fit: cover;
            }
        }

        .remove {
            position: absolute;
            top: 0;
            #{$right}: -1rem;
            width: 2rem;
            height: 2rem;
            line-height: 2rem;
            text-align: center;
            border-radius: 50%;
            font-size: 0.8572em;
            color: var(--alpha-change-color-dark-1);
            background: var(--alpha-change-color-light-1);
            transition: color 0.4s, border 0.4s;
            box-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.15);
            z-index: 3;

            >i {
                width: 100%;
            }

            &:hover {
                color: var(--alpha-primary-color);
            }
        }

        span.quantity {
            display: flex;
            align-items: center;
            line-height: 1;
            border: none;
            font-size: 1.14286em;
            height: auto;
            color: var(--alpha-change-color-dark-1);

            del {
                color: var(--alpha-change-color-light-3);
                margin-#{$left}: 0.3571em;

                span {
                    font-weight: 400;
                }
            }
        }

        .amount {
            color: inherit;
            font-weight: 600;
        }
    }

    .mini-item-meta {
        flex: 1;
        margin: side-values(auto 2rem auto 0);
        line-height: 1.3;
        color: var(--alpha-dark-color);

        a {
            color: inherit;
            margin-bottom: 1rem;
            @include text-block();

            &:hover {
                color: var(--alpha-primary-color);
            }
        }
    }

    .woocommerce-mini-cart__buttons {
        margin-bottom: 0;
    }
}

.elementor-menu-cart--cart-type-side-cart {
    .cart_list {
        max-height: calc(100vh - 28.1rem);
        margin: -10px;
        padding: 10px 15px 10px 10px;
    }

    .mini-basket-empty {
        flex-flow: column;
        margin-top: 5.5rem;
        text-align: center;

        i {
            font-size: 13rem;
            margin: 0;
            opacity: .2;
        }

        p {
            margin: 1.5rem 0 1.1rem;
            font-size: 1.8rem;
            text-align: center;
        }

        a {
            display: inline-block;
            padding: .6rem 2rem;
            font-size: 12px;
            background: var(--alpha-primary-color);
            color: var(--alpha-white-color);
            border-radius: var(--alpha-border-radius);
            transition: background .3s;

            &:hover,
            &:focus {
                color: var(--alpha-white-color);
                background: var(--alpha-primary-color-hover);
            }

            i {
                display: none;
            }
        }
    }
}

// Elementor grid
.elementor-grid.row {
    width: 100%;

    &>* {
        width: auto;
        padding: 0;
    }
}

// Single product builder
.elementor-widget-woocommerce-product-price p.price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    del {
        order: -1;
        margin-#{$left}: 0;
    }
}

.woocommerce .elementor-product-price-block-yes.elementor-widget-woocommerce-product-price .price del,
.woocommerce .elementor-product-price-block-yes.elementor-widget-woocommerce-product-price .price ins {
    flex: 0 0 100%;
}

.elementor-element.elementor-widget-woocommerce-product-add-to-cart .elementor-add-to-cart {
    .quantity-wrapper .quantity button {
        margin: 0;
        border: none;
        padding: 1px 6px;
        color: var(--alpha-change-color-dark-1);
        background: transparent;

        &:hover {
            color: var(--alpha-primary-color);
        }
    }
}