/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/




/* Modifs hehocom */
.woocommerce-MyAccount-navigation-link > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.error404  {
    #brxe-cpifmt {
        display: none;
    }
}

@media (max-width: 1000px) {
    .woocommerce-MyAccount-navigation {
        width: 100%;
    }
}

/*Partie détails commande*/
body {
    #brxe-74d44d .woocommerce-orders-table tbody td {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .woocommerce-orders-table__cell.woocommerce-orders-table__cell-order-actions {
        gap: 7px;
    }
    .woocommerce-button.button {
        min-height: unset;
        justify-content: right;
    }
    .woocommerce-MyAccount-content {
        .woocommerce-OrderUpdate-description.description {
            padding-block: 20px;
        }
    }

    .woocommerce-order-details .button {
        margin-top: 15px;
        display: inline-block;
        padding: 10px 16px;
        background: var(--sage-700);
        color: var(--white);
        text-decoration: none;
        transition: transform .05s ease, box-shadow .2s ease;
    }

}
@media (max-width: 768px) {
    body {
        #brxe-74d44d .woocommerce-orders-table tbody td {
            padding-top: 5px;
            padding-bottom: 5px;
        }
        .woocommerce-orders-table__cell {
            del {
                + ins .woocommerce-Price-amount {
                    margin-inline: 5px;
                }
            }
        }

    }
}


/*Partie adresse*/
body {

    .woocommerce-address-fields {

        #billing_country_field {
            padding-left: 27px;
        }

        .form-row:not(#billing_country_field):not(#thwcfe-block\/newsletter_field) {
            display: flex;
            position: relative;

            > label {
                position: absolute;
                line-height: 15px;
                height: 15px;
                left: 27px;
                top: 5px;
                color: #958D9C;
                font-family: Montserrat;
                font-size: 10px;
                font-style: normal;
                font-weight: 500;
            }

            > .woocommerce-input-wrapper {
                border-radius: var(--radius-100);
                background: #fff;
                width: 100%;



                > input {
                    padding-top: 15px;
                    padding-bottom: 15px;
                    padding-left: 27px;
                    border-radius: 0px;
                    background: transparent;
                }
            }


        }
    }
}


/*Partie infos du compte*/
body #brxe-1b2dd9 {
    .woocommerce-EditAccountForm {
        .form-row {
            display: flex;
            position: relative;

            > label {
                z-index: 10;
                position: absolute;
                line-height: 15px;
                height: 15px;
                left: 27px;
                top: 5px;
                color: #958D9C;
                font-family: Montserrat;
                font-size: 10px;
                font-style: normal;
                font-weight: 500;
            }

            > span {
                width: 100%;
            }

            > input.woocommerce-Input, > span input.woocommerce-Input  {
                padding-top: 15px;
                padding-bottom: 15px;
                padding-left: 27px;
            }

            .show-password-input {
                background: transparent;
            }

        }
        [name="save_account_details"] {
            text-transform: none;
            width: 100%;
        }
    }
}


/*Partie mise en page page panier*/
body {
    .checkout-button + .ppc-button-wrapper {
        margin-top: 15px;
    }
    .woocommerce-cart-form__cart-item {

        .product-price {
            position: relative;
        }

        .hc-del-price {
            color: var(--bricks-text-light);
            font-size: 16px;
            font-weight: 400;
            text-decoration-line: line-through;
        }

        .hc-real-price bdi {
            color: #714B7B;
            font-family: Montserrat;
            font-size: 16px;
            font-style: normal;
            font-weight: 800;
            line-height: normal;
        }

        .hc-discount-percentage {
            padding: 0 5px;
            background: #649480;
            color: #FFF;
            font-size: 16px;
            font-weight: 800;
            line-height: normal;
            width: fit-content;
        }

        .hc-promo-price-wrapper {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            padding-block: 25px;
        }

    }
    .woocommerce-mini-cart-item.mini_cart_item {
        .variation {
            flex-wrap: wrap
        }
    }


    .woocommerce-cart-form__cart-item.cart_item.component_table_item {
        border-top: none !important;
    }
    .woocommerce-cart-form__cart-item.cart_item.component_table_item td, .bundled_table_item td {
        padding: 5px 0px 5px 100px !important;
    }
}

@media screen  and (max-width: 768px){
    body {
        .woocommerce-cart-form tbody th[scope="row"][data-title]::before {
            display: none;
        }
        .woocommerce-cart-form__cart-item.cart_item.component_table_item, .bundled_table_item {
            td {
                padding-left: 0px !important;
            }
            .product-name {
                text-align: center;
                a {
                    margin: 0 auto;
                }
            }
            .product-price, .product-quantity, .product-subtotal {
                display: none;
            }
        }
    }
}

