/* Comment form and list */

#comments,
#comments * {
    box-sizing: border-box;
}

#comments {
    max-width: calc(100% - 120px);
    margin: 0 auto 40px;
    scroll-margin-top: 110px;
}

#comments ul,
#comments li {
    margin: 0;
    padding: 0;
    list-style: none;
}

#comments .respond {
    position: relative;
    z-index: 1300;
    display: block;
    margin: 34px 0 24px;
}

#comments .cat_comment_respond_form {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--line-primary);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 10px 28px rgba(62, 57, 52, .035);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

#comments .cat_comment_respond_form .card,
#comments .comment-form-btn-wrap .card {
    overflow: visible;
    word-break: normal;
}

#comments .cat_comment_respond_form .head {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

#comments .cat_comment_respond_form .head .list,
#comments .cat_comment_respond_form .body {
    border: 1px solid var(--line-secondary);
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

#comments .cat_comment_respond_form .head .list:focus-within,
#comments .cat_comment_respond_form .body:focus-within,
#comments .tp-comment-captcha:focus-within {
    border-color: var(--control-hover-border);
    background: var(--bg-soft);
    box-shadow: var(--control-hover-shadow);
}

#comments .cat_comment_respond_form input,
#comments .cat_comment_respond_form textarea {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-body);
    font: 14px/1.7 var(--font-main);
}

#comments .cat_comment_respond_form .head input {
    height: 36px;
    padding: 0 12px;
}

#comments .cat_comment_respond_form .body {
    padding: 0;
}

#comments .cat_comment_respond_form .Comment_Textarea {
    display: block;
    min-height: 92px;
    padding: 11px 12px;
    resize: vertical;
}

#comments .cat_comment_respond_form input::placeholder,
#comments .cat_comment_respond_form textarea::placeholder {
    color: var(--text-muted);
}

#comments .comment-form-btn-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#comments .comment-form-btn-wrap .right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#comments .tp-comment-captcha {
    display: inline-flex;
    flex: 1 1 138px;
    align-items: center;
    width: 138px;
    min-width: 0;
    max-width: 138px;
    height: 34px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--control-bg);
    box-shadow: var(--control-shadow);
    overflow: hidden;
}

#comments .tp-comment-captcha-input {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 100%;
    padding: 0 6px;
    font-size: 13px;
    line-height: 32px;
    text-transform: lowercase;
}

#comments .tp-comment-captcha-code {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48%;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 100%;
    padding: 0;
    border-left: 1px solid var(--control-border);
    background: radial-gradient(circle at 10px 8px, color-mix(in srgb, var(--accent-brown) 16%, transparent) 0 1px, transparent 1.4px), radial-gradient(circle at 38px 23px, color-mix(in srgb, var(--accent-brown) 12%, transparent) 0 1px, transparent 1.4px), linear-gradient(180deg, var(--control-bg), var(--control-hover-bg));
    color: var(--control-text);
    cursor: pointer;
    font: italic 700 15px/32px Consolas, "Courier New", monospace;
    letter-spacing: 2.5px;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, .8), -1px 0 0 rgba(171, 59, 58, .16);
    user-select: none;
}

#comments .tp-comment-captcha-code:hover {
    background: var(--control-hover-bg);
    color: var(--control-hover-text);
    filter: contrast(1.08) saturate(1.08);
}

#comments .tp-comment-captcha-code img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#comments .send_anniu_style,
#comments .comment-form-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--bg-soft);
    box-shadow: var(--control-shadow);
    color: var(--control-text);
    cursor: pointer;
    font-size: 13px;
    line-height: 34px;
    white-space: nowrap;
    overflow: visible;
    transition: all .2s ease;
}

#comments .comment-form-cancel {
    background: var(--control-bg);
    color: var(--text-secondary);
}

#comments #cancel-comment-reply-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

#comments .send_anniu_style:hover,
#comments .comment-form-cancel:hover {
    border-color: var(--control-hover-border);
    background: var(--control-hover-bg);
    box-shadow: var(--control-hover-shadow);
    color: var(--control-hover-text);
}

:root[data-theme="dark"] #comments .send_anniu_style,
:root[data-theme="dark"] #comments .send_anniu_style:hover {
    color: var(--text-body);
}

#comments .tp-comment-panel {
    margin-top: 26px;
    padding: 18px 22px;
    border: 1px solid var(--line-primary);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 10px 28px rgba(62, 57, 52, .045);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

