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

/*----------------------------------------*/
/*  7.25 Checkout css
/*----------------------------------------*/
.#{$theme-prifix}-checkout {
    &-verify {
        &-item {
            margin-bottom: 40px;

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

        &-reveal {
            font-size: 14px;
            color: var(--tp-common-black);
            margin-bottom: 0;
            display: inline-block;
            border: 1px dashed #AAB0B2;
            padding: 8px 26px;
            width: 100%;

            & button {
                color: var(--tp-theme-1);
                position: relative;

                &::after {
                    position: absolute;
                    content: '';
                    left: 0;
                    bottom: 4px;
                    width: 100%;
                    height: 1px;
                    background-color: var(--tp-theme-1);
                }
            }
        }
    }

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

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

    &-input {
        margin-bottom: 20px;

        & label {
            font-weight: 500;
            color: var(--tp-common-black);
            margin-bottom: 5px;

            & span {
                color: red;
            }
        }

        & input,
        & textarea {
            width: 100%;
            background: #FFFFFF;
            border: 1px solid #D5D8DB;
            color: var(--tp-common-black);
            height: 60px;

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

        & textarea {
            height: 200px;
            resize: none;
        }

        & .nice-select {
            height: 50px;
            line-height: 48px;
            border-radius: 0;
            border: 1px solid #D5D8DB;
            color: var(--tp-common-black);
            float: none;
            padding: 0 26px;

            &::after {
                right: 26px;
            }

            &.open {
                & .list {
                    @include tp-transform(scale(1) translateY(0px));
                }
            }

            & .list {
                margin-top: 0;
                border-radius: 0;
                transform-origin: center center;
                @include tp-transform(scale(.9) translateY(0px));
                width: 100%;
                padding: 12px 0;

                & .option {
                    line-height: 1.2;
                    min-height: inherit;
                    padding-top: 5px;
                    padding-bottom: 5px;

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

    &-option {
        margin-bottom: 4px;

        &-wrapper {
            margin-top: 10px;
            margin-bottom: 17px;
        }

        & input {
            display: none;

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

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

        & label {
            font-size: 15px;
            color: #55585B;
            position: relative;
            padding-left: 26px;
            z-index: 1;

            &::after {
                position: absolute;
                content: '';
                top: 4px;
                left: 0;
                width: 18px;
                height: 18px;
                line-height: 16px;
                text-align: center;
                border: 1px solid #C3C7C9;
                z-index: -1;
                @include tp-transition();
            }

            &::before {
                position: absolute;
                content: url('../img/icon/check.svg');
                top: 4px;
                left: 0;
                width: 18px;
                height: 18px;
                line-height: 16px;
                text-align: center;
                visibility: hidden;
                opacity: 0;
                color: var(--tp-common-white);
                @include tp-transition();
            }

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

            &:hover {
                cursor: pointer;
            }
        }
    }

    &-bill {
        &-area {
            padding: 45px 40px 24px;
            background-color: var(--tp-grey-1);

            @media #{$xs} {
                padding: 45px 25px 24px;
            }
        }

        &-title {
            font-weight: 600;
            font-size: 26px;
            margin-bottom: 35px;
            font-family: var(--tp-ff-body);
            color: var(--tp-common-black);
        }
    }

    &-place {
        padding: 34px 30px 30px;

        @media #{$lg} {
            padding: 35px 20px;
        }

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

        &-title {
            font-size: 26px;
            font-weight: 600;
            margin-right: 37px;
            font-family: var(--tp-ff-body);
            color: var(--tp-common-black);
        }
    }

    &-payment {
        padding-bottom: 26px;
        margin-bottom: 24px;
        border-bottom: 1px solid #E0E2E3;

        &-item {
            &:not(:last-child) {
                margin-bottom: 10px;
            }

            &.paypal-payment {
                & label {
                    @include flexbox();
                    align-items: center;
                    flex-wrap: wrap;
                }
            }

            & input {
                display: none;

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

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

            & label {
                font-size: 14px;
                position: relative;
                padding-left: 27px;
                font-weight: 500;
                color: var(--tp-common-black);

                &:hover {
                    cursor: pointer;
                }

                &::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: 3px;
                    top: 8px;
                    width: 10px;
                    height: 10px;
                    border-radius: 50%;
                    background-color: var(--tp-theme-1);
                    visibility: hidden;
                    opacity: 0;
                    @include tp-transition();
                }

                & img {
                    margin-left: 14px;

                    @media #{$lg} {
                        margin-left: 4px;
                    }

                    @media #{$xs} {
                        margin-top: 20px;
                        margin-left: 0px;
                    }

                    @include tp-transform(translateY(-2px));
                }

                & a {
                    margin-top: 20px;
                    position: relative;

                    @media #{$md} {
                        margin-top: 0;
                        margin-left: 20px;
                    }

                    &::after {
                        position: absolute;
                        content: '';
                        left: 0;
                        bottom: 3px;
                        width: 100%;
                        height: 1px;
                        background-color: var(--tp-common-black);
                    }
                }
            }
        }

        &-desc {
            position: relative;
            padding-top: 10px;
            display: none;

            &::after {
                position: absolute;
                content: '';
                left: 57px;
                top: 0;
                width: 16px;
                height: 16px;
                background-color: var(--tp-common-white);
                @include tp-transform(translateY(3px) rotate(45deg));
            }

            & p {
                background-color: var(--tp-common-white);
                padding: 19px 30px;
                margin-left: 27px;
                font-size: 14px;
                line-height: 1.57;
                color: #55585B;
                margin-bottom: 0;
            }
        }
    }

    &-agree {
        margin-bottom: 24px;
    }
}

.#{$theme-prifix}-return-customer {
    display: none;
    margin-top: 14px;
    padding: 40px 40px;
    background-color: var(--tp-grey-1);

    @media #{$xs} {
        padding: 40px 30px;
    }

    &-input {
        margin-bottom: 20px;

        & label {
            font-weight: 500;
            color: var(--tp-common-black);
            margin-bottom: 5px;

            & span {
                color: red;
            }
        }

        & input {
            width: 100%;
            background: #FFFFFF;
            border: 1px solid #D5D8DB;
            color: var(--tp-common-black);
            height: 60px;

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

    &-remeber {
        & input {
            display: none;

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

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

        & label {
            font-size: 15px;
            color: #55585B;
            position: relative;
            padding-left: 26px;
            z-index: 1;

            &::after {
                position: absolute;
                content: '';
                top: 4px;
                left: 0;
                width: 18px;
                height: 18px;
                line-height: 16px;
                text-align: center;
                border: 1px solid #C3C7C9;
                z-index: -1;
                @include tp-transition();
            }

            &::before {
                position: absolute;
                content: url('../img/icon/check.svg');
                top: 4px;
                left: 0;
                width: 18px;
                height: 18px;
                line-height: 16px;
                text-align: center;
                visibility: hidden;
                opacity: 0;
                color: var(--tp-common-white);
                @include tp-transition();
            }

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

            &:hover {
                cursor: pointer;
            }
        }
    }

    &-forgot {
        & a {
            font-weight: 400;
            font-size: 15px;
            color: var(--tp-theme-1);
            position: relative;
            display: inline-block;

            &::after {
                position: absolute;
                content: '';
                left: auto;
                right: 0;
                bottom: 4px;
                width: 0%;
                height: 1px;
                background-color: var(--tp-theme-1);
            }

            &:hover {
                &::after {
                    left: 0;
                    right: auto;
                    width: 100%;
                }
            }
        }
    }
}

.#{$theme-prifix}-checkout-country {
    &.nice-select {
        border-radius: 0;
        width: 100%;
        background: #FFFFFF;
        border: 1px solid #D5D8DB;
        color: var(--tp-common-black);
        height: 60px;

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

    &.nice-select::after {
        top: 30px;
    }

    &.tp-checkout-input .nice-select .list {
        margin-top: 2px;
    }

    &.doctor-name span {
        line-height: 4.2;
    }
}