@use '../../utils' as *;

/*----------------------------------------*/
/*  7.24 Cart css
/*----------------------------------------*/

.#{$theme-prifix}-cart {
    &-header {
        &-product {
            padding-left: 30px !important;
        }
    }

    &-list {
        @media #{$lg, $md, $sm, $xs} {
            overflow-x: scroll;
        }
        @media #{$md, $sm, $xs} {
            margin-right: 0;
        }
        .table> :not(caption)>*>* {
            padding: 20px 12px;
            box-shadow: none;
            vertical-align: middle;
        }

        & table {
            @media #{$lg, $md, $sm, $xs} {
                width: 960px;
            }
        }

        & thead {

            & th {
                font-weight: 500;
                font-size: 15px;
                color: var(--tp-heading-primary);
                border: 0 !important;
                padding-top: 9px !important;
                padding-bottom: 9px !important;
                background-color: #E0E2E3;
            }
        }

        & tr {
            & td {
                border-color: #E0E2E3;

                & .tp-cart-action-btn {
                    font-weight: 400;
                    font-size: 16px;
                    color: #818487;

                    & svg {
                        margin-top: -3px;
                        margin-right: 3px;
                    }

                    &:hover {
                        color: #FF1826;
                    }
                }
            }
        }

        & tbody {
            & tr {
                &:first-child {
                    & td {
                        padding-top: 30px !important;
                    }
                }
            }
        }
    }

    &-img {
        width: 100px;
        margin-right: 20px;

        & img {
            width: 84px;
            height: 84px;
            object-fit: cover;
        }
    }

    &-title {
        & a {
            font-weight: 500;
            font-size: 16px;
            color: var(--tp-heading-primary);

            &:hover {
                color: var(--tp-theme-1);
            }
        }
    }

    &-price {
        width: 126px;

        & span {
            font-size: 16px;
            color: var(--tp-heading-primary);
        }
    }

    &-quantity {
        width: 180px;

        & .tp-product-quantity {
            width: 160px;
        }

        & .tp-cart-input[type="text"] {
            height: 60px;
            width: 100%;
            text-align: center;
            font-size: 20px;
            border: 1px solid transparent;
            background-color: #f6f7f8;
            padding: 0 45px;
            line-height: 1.5;
            color: var(--tp-heading-primary);
        }

        & .tp-cart-plus,
        .tp-cart-minus {
            width: 60px;
            height: 60px;
            line-height: 62px;
        }
    }

    &-coupon {
        @media #{$sm, $xs} {
            margin-bottom: 20px;
        }

        &-input {
            &-box {
                & label {
                    font-size: 14px;
                    color: var(--tp-common-black);
                    margin-bottom: 7px;
                }
            }

            & input {
                background: #FFFFFF;
                border: 1px solid #D6D9DC;
                height: 54px;
                line-height: 46px;
                margin-right: 10px;
                max-width: 282px;

                &::placeholder {
                    color: #818487;
                    font-size: 16px;
                }

                &:focus {
                    border-color: var(--tp-theme-primary);
                }
            }

            & button {
                font-weight: 500;
                font-size: 16px;
                color: var(--tp-common-white);
                background-color: var(--tp-common-black);
                padding: 14px 30px;

                &:hover {
                    color: var(--tp-common-white);
                    background-color: var(--tp-theme-1);
                }
            }
        }
    }

    &-update {
        &-btn {
            font-weight: 500;
            font-size: 16px;
            color: var(--tp-heading-primary);
            background-color: var(--tp-common-white);
            padding: 15px 29px;
            border: 1px solid rgba(0, 0, 0, 0.1);

            &:hover {
                background-color: var(--tp-theme-1);
                border-color: var(--tp-theme-1);
                color: var(--tp-common-white);
            }
        }
    }

    &-checkout {
        &-wrapper {
            background: var(--tp-common-white);
            box-shadow: 0px 30px 70px rgba(1, 15, 28, 0.1);
            padding: 36px 24px 28px;
            margin-left: -24px;

            @media #{$md, $sm, $xs} {
                margin-top: 50px;
                margin-left: 0;
            }
        }

        &-top {
            padding-bottom: 13px;
            margin-bottom: 19px;
            border-bottom: 1px solid #E0E2E3;

            & span {
                font-size: 20px;
                color: var(--tp-common-black);
                font-weight: 500;
            }
        }

        &-shipping {
            padding-bottom: 16px;
            border-bottom: 1px solid #E0E2E3;
            margin-bottom: 15px;

            &-title {
                font-weight: 500;
                font-size: 20px;
                margin-bottom: 7px;
                font-family: var(--tp-ff-body);
                color: var(--tp-common-black);
            }

            &-option {
                &:not(:last-child) {
                    margin-bottom: 4px;
                }

                & input {
                    display: none;

                    &:checked {
                        &+label {
                            &::after {
                                border-color: var(--tp-theme-1);
                            }

                            &::before {
                                opacity: 1;
                                visibility: visible;
                            }
                        }
                    }
                }

                & label {
                    font-weight: 400;
                    font-size: 15px;
                    color: var(--tp-theme-primary);
                    position: relative;
                    padding-left: 25px;

                    &:hover {
                        cursor: pointer;
                    }

                    & span {
                        color: var(--tp-theme-1);
                    }

                    &::after {
                        position: absolute;
                        content: '';
                        left: 0;
                        top: 5px;
                        width: 16px;
                        height: 16px;
                        border-radius: 50%;
                        border: 1px solid #BCBCBC;
                        @include tp-transition();
                    }

                    &::before {
                        position: absolute;
                        content: '';
                        left: 4px;
                        top: 9px;
                        width: 8px;
                        height: 8px;
                        border-radius: 50%;
                        background-color: var(--tp-theme-1);
                        visibility: hidden;
                        opacity: 0;
                        @include tp-transition();
                    }
                }
            }
        }

        &-total {
            margin-bottom: 25px;

            & span {
                font-weight: 500;
                font-size: 18px;
                color: var(--tp-common-black);
            }
        }

        &-btn {
            font-size: 16px;
            font-weight: 500;
            color: var(--tp-common-white);
            background-color: var(--tp-common-black);
            display: inline-block;
            padding: 14px 30px;
            text-align: center;

            &:hover {
                background-color: var(--tp-theme-1);
                color: var(--tp-common-white);
            }
        }
    }
}

.#{$theme-prifix}-cart-add-to-cart {
    & .tp-btn {
        padding: 13px 28px;
        font-weight: 500;
    }
}