/* -------------------------------------------
	Cart Page
    - Cart List
    - Cart Totals
    - Cart Page Empty
    - Cross Sells
---------------------------------------------- */

@import '../config';
@import '../mixins';
@import '../direction';

.woocommerce-cart .main {
    padding-top: 4rem;
    padding-bottom: 10rem;
}

// Cart List
.shop_table {
    a.product-thumbnail {
        display: inline-block;
        vertical-align: middle;
    }

    .quantity-wrapper {
        label {
            display: none;
        }
    }
}

.woocommerce-cart-form__contents tbody,
.cart-information tbody {
    border-bottom: 0;
}

.shop_table .product-quantity .label,
.cart_totals .woocommerce-shipping-totals th {
    display: none;
}

.woocommerce-cart-form__contents {
    padding-top: 1.3rem;

    td,
    th {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    td {
        padding-#{$right}: 2rem;
    }

    thead th {
        padding: .2rem 0 1.6rem;
        font-size: 1.6rem;
        font-weight: 600;
        line-height: 1;
        text-transform: capitalize;
        color: var(--alpha-change-color-dark-1);
    }

    th.product-thumbnail {
        width: 14.79%;
    }

    th.product-price {
        width: 17.29%;
    }

    th.product-quantity {
        width: 25.77%;
    }

    th.product-subtotal {
        width: 14.79%;
    }

    td.product-price {
        font-weight: 400;
        font-size: 1.6rem;
        color: var(--alpha-body-color);
    }

    .quantity {
        max-width: 12rem;
    }

    td.product-subtotal {
        font-weight: 600;
        font-size: 1.6rem;
        color: var(--alpha-change-color-dark-1);
    }

    .variation {
        font-size: 1.2rem;
        line-height: 1.3;
        margin: .5rem 0 0 0;

        p {
            margin: 0;
        }

        dd {
            margin: 0;

            &+dd {
                margin-top: .5rem;
            }
        }
    }
}


@include mq('lg', 'max') {
    .woocommerce-cart-form {
        margin-bottom: 2rem;
    }
}

@include mq('md', 'max') {
    .woocommerce-cart-form {
        tbody {
            display: block;
        }

        tr,
        td {
            display: block;
        }

        td.actions {
            border-top: none;
        }

        .cart_item {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 4rem 2rem 2.5rem;
            border: 1px solid var(--alpha-change-border-color);
            text-align: center;

            td {
                border: none;
                padding: 0;
                margin-bottom: 5px;
                text-align: center;
            }

            +.cart_item {
                border-top: none;
            }

            .product-remove {
                position: absolute;
                #{$right}: 15px;
                top: 15px;
            }
        }
    }

    .woocommerce-cart-form__contents {
        thead {
            display: none;
        }

        .remove {
            top: -8px;
            #{$right}: -8px;
        }
    }
}

#cart_coupon_box {
    margin: 4rem 0 3rem;

    h5 {
        font-size: 1.6rem;
    }

    input.form-control {
        border-top: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .btn {
        --alpha-btn-bd-color: var(--alpha-grey-color);
    }
}

.cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    .continue-shopping {
        i {
            font-size: 1.7rem;
        }
    }

    button:not([disabled]) {
        --alpha-btn-bd-color: var(--alpha-grey-color);
        --alpha-btn-hover-color: #fff;
        --alpha-btn-hover-bd-color: var(--alpha-dark-color);
        --alpha-btn-hover-bg-color: var(--alpha-dark-color);
        --alpha-btn-active-color: #fff;
        --alpha-btn-active-bd-color: var(--alpha-dark-color);
        --alpha-btn-active-bg-color: var(--alpha-dark-color);
    }

    .wc-action-btn {
        border-width: 1px;
    }
}

@media (max-width: 619px) {
    .cart-actions {
        .continue-shopping {
            width: 100%;
        }

        button {
            flex: 1;
        }
    }
}

// Cart Totals
.cart-title {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
    line-height: .73;
    text-transform: uppercase;
}

.cart-information {
    th {
        font-weight: 600;
        font-size: 1.6rem;
        color: var(--alpha-change-color-dark-1);
    }

    .woocommerce-shipping-totals h4 {
        margin-bottom: 1.5rem;
        font-size: 1.6rem;
        font-weight: 600;
        color: var(--alpha-change-color-dark-1);
    }

    p {
        font-family: var(--alpha-body-font-family);
    }
}

.woocommerce-shipping-totals td {
    padding: 2.8rem 0 2.4rem;
}

.woocommerce-shipping-methods {
    padding: 0;
    margin: 0 0 1.1rem;
    list-style: none;
}

.woocommerce-shipping-destination {
    font-size: 1.5rem;
    line-height: 1.4;

    strong {
        font-weight: 600;
    }
}

.woocommerce-shipping-calculator {
    margin-top: 2.2rem;

    .form-row-wide {
        margin-bottom: 1.5rem;
    }
}

.shipping-calculator-form {
    display: block !important;

    select {
        max-width: 100%;
        color: inherit;
        border-color: var(--alpha-change-border-color);
    }

    .button {
        padding: 1.15rem 2.2rem;
        border-width: 1px;
    }
}

.shipping input.input-text {
    padding: .95rem 1.4rem;
    color: inherit;
    font-size: inherit;
}

.shipping-calculator-footer {
    margin-bottom: 1rem;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    border-bottom: none;
}

.checkout-button {
    width: 100%;

    &:#{$after} {
        position: relative;
        top: .1em;
        content: if-ltr("\e92c", "\e92b");
        font-family: $framework-font;
        margin-#{$left}: var(--alpha-btn-icon-spacing);
    }
}

.wc-proceed-to-checkout .button {
    padding-left: 0;
    padding-right: 0;
    border-color: var(--alpha-change-color-dark-1);
    background-color: var(--alpha-change-color-dark-1);

    &:hover,
    &:focus {
        border-color: var(--alpha-change-color-dark-1-hover);
        background-color: var(--alpha-change-color-dark-1-hover);
    }
}

// Cart Page Empty
.cart-empty-page {
    display: flex;
    flex-flow: column;

    i.cart-empty {
        display: block;
        margin-bottom: 1rem;
    }

    .woocommerce-notices-wrapper {
        order: -1;
    }
}

// Cross Sells
.cross-sells {
    margin-top: 4rem;

    h2 {
        font-size: 2rem;
    }
}