/*
 * Premium Ecológica
 * Cart R1.4.3.1
 */


/* ============================================================
   PAGE WORKSPACE
   ============================================================ */

body.checkout-cart-index #maincontent,
body.checkout-cart-index main#maincontent,
body.checkout-cart-index .page-main,
body.checkout-cart-index .page-main.container {
    width: calc(100% - 48px) !important;
    max-width: 1500px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


body.checkout-cart-index .columns,
body.checkout-cart-index .column.main {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* ============================================================
   STRUCTURAL GRID
   ============================================================ */

body.checkout-cart-index .premium-cart-r143-layout {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(390px, 420px) !important;

    gap: 36px !important;

    align-items: start !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}


body.checkout-cart-index .premium-cart-r143-main {
    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
}


body.checkout-cart-index .premium-cart-r143-summary {
    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
}


/* ============================================================
   CART MAIN COLUMN
   ============================================================ */

body.checkout-cart-index
.premium-cart-r143-main
.form-cart,

body.checkout-cart-index
.premium-cart-r143-main
form,

body.checkout-cart-index
.premium-cart-r143-main
.cart,

body.checkout-cart-index
.premium-cart-r143-main
#shopping-cart-table {
    width: 100% !important;
    max-width: none !important;
}


body.checkout-cart-index
.premium-cart-r143-main
.premium-cart-item {
    width: 100% !important;
    max-width: none !important;
}


/* Update cart action stays aligned with the cart card */

body.checkout-cart-index
.premium-cart-r143-main
.actions-toolbar.cart.actions {
    width: 100% !important;

    display: flex !important;
    justify-content: flex-end !important;

    margin-top: 16px !important;
}


/* ============================================================
   SUMMARY COLUMN
   ============================================================ */

body.checkout-cart-index
.premium-cart-r143-summary
.cart-summary {
    float: none !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;

    position: sticky !important;
    top: 118px !important;
}


body.checkout-cart-index
.premium-cart-r143-summary
.cart-summary-actions {
    width: 100% !important;
}


body.checkout-cart-index
.premium-cart-r143-summary
input,

body.checkout-cart-index
.premium-cart-r143-summary
select,

body.checkout-cart-index
.premium-cart-r143-summary
button {
    max-width: 100%;
}


/* Long shipping labels must wrap instead of squeezing the summary */

body.checkout-cart-index
.premium-cart-r143-summary label,

body.checkout-cart-index
.premium-cart-r143-summary span,

body.checkout-cart-index
.premium-cart-r143-summary div {
    min-width: 0;
    overflow-wrap: anywhere;
}


/* ============================================================
   NOTEBOOK
   ============================================================ */

@media (min-width: 1024px) and (max-width: 1279px) {

    body.checkout-cart-index
    .premium-cart-r143-layout {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(340px, 370px) !important;

        gap: 24px !important;
    }

}


/* ============================================================
   TABLET / MOBILE
   ============================================================ */

@media (max-width: 1023px) {

    body.checkout-cart-index #maincontent,
    body.checkout-cart-index main#maincontent,
    body.checkout-cart-index .page-main,
    body.checkout-cart-index .page-main.container {
        width: calc(100% - 32px) !important;
    }


    body.checkout-cart-index
    .premium-cart-r143-layout {
        grid-template-columns:
            minmax(0, 1fr) !important;

        gap: 24px !important;
    }


    body.checkout-cart-index
    .premium-cart-r143-summary
    .cart-summary {
        position: static !important;
    }

}


@media (max-width: 639px) {

    body.checkout-cart-index #maincontent,
    body.checkout-cart-index main#maincontent,
    body.checkout-cart-index .page-main,
    body.checkout-cart-index .page-main.container {
        width: calc(100% - 24px) !important;
    }

}


/* ============================================================
   PREMIUM_CART_BRASPRESS_CHECKOUT_VISUAL_R144
   Shipping options in the cart match OneStepCheckout presentation.
   Only markup/styles: quotes, API, totals and selection events unchanged.
   ============================================================ */
body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-group {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: 10px;
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
    min-height: 63px;
    padding: 11px 12px;
    border: 1px solid #d4e1db;
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option:hover {
    border-color: #95cbb2;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option.is-selected {
    border-color: #07905a;
    background: #f2faf6;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option > input[type="radio"] {
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    accent-color: #078b57;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option__content {
    display: block;
    min-width: 0;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option__title {
    display: block;
    color: #173e31;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: break-word;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option__carrier {
    display: block;
    color: #71857e;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 3px;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option__note {
    display: block;
    color: #71857e;
    font-size: 10px;
    line-height: 1.4;
    margin-top: 3px;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option__prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: max-content !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option__price {
    display: inline-block;
    width: max-content;
    color: #0b7048;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    text-align: right;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

@media (max-width: 440px) {
    body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option {
        grid-template-columns: 18px minmax(0, 1fr);
        row-gap: 4px;
    }

    body.checkout-cart-index .premium-cart-r143-summary .premium-cart-shipping-option__prices {
        grid-column: 2;
        justify-self: end;
    }
}