#comments .tp-comment-head,
#comments .tp-comment-title-wrap,
#comments .tp-comment-meta,
#comments .tp-comment-foot,
#comments .tp-comment-actions,
#comments .tp-comment-from,
#comments .tp-comment-from>span,
#comments .tp-reply-action {
    display: flex;
    align-items: center;
}

#comments .tp-comment-summary {
    margin: 0;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--line-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.8;
}

#comments .tp-comment-head {
    gap: 16px;
}

#comments .tp-comment-title-wrap {
    gap: 10px;
    min-width: 0;
}

#comments .tp-comment-title-mark {
    display: inline-block;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    background-color: var(--accent-brown);
    -webkit-mask: url("../static/images/comment.svg") center / contain no-repeat;
    mask: url("../static/images/comment.svg") center / contain no-repeat;
    opacity: .9;
}

#comments .tp-comment-title-mark::after {
    display: none;
    content: none;
}

#comments .comments-list-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
}

#comments .tp-comment-count {
    color: var(--text-secondary);
    font-size: 13px;
}

#comments .comment-list {
    display: grid;
    gap: 0;
}

#comments .comment-list>.tp-comment-item {
    padding: 13px 0 15px;
    border-bottom: 0;
}

#comments .tp-comment-card {
    position: relative;
}

#comments .tp-comment-main {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 5px;
    align-items: start;
}

#comments .tp-comment-avatar-wrap .avatar,
#comments .avatar {
    display: block;
    width: 30px !important;
    height: 30px !important;
    border: 1px solid var(--line-secondary);
    border-radius: 50%;
    background: var(--bg-soft);
    object-fit: cover;
}

#comments .tp-comment-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "top top" "text text" "foot actions";
    column-gap: 16px;
    min-width: 0;
}

#comments .tp-comment-top {
    grid-area: top;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

#comments .tp-comment-meta {
    flex-wrap: wrap;
    gap: 4px 8px;
    min-height: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 20px;
}

#comments .tp-comment-author,
#comments .tp-comment-author a {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

#comments .tp-comment-author a:hover {
    color: var(--accent-brown);
}

#comments .tp-comment-level,
#comments .commentapprove {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 6px;
    border: 1px solid color-mix(in srgb, var(--ink-decor) 26%, transparent);
    border-radius: 4px;
    background: var(--bg-soft);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 18px;
}

#comments .commentapprove.tp-comment-level {
    border-color: color-mix(in srgb, var(--accent-brown) 18%, transparent);
    background: var(--accent-brown);
    box-shadow: 0 4px 10px rgba(74, 48, 25, .12);
    color: #FFF8EC;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(50, 32, 16, .2);
}

#comments .commentapprove.comment-level {
    border-color: color-mix(in srgb, var(--accent-brown) 16%, transparent);
    background: var(--accent-brown);
    box-shadow: 0 4px 10px rgba(74, 48, 25, .08);
    color: #FFF8EC;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(50, 32, 16, .16);
}

:root[data-theme="dark"] #comments .commentapprove.comment-level,
:root[data-theme="dark"] #comments .commentapprove.tp-comment-level {
    border-color: rgba(143, 217, 139, .55);
    background: #2faa4f;
    color: #fff;
    text-shadow: none;
}

#comments .tp-comment-text {
    grid-area: text;
    margin-top: 4px;
    color: #222;
    font-size: 16px;
    line-height: 1.58;
    word-break: break-word;
}

:root[data-theme="dark"] #comments .tp-comment-text,
:root[data-theme="dark"] #comments .tp-comment-text * {
    color: var(--text-body);
}

#comments .tp-comment-text p {
    margin: 0 0 6px;
}

#comments .tp-comment-text p:last-child {
    margin-bottom: 0;
}

#comments .comment-list-item-relation,
#comments .tp-comment-time,
#comments .tp-comment-from {
    color: #B4ACA4;
}

#comments .tp-comment-foot {
    grid-area: foot;
    gap: 0;
    min-height: 22px;
    margin-top: 6px;
    font-size: 13px;
    line-height: 22px;
}

:root[data-theme="dark"] #comments .tp-comment-foot,
:root[data-theme="dark"] #comments .tp-comment-foot * {
    color: #888a8f !important;
}

#comments .tp-comment-from {
    flex-wrap: wrap;
    gap: 0;
    min-width: 0;
    font-size: 13px;
}

