.th-comment-form {
    background-color: $white-color;
    margin-top: 60px;
    padding: 60px;
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.06);
    border-radius: 80px;
    position: relative;

    @include lg {
        border-radius: 30px;
    }

    &.style2 {
        background-color: $smoke-color;
        box-shadow: none;
        border-radius: 60px;
        padding: 60px;
        margin-top: 45px;

        @include lg {
            border-radius: 30px;
            padding: 40px;
        }

        @include md {
            padding: 40px;
        }

        @include vxs {
            padding: 40px 20px;
        }

        .th-comments-wrapp {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
            @media(max-width: 480px) {
                display: block;
            }
        }

        select,
        .form-control,
        .form-select,
        textarea,
        input {
            background-color: $white-color;

        }

        .form-group {
            i {
                color: $theme-color;
            }
        }
    }

    @include md {
        padding: 40px;
    }

    .row {
        --bs-gutter-x: 30px;
    }

    .blog-inner-title {
        margin-bottom: 0px;
    }

    .form-title {
        margin-top: -0.35em;

        a#cancel-comment-reply-link {
            font-size: 0.7em;
            text-decoration: underline;
        }
    }

    .form-text {
        margin-bottom: 25px;
    }

    .form-group {
        >i {
            color: $body-color;
        }

        select,
        .form-control,
        .form-select,
        textarea,
        input {
            border-radius: 30px;
        }

        label {
            margin-bottom: -0.3rem;
        }
    }


    .th-btn:focus:after,
    .th-btn:focus:before,
    .th-btn:hover:after,
    .th-btn:hover:before,
    .th-btn:active:after,
    .th-btn.nice-select.open:after,
    .th-btn:active:before,
    .th-btn.nice-select.open:before {
        width: 145%; 
    }

}

.comment-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 55px;
    @media(max-width: 480px) {
        display: block;
    }

    .comment-profile {
        display: flex;
        gap: 20px;
        @media(max-width: 480px) {
            margin-bottom: 15px;
        }
    }

    .comment-avater {
        min-width: 56px;
        border-radius: 10px;

        img {
            border-radius: 10px;
            background-color: $theme-color;
            padding: 4px;
            width: 56px;
            height: 56px;
            border-radius: 10px;
        }
    }

    .name {
        font-weight: 600;
        font-size: 20px;
        line-height: 30px;
        margin-bottom: 2px;
    }
}

.blog-comment-area {
    margin-bottom: 25px;
}

.th-comment-form,
.th-comments-wrap {

    &:has(#wp-temp-form-div) {
        padding: 0;
        box-shadow: none;
        display: none;
    }
}

.th-comments-wrap {
    padding: var(--blog-space-y, 40px) var(--blog-space-x, 40px);
    background-color: $white-color;
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.06);
    border-radius: 60px;
    @include lg {
        border-radius: 30px;
    }

}