/*Partie mise en page de la page checkout*/
/*Fil d'ariane qui a son separator en l'air a cause d'alma*/
body {
    .separator:has(+.item) {
        position: static !important;
    }
    .wp-block-woocommerce-checkout {
        div:empty {
            margin: 0 !important;
        }
        .wc-block-components-checkout-step__heading-content {
            margin-top: 25px;
            display: block;

            &:before {
                content: "J'ai déjà un compte.";
                margin-right: 10px;
                font-size: 1rem;
                color: #958D9C;
                font-family: Montserrat;
                font-size: 16px;
                font-style: normal;
                font-weight: 500;
                line-height: normal;
            }

            .wc-block-checkout__login-prompt {
                float: unset !important;
                font-family: Montserrat !important;
                font-size: 16px !important;
            }
        }
    }
    .wc-block-components-form .wc-block-components-text-input input[type="email"] {
        max-height: unset;
    }
    .wc-block-components-checkbox {
        margin-bottom: 15px !important;
        .wc-block-components-checkbox__label {
            color: var(--mauve-700);
        }
    }
    .wc-block-components-radio-control {

        label {

            padding-bottom: 25px !important;
            padding-top: 25px !important;
            border-radius: 10px !important;
            box-shadow: none !important;

            &:has( + .wc-block-components-radio-control-accordion-content) {
                padding-bottom: 15px !important;
            }

            & + .wc-block-components-radio-control-accordion-content {
                color: #958d9c;
                padding-bottom: 25px !important;
            }

        }

        .ppcp-place-order-description {
            text-align: left !important;
        }
    }
    .wc-block-components-radio-control-accordion-option {

        background: #FDF5FF !important;
        border-radius: 10px !important;

        + .wc-block-components-radio-control-accordion-option {
            margin-top: 10px;
        }

        &.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
            background: #edfff3 !important;

            .wc-block-components-radio-control__label {
                font-weight: 800 !important;
            }
        }
    }
    .wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
        background: #EDFFF3;
        border: 2px solid #649480;

        .wc-block-components-radio-control__label-group * {
            font-weight: 700 !important;

            color: #714B7B;

            /* Texte bold */
            font-family: Montserrat !important;
            font-size: 16px !important;
            font-style: normal !important;
            font-weight: 800 !important;
            line-height: normal !important;
        }
    }
    .wc-block-components-radio-control--highlight-checked::after {
        border: none !important;
    }
    .wp-block-woocommerce-checkout-order-summary-subtotal-block, .wc-block-components-totals-footer-item {
        .wc-block-components-totals-item__label::after {
            content: " TTC";
        }
    }
}

/*Cacher le bloc newsletter du checkout*/
.woocommerce-checkout {
    #brxe-fzozmu {
        display: none;
    }
}

/*Page produit, partie composants*/
body {
    .composite_form {

        /*gap: 0px !important;
        align-items: baseline !important;
        justify-content: space-evenly !important;*/

        .composite_component {

            /*flex: 0 1 33.333333%;
            padding-inline: 10px;*/
            width: 100%;

            .component_inner {
                padding-bottom: 15px !important;
            }

            .component_title {
                margin-bottom: 15px;
            }

            .component_selections {
                .component_section_title {
                    display: none;
                }

            }

            .composited_product_title_wrapper {
                display: none;
            }
        }

        .composite_wrap {
            width: 100%;
            order: 99;

            .composite_price {
                display: none !important;
            }

            .composite_button {
                display: flex;
                justify-content: space-between;

            }
        }
    }
}

@media screen and (max-width: 768px) {
    body {
        .composite_form {
            .composite_wrap {
                .composite_button {
                    flex-wrap: wrap;
                    justify-content: center;
                    gap: 20px;
                    align-items: center;
                }
            }
        }
    }
}

/*Page confirmation de commande*/
body .brxe-woocommerce-checkout-thankyou {
    .woocommerce-thankyou-order-details {
        display: flex;

        li {
            color: #958D9C;

            /* Texte */
            font-family: Montserrat;
            font-size: 16px;
            font-style: normal;
            font-weight: 500;
            line-height: normal;
            display: flex;
            gap: 15px;
            flex-direction: column;
            text-transform: none !important;

            flex: 1 1 auto;
            justify-content: space-around;

            + li {
                padding-left: 20px;
                box-shadow: inset 2px 0px 0px 0px #714b7b;
            }

            b {

                color: #958D9C;

                /* Texte bold */
                font-family: Montserrat;
                font-size: 16px;
                font-style: normal;
                font-weight: 800;
                line-height: normal;
            }

        }
    }

    .order_details {
        border-collapse: separate;
        border-spacing: 0 60px;

        .order_item {
            position: relative;
            color: #714B7B;

            font-family: Montserrat;
            font-size: 16px;
            font-style: normal;
            font-weight: 500;
            line-height: normal;

            &:first-child td:first-child::before {
                content: "Produits";
                position: absolute;
                top: -2rem;
                font-weight: 800;
                color: #649480;
            }

            &:last-child:after {

                content: "";
                height: 1px;
                width: 100%;
                background-color: #958D9C;
                display: block;
                position: absolute;
                left: 0;
                bottom: -30px;
            }
        }

        tfooter {

        }
    }

    .woocommerce-columns--addresses {
        > div {

            border: 1px solid #649480;

            h2 {
                padding: 25px 42px;
                background-color: #edfff3;
                color: #649480 !important;
                border-bottom: 1px solid #649480;
                margin-bottom: 25px;

                /* Texte bold */
                font-family: Montserrat;
                font-size: 16px !important;
                font-style: normal;
                font-weight: 800;
                line-height: normal;
            }

            address {
                padding: 0 45px 25px;

                br {
                    margin-bottom: 10px;
                }
            }

        }
    }

}

@media screen and (max-width: 1000px) {
    body .brxe-container:has(.brxe-woocommerce-checkout-thankyou) {
        padding: 0;
    }
}

@media screen and (max-width: 768px) {
    body .brxe-woocommerce-checkout-thankyou {
        .woocommerce-thankyou-order-details {
            display: grid;
            grid-template: repeat(2, 1fr) / repeat(2, 1fr);

            li:first-child {
                padding-left: 20px;
                box-shadow: inset 2px 0px 0px 0px #714b7b;
            }
        }
    }
}

@media screen and (max-width: 560px) {
    body .brxe-woocommerce-checkout-thankyou {
        .woocommerce-thankyou-order-details {
            display: flex;
            flex-direction: column;
        }
    }
}


/*on override des valeurs du layer bricks.*/
@layer bricks {
    .woocommerce-order-details table td, .woocommerce-order-details table th {
        width: calc(50% + 100px) !important;
    }
    .product-total {
        width: calc(50% - 100px);
    }
}
/*-----*/