#comments .tp-comment-from:empty {
    display: none;
}

#comments .tp-comment-from>span {
    max-width: 100%;
}

#comments .tp-comment-location,
#comments .tp-comment-location * {
    color: inherit !important;
}

#comments .tp-comment-from>span::before {
    content: "\00b7";
    margin: 0 5px;
}

#comments .tp-comment-from img,
#comments .tp-comment-from svg,
#comments .tp-comment-from .icon,
#comments .tp-comment-from i {
    display: inline-block;
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    margin: 0 3px;
    object-fit: contain;
    vertical-align: -2px;
    opacity: .58;
}

#comments .tp-comment-from svg {
    flex: 0 0 15px;
}

#comments .comment-waiting {
    margin-bottom: 6px;
    color: var(--accent-red);
    font-size: 13px;
}

#comments .tp-comment-actions {
    grid-area: actions;
    justify-content: flex-end;
    gap: 13px;
    min-height: 22px;
    margin-top: 6px;
    white-space: nowrap;
}

#comments .tp-reply-action {
    justify-content: center;
    position: relative;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font: 13px/22px var(--font-main);
    font-weight: 400;
    text-decoration: none;
    text-shadow: none;
    transition: color .2s ease;
}

#comments .tp-reply-action::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-right: 4px;
    background-color: currentColor;
    -webkit-mask: url("../static/images/comment.svg") center / contain no-repeat;
    mask: url("../static/images/comment.svg") center / contain no-repeat;
}

#comments .tp-comment-foot>.tp-reply-action {
    margin-left: 10px;
}

#comments .tp-reply-action span {
    color: inherit;
}

#comments .tp-reply-action:hover {
    color: var(--accent-brown);
    text-decoration: none;
    text-shadow: none;
}

#comments .comment-list>.tp-comment-item>.tp-comment-children {
    margin: 8px 0 0 20px;
    padding: 10px 14px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: transparent;
    overflow: visible;
}

#comments .tp-comment-item .respond,
#comments .tp-comment-item .cat_comment_respond_form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#comments .tp-comment-children .comment-list,
#comments .tp-comment-children .tp-comment-children,
#comments .tp-comment-children .tp-comment-item>.tp-comment-children {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

#comments .tp-comment-children .comment-list {
    margin: 0;
}

#comments .tp-comment-children .tp-comment-item {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

#comments .tp-comment-children .tp-comment-item+.tp-comment-item,
#comments .tp-comment-children .tp-comment-children .tp-comment-item {
    margin-top: 12px;
}

#comments .tp-comment-children .tp-comment-main {
    grid-template-columns: 30px minmax(0, 1fr);
}

#comments .tp-comment-children .avatar {
    width: 24px !important;
    height: 24px !important;
}

#comments .tp-comment-children .tp-comment-author,
#comments .tp-comment-children .tp-comment-author a {
    font-size: 14px;
}

#comments .tp-comment-children .tp-comment-text {
    font-size: 15px;
    line-height: 1.55;
}

#comments .comment-list-empty {
    margin: 0;
    padding: 30px 0 34px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    text-align: center;
}

#comments .comment-list-empty-text {
    display: block;
    margin: 0;
}

#comments .comment-list-empty-image {
    display: none;
}

#comments .comment-pagination {
    margin: 40px 0 0;
}

@media (max-width: 800px) {
    #comments .comment-list>.tp-comment-item>.tp-comment-children {
        margin-left: 0;
    }
    #comments .cat_comment_respond_form .head {
        grid-template-columns: 1fr;
    }
    #comments .tp-comment-head {
        align-items: flex-start;
        flex-direction: column;
    }
    #comments .comment-list-empty {
        margin: 16px 0 30px;
        padding: 12px;
    }
    #comments .comment-list-empty-image {
        width: min(100%, 210px);
        max-height: 116px;
    }
}

@media (max-width: 480px) {
    #comments .comment-list-empty {
        margin: 14px 0 30px;
        padding: 10px;
    }
    #comments .comment-list-empty-image {
        width: min(100%, 178px) !important;
        max-height: 96px !important;
    }
}

#comments .comment-form-btn-wrap {
    position: relative;
    z-index: 60;
    overflow: visible;
}

@media (max-width: 800px) {
    #comments {
        max-width: calc(100% - 32px);
    }
    #comments .comment-list-empty {
        margin: 0;
        padding: 28px 0 32px;
        border: 0;
        background: transparent;
    }
}