.th-comments-wrap {
    margin-top: var(--blog-space-y, 40px);
    margin-bottom: 30px;

    .description p:last-child {
        margin-bottom: -0.5em;
    }

    .comment-respond {
        margin: 30px 0;
    }

    pre {
        background: #ededed;
        color: #666;
        font-size: 14px;
        margin: 20px 0;
        overflow: auto;
        padding: 20px;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    li {
        margin: 0;
    }

    .th-post-comment {
        padding: 0;
        position: relative;
        display: flex;
        padding-bottom: 40px;
        margin-bottom: 40px;
        //padding: 30px; 
        position: relative;
        background: $white-color;
        border-radius: 0px;

        ol,
        ul,
        dl {
            margin-bottom: 1rem;
        }

        ol ol,
        ol ul,
        ul ol,
        ul ul {
            margin-bottom: 0;
        }
    }

    ul.comment-list {
        list-style: none;
        margin: 0;
        padding: 0;
        margin-bottom: -30px;

        ul,
        ol {

            ul,
            ol {
                margin-bottom: 0;
            }
        }
    }

    .comment-avater {
        @include equal-size(56px);
        border-radius: 17px;
        margin-right: 20px;
        overflow: hidden;

        img {
            width: 100%;
            border: 4px solid $theme-color;
            border-radius: 17px;
        }
    }

    .comment-content {
        flex: 1;
        margin-top: -6px;
        position: relative;
    }

    .commented-on {
        font-size: 16px;
        display: inline-block;
        margin-bottom: 15px;
        font-weight: 400;
        line-height: 26px;
        font-family: $body-font;
        color: $body-color;

        i {
            color: $theme-color;
            margin-right: 7px;
            font-size: 0.9rem;
        }
    }

    .name {
        margin-bottom: 0px;
        font-size: 20px;
        font-weight: 600;
        line-height: 30px;
    }

    .comment-top {
        display: flex;
        justify-content: space-between;
    }

    .text {
        margin-bottom: -0.4rem;
    }

    .children {
        margin: 0;
        padding: 0;
        list-style-type: none;
        //margin-left: 80px;
    }

    .reply_and_edit {
        margin-top: 0px;
        margin-bottom: -0.46em;
        position: absolute;
        top: 0;
        right: 0;
        transition: all 0.4s ease-in-out;

        @include xs {
            position: relative;
            margin-top: 12px;
        }

        a {
            margin-right: 10px;

            &:last-child {
                margin-right: 0;
            }
        }
    }

    .reply-btn {
        font-weight: 500;
        font-size: 14px;
        font-weight: 700;
        line-height: 24px;
        display: inline-block;
        color: $theme-color;
        text-transform: capitalize;

        i {
            margin-right: 7px;
        }
    }

    .star-rating {
        font-size: 12px;
        margin-bottom: 10px;
        position: absolute;
        top: 5px;
        right: 0;
        width: 80px;
    }
}

.form-submit {
    input[type="submit"] {
        background-color: $theme-color;
        color: $white-color;

        &:hover {
            background-color: $title-color;
        }
    }
}

.wp-block-post-comments-form {

    textarea,
    input:not([type=submit]):not([type=checkbox]):not([type=hidden]) {
        border: 1px solid $border-color;
    }
}

.wp-block-comment-author-name {
    font-weight: 600;
}


ul.comment-list {
    .th-comment-item {
        &:first-child {
            >.th-post-comment {
                border-bottom: 1px solid #D8DDE1;
            }
        }


    }

    .children .th-comment-item {
        >.th-post-comment {
            padding-bottom: 0px;
            border-bottom: none;
        }
    }

    &:has(> .th-comment-item ~ .th-comment-item) {
        &:first-child {
            >.th-post-comment {
                padding-bottom: 30px;
                border-bottom: 1px solid $border-color;
            }
        }
    }
}

.th-comments-wrap.th-comment-form {
    margin: 0;
}

.comment-respond .must-log-in {
    margin-bottom: 0;
    margin-top: 8px;
}

@include ml {

    // .th-comment-form,
    // .th-comments-wrap {
    //     padding: 40px 20px;
    // }
}

@include lg {
    .th-comments-wrap {
        .children {
            //margin-left: 40px;
        }
    }
}

@include md {

    // .th-comment-form,
    // .th-comments-wrap {
    //     padding: 40px;
    // }
}

@include sm {

    .th-comment-form,
    .th-comments-wrap {
        padding: 30px 30px;
    }

    .th-comments-wrap {
        .th-post-comment {
            display: block;
        }

        .star-rating {
            position: relative;
            top: 0;
            right: 0;
        }

        .comment-top {
            display: block;
        }

        .comment-avater {
            margin-right: 0;
            margin-bottom: 25px;
        }

        .children {
            //margin-left: 40px;
        }
    }

    .th-comments-wrap {
        .children {
            //margin-left: 30px;
        }
    }
}

@include sm {
    .th-comment-form {
        --blog-space-y: 30px;
        padding: 30px;
    }
}