/* 
* Custom styles for the checkout process
*/

#checkout,
#order-confirmation {
    --width-carrier-delay: 170px;
    --width-carrier-price: 85px;
}

/* Page header and footer */
#checkout .category-bar {
    display: none;
}

#checkout .header-nav {}

body#checkout #header .header-nav {
    padding: 0;
}

body#checkout #header .header-nav #_desktop_contact_link #contact-link {
    margin-top: .9375rem;
}

body#checkout #header .header-nav .logo {
    max-height: 2rem;
}

#checkout #search_widget {
    display: block;
}

body#checkout #footer {
    padding: 0.0;
    color: unset;
    background: unset;
}

body#checkout #header .container {
    min-height: unset;
}

/* Step header */
body#checkout section.checkout-step {
    padding: 8px;
    background-color: var(--color-white-light);
    border-bottom: 1px solid var(--color-white);
}

#checkout .step-title,
#checkout .step-title-wrapper,
#checkout .step-edit {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

#checkout .step-title,
body#checkout section.checkout-step .step-title {
    padding: 8px;
    padding-right: 0;
    margin: 0;
    border: none;
}

@media (max-width: 575px) {
    body#checkout section.checkout-step .step-title {
        flex-wrap: wrap;
    }
}

#checkout .step-title-wrapper {
    gap: 24px;
    color: var(--color-black);
}

/* Step header for completed steps */
#checkout .checkout-step.-reachable.-complete {
    border-bottom: 1px solid var(--color-white);
}

#checkout .checkout-step.-reachable.-complete .step-edit,
#checkout .checkout-step.-reachable.-complete .step-title-wrapper .done {
    display: flex;
    margin: 0;
    padding: 0;
    gap: 4px;
    margin-left: auto;
}

#checkout .checkout-step.-reachable.-complete .step-edit p {
    text-transform: capitalize;
}

#checkout .checkout-step.-reachable.-complete .step-title-wrapper .step-number {
    display: none;
    margin: 0;
    padding: 0;
}

#checkout .checkout-step.-reachable.-complete .step-title-wrapper .done {
    width: 32px;
    height: 32px;
    font-size: 32px;
    line-height: 32px;
}

/* Step header for step number */
body#checkout section.checkout-step.-reachable.-current .step-number,
body#checkout section.checkout-step.-unreachable .step-number {
    color: var(--color-white-light);
    background-color: var(--color-validation);
    border-radius: 50%;
    font-size: 17px;
    line-height: 18px;
    font-weight: 600;
    padding: 0;
    margin: 0;
    border: none;
}

/* Step header for next steps */
body#checkout section.checkout-step.-unreachable {
    border-bottom: 1px solid var(--color-white);
}

body#checkout section.checkout-step.-current+.checkout-step .step-title {
    padding: 8px;
    border: none;
}

/* 
* Addresses
*/
body#checkout section.checkout-step .address {
    margin: 0;
}

body#checkout section.checkout-step #delivery-addresses,
body#checkout section.checkout-step #invoice-addresses,
body#checkout section.checkout-step .add-address {
    margin-top: 0;
}

body#checkout section.checkout-step #delivery-addresses>p,
body#checkout section.checkout-step #invoice-addresses>p {
    display: none;
}

body#checkout section.checkout-step .address-item {
    background: var(--color-white);
    border: 1px solid transparent;
    flex: 1 0;
}

body#checkout section.checkout-step .address-item.selected {
    background: var(--color-white-light);
    border: var(--color-primary) 1px solid;
}

/* 
 * Carriers
 */


body#checkout section.checkout-step .delivery-options-list form#js-delivery,
body#checkout section.checkout-step .delivery-options-list .form-fields,
body#checkout section.checkout-step .delivery-options-list #delivery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body#checkout section.checkout-step .delivery-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

body#checkout section.checkout-step .delivery-options .delivery-option {
    display: flex;
    margin: 0;
    padding: 16px;
    gap: 16px;
    background: var(--color-white);
    min-height: unset;
    border-radius: 32px;
}

body#checkout section.checkout-step .delivery-options .delivery-option label {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: 1;
}

body#checkout section.checkout-step .delivery-options .delivery-option label.row::after {
    display: none;
}

body#checkout section.checkout-step .delivery-options .delivery-option label.row .carrier-price {
    width: var(--width-carrier-price);
    flex-shrink: 0;
}

body#checkout section.checkout-step .delivery-options .delivery-option label.row .carrier-delay {
    width: var(--width-carrier-delay);
    text-align: end;
    flex-shrink: 0;
}

body#checkout section.checkout-step .delivery-options .delivery-option label.row .carrier {
    flex: 1 1 100%;
    justify-content: center;
}

body#checkout section.checkout-step .delivery-options .delivery-option label.row .carrier-name {
    text-wrap: wrap;
    text-align: center;
}

body#checkout section.checkout-step .delivery-options-list #delivery {
    gap: 8px;
}

body#checkout section.checkout-step .delivery-options-list #delivery * {
    margin: 0;
    padding: 0;
}