@media (max-width: 480px) {
    #comments {
        max-width: calc(100% - 20px);
    }
    #comments .comment-list-empty {
        margin: 0;
        padding: 26px 0 30px;
    }
}


/* easywords comment layout */

body.tp-home-layout #comments {
    max-width: calc(100% - 120px);
    margin: 0 auto;
    padding: 0 0 40px;
}

body.tp-home-layout #comments .tp-comment-summary {
    margin: 0;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.8;
}

body.tp-home-layout #comments .comment-list-empty {
    margin: 0;
    padding: 38px 0 82px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    text-align: center;
}

body.tp-home-layout #comments .respond {
    margin: 0 0 40px;
    padding: 0;
    z-index: 1;
}

body.tp-home-layout #comments .comment-form-title {
    margin: 0 0 18px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

body.tp-home-layout #comments .comment-form-note {
    margin: 0 0 18px;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.8;
}

body.tp-home-layout #comments .comment-form-note span,
body.tp-home-layout #comments .comment-field em {
    color: #ef4444;
    font-style: normal;
}

body.tp-home-layout #comments .cat_comment_respond_form {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.tp-home-layout #comments .cat_comment_respond_form .head {
    display: block;
}

body.tp-home-layout #comments .cat_comment_respond_form .head .list,
body.tp-home-layout #comments .cat_comment_respond_form .body {
    display: block;
    width: 226px;
    margin: 0 0 15px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.tp-home-layout #comments .cat_comment_respond_form .body {
    width: 100%;
    margin-bottom: 18px;
}

body.tp-home-layout #comments .comment-field>span {
    display: block;
    margin: 0 0 7px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

body.tp-home-layout #comments .cat_comment_respond_form input,
body.tp-home-layout #comments .cat_comment_respond_form textarea {
    width: 100%;
    border: 1px solid var(--control-border);
    border-radius: 0;
    background: var(--bg-soft);
    box-shadow: none;
    color: var(--control-text);
    font: 13px/1.6 var(--font-main);
}

body.tp-home-layout #comments .cat_comment_respond_form .head input {
    height: 24px;
    padding: 2px 8px;
}

body.tp-home-layout #comments .cat_comment_respond_form .Comment_Textarea {
    display: block;
    min-height: 112px;
    height: 112px;
    padding: 8px 10px;
    resize: vertical;
}

body.tp-home-layout #comments .cat_comment_respond_form .head .list:focus-within,
body.tp-home-layout #comments .cat_comment_respond_form .body:focus-within,
body.tp-home-layout #comments .tp-comment-captcha:focus-within {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

body.tp-home-layout #comments .cat_comment_respond_form input:focus,
body.tp-home-layout #comments .cat_comment_respond_form textarea:focus {
    border-color: #d1d5db;
}

body.tp-home-layout #comments .comment-form-btn-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 4px;
    position: static;
    z-index: auto;
}

body.tp-home-layout #comments .comment-form-btn-wrap .right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

body.tp-home-layout #comments .send_anniu_style {
    min-width: 80px;
    height: 27px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #22b35b;
    box-shadow: none;
    color: #fff;
    font-size: 13px;
    line-height: 27px;
}

body.tp-home-layout #comments .send_anniu_style:hover {
    background: #16a34a;
    color: #fff;
}

body.tp-home-layout #comments .comment-form-cancel {
    min-width: auto;
    height: 27px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #64748b;
    line-height: 27px;
}

body.tp-home-layout #comments .tp-comment-captcha {
    width: 138px;
    height: 27px;
    border-radius: 0;
    box-shadow: none;
}

body.tp-home-layout #comments .tp-comment-captcha-input {
    height: 25px;
    border: 0;
    font-size: 12px;
    line-height: 25px;
}

@media (max-width: 800px) {
    body.tp-home-layout #comments {
        max-width: calc(100% - 32px);
    }
    body.tp-home-layout #comments .cat_comment_respond_form .head .list {
        width: min(100%, 226px);
    }
}

@media (max-width: 480px) {
    body.tp-home-layout #comments {
        max-width: calc(100% - 20px);
    }
    body.tp-home-layout #comments .cat_comment_respond_form .head .list,
    body.tp-home-layout #comments .cat_comment_respond_form .body {
        width: 100%;
    }
    body.tp-home-layout #comments .comment-list-empty {
        padding: 30px 0 56px;
    }
}
