/* Shopping cart template mods */
@import './_shopping-cart_form.css';

body.woocommerce-checkout {
    overflow-x: unset !important;
}

.woocommerce-cart-form_container {
    display: flex;
    gap: 3.5em;
    flex-direction: column;
    width: 100%;

    @media screen and (width > 768px) {
        flex-direction: row;
    }

    .eltd-quantity-buttons {
        margin-top: 0;
    }

    .button-clean {
        padding: 0;
        font-size: var(--text-xbase);
        font-family: var(--font-crimson);
        color: var(--color-red);
        text-decoration: underline;
        font-weight: normal;
    }

    .woocommerce-cart-form_container--title {
        font-size: var(--text-large);
        text-transform: none;
        margin-bottom: 14px;
        color: var(--color-red);
        font-family: var(--font-crimson);

        @media screen and (width > 768px) {
            font-size: 36px;
            margin-bottom: 32px;
        }

    }

    .woocommerce-cart-form_container--subtitle {
        margin-bottom: 15px;
        font-family: var(--font-crimson);
        color: var(--color-black);
        font-weight: 600;
        text-transform: none;
        font-size: var(--text-xbase);
        letter-spacing: unset;
    }

    .woocommerce-cart-form_left {
        margin-top: 45px;

        @media screen and (width > 768px) {
            margin-top: 0;
            width: 40%;
        }
    }

    .woocommerce-cart-form_right {
        @media screen and (width > 768px) {
            width: 60%;
        }
    }

    .woocommerce-shipping-methods>.woocommerce-shipping-methods_item {
        display: flex;
        align-items: flex-start;
        gap: .85em;
        padding: 1em;
        margin-bottom: .85em;
        border: 1px solid #AEAEAE;
        line-height: 1.6em;
    }

    .woocommerce-shipping-methods>.woocommerce-shipping-methods_item>label {
        display: flex;
        gap: 1.2em;
        justify-content: space-between;
        color: var(--color-black);
        cursor: pointer;
    }


    .woocommerce-cart-form__cart-item {
        margin-bottom: 1.5em;
        display: grid;
        gap: 1.2em;
        grid-template-columns: 1fr 1fr 1fr;

        @media screen and (width > 768px) {
            grid-template-columns: 1fr 50% 1fr;
        }


        .product-name_title {
            color: var(--color-black);
            line-height: 1.25;

            @media screen and (width > 768px) {
                list-height: 1.4;
            }
        }

        .variation {
            color: var(--color-black);

            dt {
                display: none;
            }
            

            dd {
                display: inline-block;
                margin: 0;

                p {
                    margin: 0;
                }
            }

            dt.variation-Montantdudpt, dt.variation-Paiementsvenir {
                display: block !important;
                margin-bottom: 0 !important;
                margin-top: 10px;
            }
        }

        .product-quantity {
            color: var(--color-black);
        }

        .product-price .product-price_item {
            font-family: var(--font-lateef);
            display: block;
            color: var(--color-black);
            text-align: right;

            &.regular-price {
                font-size: var(--text-large);
                text-decoration: line-through;
            }

            &.sale-price {
                font-size: var(--text-large);
                color: var(--color-red);

                &.amount {
                    font-size: var(--text-xl);
                    color: var(--color-red);
                }
            }
            
            &.rental-price {
                font-family: var(--font-crimson);
                font-size: var(--text-xbase);
            }
        }

        .product-actions {
            display: flex;
            align-items: center;
            margin-top: 10px;

            .product-remove>a {
                display: flex;
                align-items: center;

                svg {
                    width: 15px;

                    @media screen and (width > 768px) {
                        width: unset;
                    }
                }
            }
        }
    }

    @media screen and (width > 768px) {
        .woocommerce-cart-form__cart-item {
            grid-template-columns: 1fr 50% 2fr;
        }
    }

    .woocommerce-cart-form_actions {
        .woocommerce-cart-form_actions__voucher {
            text-align: right;

            margin: 0 0 25px auto;

            .woocommerce-cart-form_actions__voucher--inputs {
                display: flex;
                align-items: center;
                gap: 15px;
                max-width: 350px;
                margin-left: auto;
            }
        }
    }

    .woocommerce-cart-form_totals {
        @media screen and (width > 768px) {
            display: flex;
            justify-content: flex-end;
        }

        .cart_totals {
            text-align: left;
            margin-top: 20px;

            .cart-resume_item.cart-resume_item--total {
                font-size: 14px !important;
            }
        }
    }

    .cart-collaterals {
        margin-top: 20px;
        padding-bottom: 20px;
    }

    .cart-resume_item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        color: var(--color-black);
        margin-bottom: 5px;

        &.cart-resume_item--total {
            .cart-resume_item--label {
                font-size: var(--text-large);
                font-weight: 700;
            }

            .woocommerce-Price-amount {
                font-weight: 600;
                color: var(--color-red);
                font-size: var(--text-xl);
            }

        }

        &.cart-resume_item--total-product {
            .woocommerce-Price-amount {
                font-weight: 700;
            }
        }

        .cart-resume_item--label {
            font-size: var(--text-xbase);
        }

        .woocommerce-Price-amount {
            font-family: var(--font-lateef);
            font-size: var(--text-large);
        }

        .woocommerce-remove-coupon {
            >span {
                font-size: var(--text-xl);
                vertical-align: text-bottom;
            }

            &[data-coupon^="remise"] {
                >span {
                    display: none;
                }
            }

            &:hover {
                span {
                    color: var(--color-red);
                }
            }
        }
    }

    .checkout-button.eltd-btn {
        font-size: var(--text-medium);
        display: block;
        margin: 0 auto;
        width: fit-content;
        background-color: var(--color-red);

        @media screen and (width > 768px) {
            margin: 0 0 0 auto;
        }
    }

    .woocommerce-cart-form_updates {

        text-align: center;

        .button-clean {
            margin-bottom: 10px;

            @media screen and (width > 768px) {
                margin-bottom: 0;
            }
        }

        @media screen and (width > 768px) {
            display: flex;
            align-items: flex-end;
            gap: 30px;

        }
    }



    .woocommerce-shopping-reassurance {
        margin-top: 32px;
        padding-top: 32px;
        padding-bottom: 32px;

        @media screen and (width > 768px) {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
            border-top: 1px solid #AEAEAE;
        }

        .woocommerce-shopping-reassurance__item {

            display: flex;
            flex-direction: column;
            text-align: center;
            width: 50%;
            margin: 0 auto 30px;

            @media screen and (width > 768px) {

                width: unset;
                flex: 1;
                margin: 0;
            }
        }

        .woocommerce-shopping-reassurance__item--image {
            align-content: center;
            height: 45px;

            @media screen and (width > 768px) {
                height: 70px;
            }
        }

        .woocommerce-shopping-reassurance__item--content {
            margin-top: 10px;
            color: var(--color-black);
            line-height: 1.4;

            @media screen and (width > 768px) {
                margin-top: 0;
            }
        }

        &.checkout {
            background: var(--color-red);
            color: var(--color-white);
            border-top: 0;

            @media screen and (width > 768px) {
                padding-left: 20px;
                padding-right: 20px;
            }

            .woocommerce-shopping-reassurance__item--content {
                color: var(--color-white);
            }
        }
    }

    .woocommerce-terms-and-conditions-wrapper {
        padding-top: 10px;
        margin-top: 10px;
        border-top: 1px solid var(--color-light-grey);
        color: var(--color-black);

        a {
            text-decoration: underline;
        }

    }

    .place-order {
        .eltd-btn {
            margin-top: 30px;
        }
    }
}

.woocommerce-checkout-form {
    .woocommerce-cart-form__cart-item {
        grid-template-columns: 50% 1fr auto;

        @media screen and (width > 768px) {
            grid-template-columns: 60% 1fr auto;
        }
    }

    .cart-resume.cart_totals {
        @media screen and (width > 768px) {
            max-width: 50%;
            margin-inline-start: auto;
        }
    }

    .woocommerce-cart-form_left {
        margin-top: 0;
    }

    .woocommerce-cart-form_right {
        @media screen and (width > 1024px) {
            position: sticky;
            top: 133px;
            align-self: flex-start;
        }
    }

    .checkout-button.eltd-btn {
        @media screen and (width > 768px) {
            margin: 30px auto 0 auto;
        }
    }

    .woocommerce-checkout-review-order {
        margin-top: 2.9em;

        @media screen and (width > 768px) {
            margin-top: 0;
        }
    }

    .woocommerce-checkout-payment:has(.payment_method_floapay ul.list-group.list-group-flush:empty) .payment_methodfloapay {
        display: none;
        opacity: 0;
    }

    .payment_method_floapay .payment_method_icon {
	    margin-bottom: 20px;
        height: 45px;
    }
}