body#checkout section.checkout-step .delivery-options-list #delivery textarea {
    padding: 24px;
    resize: none;
}

body#checkout section.checkout-step .delivery-options-list form#js-delivery button[type="submit"] {
    width: fit-content;
    margin-left: auto;
}

@media (max-width: 575px) {
    body#checkout section.checkout-step .delivery-options .delivery-option label.row {
        flex-direction: column;
        align-items: flex-start;
    }

    body#checkout section.checkout-step .delivery-options .delivery-option label.row .carrier {
        justify-content: flex-start;
    }

    body#checkout section.checkout-step .delivery-options .delivery-option label.row .carrier-name {
        text-align: start;
    }

    body#checkout section.checkout-step .delivery-options .delivery-option label.row .carrier-delay {
        text-align: start;
    }
}



/* 
 * Payment
 */

body#checkout section.checkout-step.-current#checkout-payment-step .content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

body#checkout section.checkout-step#checkout-payment-step .payment-options {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 24px;
}

body#checkout section.checkout-step#checkout-payment-step .payment-options>div {
    flex: 1 0 48%;
    width: 100%;
}

body#checkout section.checkout-step#checkout-payment-step .payment-options>div .payment-option {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 24px;
    border: 1px solid transparent;
    background: var(--color-white);
    border-radius: 32px;
    margin: 0;
}


body#checkout section.checkout-step#checkout-payment-step .payment-options>div .payment-option label {
    display: flex;
    flex-direction: row;
    margin: 0;
    gap: 8px;
    cursor: pointer;
}

body#checkout section.checkout-step#checkout-payment-step .payment-options>div .payment-option label span {
    text-align: left;
}

body#checkout section.checkout-step#checkout-payment-step .payment-options>div .payment-option::after {
    display: none;
}

body#checkout section.checkout-step#checkout-payment-step .payment-options>div .payment-option:has(input[type='radio']:checked) {
    border: 1px solid var(--color-primary);
    background: var(--color-white-light);
}

/* Hide text shown on select & selection form */
body#checkout section.checkout-step#checkout-payment-step .payment-options .js-additional-information.definition-list.additional-information,
body#checkout section.checkout-step#checkout-payment-step .payment-options .js-payment-option-form {
    display: none !important;
}

@media (max-width: 575px) {

    body#checkout section.checkout-step#checkout-payment-step .payment-options>div .payment-option label {
        flex-wrap: wrap;
    }

    body#checkout section.checkout-step#checkout-payment-step .payment-options {
        flex-direction: column;
    }
}

/* 
 * Order Summary Content
*/

body#checkout #order-summary-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
}

body#checkout #order-summary-content .row {
    display: flex;
    flex-direction: row;
    gap: 32px;
    margin: 0;
}

body#checkout #order-summary-content .row::after {
    display: none;
}

body#checkout #order-summary-content .row:has(> h4) {
    justify-content: space-between;
}

body#checkout #order-summary-content .card-block {
    display: flex;
    flex-direction: column;
    border-radius: 32px;
    border: none;
    gap: 12px;
    background: var(--color-white);
    flex: 1 0 48%;
    width: 100%;
}

@media (max-width: 575px) {
    body#checkout #order-summary-content .row:has(.card-block) {
        flex-direction: column;
        gap: 24px;
    }
}

body#checkout #order-summary-content .card-block h4 {
    margin: 0;
    font-size: 17px;
    line-height: 18px;
    width: 100%;
    text-align: center;
}

body#checkout #order-summary-content .card {
    border: none;
    margin: 0;
}

body#checkout #order-summary-content .summary-selected-carrier {
    background-color: var(--color-white);
    border: none;
    border-radius: 32px;
    display: flex;
    align-items: center;
    padding: 16px;
    margin: 0;
    gap: 16px;
}

body#checkout #order-summary-content .summary-selected-carrier .carrier-name {
    width: 100%;
    color: var(--color-black);
    font-weight: 600;
}

body#checkout #order-summary-content .summary-selected-carrier .carrier-delay {
    width: var(--width-carrier-delay);
    color: var(--color-black);
    flex: 1 0 var(--width-carrier-delay);
}

body#checkout #order-summary-content .summary-selected-carrier .carrier-price {
    width: var(--width-carrier-price);
    color: var(--color-black);
    flex-shrink: 0;
    text-align: end;
}

@media (max-width: 575px) {

    body#checkout #order-summary-content .summary-selected-carrier {
        flex-direction: column;
        align-items: flex-start;
    }

    body#checkout #order-summary-content .summary-selected-carrier .carrier-delay {
        flex-basis: fit-content;
    }

    body#checkout #order-summary-content .summary-selected-carrier .carrier-price {
        text-align: start;
    }
}


body#checkout section.checkout-step #conditions-to-approve {
    margin: 0;
    padding: 0;
}

body#checkout section.checkout-step #conditions-to-approve * {
    margin: 0;
}

body#checkout section.checkout-step #payment-confirmation {
    margin-bottom: 24px;
}

/* 
 * Order confirmation table (list of products)
 */

section#content #order-items {
    background: var(--color-white);
    border-radius: 32px;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    width: 100%;
}

section#content #order-items .order-items-header {
    gap: 4px;
    width: 100%;
}


section#content #order-items .order-items-header .card-title {
    margin: 0;
    padding: 0;
}

section#content #order-items .order-items-header .card-title-items {
    width: 100%;
    flex: 1 0 fit-content;
    font-weight: 600;
}

section#content #order-items .order-items-header .card-title-details {
    width: 100px;
    flex: 0 0 100px;
    text-align: center;
    font-weight: 600;
}


body#checkout #order-items .order-confirmation-table,
body#order-confirmation #order-items .order-confirmation-table {
    background-color: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    width: 100%;
}

body#checkout #order-items .order-confirmation-table .order-line {
    gap: 8px
}

body#checkout #order-items .order-confirmation-table img,
body#order-confirmation #order-items .order-confirmation-table img {
    border-radius: 50%;
    margin: 0;
    width: 60px;
    height: 60px;
}

body#checkout #order-items .order-confirmation-table .details,
body#order-confirmation #order-items .order-confirmation-table .details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin: 0;
    flex: 1 1 100%;
}

body#checkout #order-items .order-confirmation-table .details a,
body#order-confirmation #order-items .order-confirmation-table .details a {
    color: var(--color-black);
    text-overflow: ellipsis;
    max-width: 100%;
}

body#checkout #order-items .order-confirmation-table .details a:hover,
body#order-confirmation #order-items .order-confirmation-table .details a:hover {
    color: var(--color-primary);
}

body#checkout #order-items .order-confirmation-table .row.qty,
body#order-confirmation #order-items .order-line .row.qty {
    gap: 4px;
}

body#checkout #order-items .order-confirmation-table .row.qty div,
body#order-confirmation #order-items .order-line .row.qty div {
    width: 100px;
}
body#checkout #order-items .order-confirmation-table .details .row.qty div {
    width: unset;
}

body#checkout #order-summary-content .product-line-conditionnement {
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

body#checkout #order-summary-content .product-line-conditionnement span,
body#checkout #order-summary-content .product-line-conditionnement .unit-price-cart {
    font-size: 11px;
    line-height: 14px;
}


body#checkout section.checkout-step #order-summary-content #order-items .quantity {
    width: 60px;
    flex: 0 0 60px;
}

body#checkout #order-summary-content .hidden-on-desktop,
body#order-confirmation #order-items .hidden-on-desktop {
    display: none;
}

@media (max-width: 767px) {
    /* Change order lines to mobile view */

    section#content #order-items .order-items-header .card-title-details {
        display: none;
    }

    body#checkout #order-items .order-confirmation-table img,
    body#order-confirmation #order-items .order-confirmation-table img {
        width: 50px;
        height: 50px;
    }

    body#checkout #order-items .order-confirmation-table .details,
    body#order-confirmation #order-items .order-confirmation-table .details {
        gap: 0;
    }

    body#checkout section.checkout-step #order-summary-content #order-items .quantity {
        font-weight: 600;
    }

    body#checkout #order-items .order-confirmation-table .row.qty div,
    body#order-confirmation #order-items .order-confirmation-table .row.qty div {
        width: fit-content;
    }

    body#checkout #order-summary-content .hidden-on-desktop,
    body#order-confirmation #order-items .hidden-on-desktop {
        display: flex;
    }

    body#checkout #order-summary-content .hidden-on-mobile,
    body#order-confirmation #order-items .hidden-on-mobile{
        display: none !important;
    }
}

/* 
* Confirmation page
*/
body#order-confirmation section {
    border-radius: 32px;
    border: none;
}

/* Card blocks */
body#order-confirmation .card-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 32px;
    margin: 0;
}

/* Title */
body#order-confirmation .card-block .title {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

body#order-confirmation .card-block .material-icons {
    margin: 0;
    padding: 0;
}

/* Firsts texts wrapper */
body#order-confirmation .card-block div.texts {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body#order-confirmation .card-block div.texts div {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

/* Order details */
#order-confirmation #order-details .wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#order-confirmation #order-details .wrapper>br {
    display: none;
}

#order-confirmation #order-details p span.bold {
    display: none;
}


/* Confirmation page general */
#order-confirmation section#content #order-items {
    background: var(--color-white-light);
}
#order-confirmation #order-items .row {
    display: flex;
    flex-direction: row;
    gap: 32px;
    margin: 0;
}

body#order-confirmation #order-items .order-confirmation-table .order-line {
    gap: 18px;
}

#order-confirmation #order-details .address {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
} 

body#order-confirmation #order-items .row::after,
body#order-confirmation .card-block::after {
    display: none;
}


/* 
 * General 
 */

body#checkout a:hover,
body#checkout section.checkout-step .add-address a:hover {
    color: var(--color-primary);
}

body#checkout section.checkout-step .add-address a {
    color: var(--color-secondary);
}