.ts-comments-section {
    margin-top: 22px;
}

.ts-comment-card {
    border: 1px solid #dfe6f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    margin-bottom: 16px;
    scroll-margin-top: 90px;
}

.ts-comment-card:target {
    border-color: #e60012;
    box-shadow: 0 12px 28px rgba(230, 0, 18, 0.12);
}

.ts-comment-card .card-body {
    padding: 18px 20px;
}

.ts-comment-form-card {
    background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.ts-comment-form-card .card-body {
    padding: 22px 24px 20px;
}

.ts-comment-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.ts-comment-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
    color: #101828;
}

.ts-comment-form-user {
    font-size: 16px;
    font-weight: 700;
    color: #101828;
    line-height: 1.2;
    margin-bottom: 3px;
}

.ts-comment-form-username {
    font-size: 13px;
    color: #667085;
    margin-bottom: 0;
}

.ts-comment-textarea {
    height: 86px !important;
    min-height: 86px !important;
    max-height: 120px !important;
    resize: none !important;
    overflow-y: auto !important;
    border-radius: 14px;
    border: 1px solid #d0d7e2;
    box-shadow: none !important;
    font-size: 14px;
    line-height: 1.45 !important;
    padding: 14px 16px !important;
    color: #101828;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ts-comment-textarea:focus,
.js-comment-edit-textarea:focus {
    border-color: #d71b5b;
    box-shadow: 0 0 0 4px rgba(215, 27, 91, 0.08) !important;
}

.ts-comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.ts-comment-hint {
    font-size: 12px;
    line-height: 1.4;
    color: #667085;
}

.js-comment-edit-textarea {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    resize: none !important;
    overflow-y: auto !important;
    border-radius: 10px;
    border: 1px solid #d7dbe0;
    box-shadow: none !important;
    font-size: 14px;
    line-height: 1.2 !important;
    padding: 8px 12px !important;
}

.ts-comment-submit-btn {
    min-width: 108px;
    height: 42px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    padding: 0 22px;
    background: #d7195f;
    border-color: #d7195f;
    color: #fff;
    box-shadow: 0 12px 22px rgba(215, 25, 95, 0.18);
}

.ts-comment-submit-btn:hover,
.ts-comment-submit-btn:focus {
    background: #bf1654;
    border-color: #bf1654;
    color: #fff;
}

.ts-comment-item-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ts-comment-item-card:hover {
    border-color: #cfd9e8;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.ts-comment-item-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #101828;
    line-height: 1.25;
    margin-bottom: 4px;
}

.ts-comment-item-title small {
    font-size: 13px;
    font-weight: 400;
    color: #8a94a6;
}

.ts-comment-meta {
    font-size: 12px;
    color: #667085;
    margin-bottom: 12px;
    line-height: 1.2;
}

.ts-comment-item-text {
    font-size: 14px;
    line-height: 1.65;
    color: #111827;
    word-break: break-word;
    margin-bottom: 0;
}

.ts-comment-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.ts-comment-toolbar .btn {
    border: 1px solid #e3e8ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #344054;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 11px;
    line-height: 1.2;
}

.ts-comment-toolbar .btn:hover,
.ts-comment-toolbar .btn:focus {
    border-color: #cfd8e6;
    background: #fff;
    color: #101828;
}

.ts-comment-toolbar .js-comment-like-btn.active {
    border-color: #f7b8d1;
    background: #fff1f6;
    color: #c2185b;
}

.ts-comment-toolbar .btn i {
    font-size: 11px;
    margin-right: 4px;
}

.ts-comment-mention {
    color: #6f42c1;
    font-weight: 600;
}

.ts-comment-login-box {
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: #f8f9fc;
    padding: 18px;
    margin-top: 12px;
}

.ts-comment-empty {
    text-align: center;
    padding: 22px 18px;
    color: #6c757d;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: #fff;
    font-size: 14px;
}

.ts-comment-message {
    min-height: 20px;
    margin-top: 8px;
    font-size: 13px;
}

.ts-comment-message.is-error {
    color: #b42318;
}

.ts-comment-message.is-success {
    color: #027a48;
}

.ts-mention-wrapper {
    position: relative;
}

.ts-mention-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.12);
}

.ts-mention-dropdown.show {
    display: block;
}

.ts-mention-item {
    display: block;
    padding: 8px 10px;
    cursor: pointer;
}

.ts-mention-item:hover {
    background: #f8f9fc;
}

.ts-comment-edited-badge {
    margin-left: 6px;
    font-size: 10px;
    vertical-align: middle;
    color: #8a94a6;
}

.ts-comment-hidden-note {
    font-size: 12px;
    color: #856404;
}

.ts-comment-deleted-text {
    color: #6c757d;
    font-style: italic;
}

.js-comment-edit-box {
    margin-top: 10px !important;
}

.js-comment-edit-box .btn {
    border-radius: 999px;
    font-size: 12px;
    padding: 6px 12px;
}

.js-comment-edit-save-btn {
    min-width: 104px;
    height: 38px;
    border-radius: 999px !important;
    border-color: #d7195f !important;
    background: #d7195f !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700;
    padding: 0 18px !important;
    box-shadow: 0 10px 18px rgba(215, 25, 95, 0.16);
}

.js-comment-edit-save-btn:hover,
.js-comment-edit-save-btn:focus {
    border-color: #bf1654 !important;
    background: #bf1654 !important;
    color: #fff !important;
}

.ts-comment-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.js-comment-delete-confirm {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #eceef2;
    border-radius: 10px;
    background: #fafafa;
}

.js-comment-delete-confirm-text {
    font-size: 12px;
    color: #667085;
}

@media (max-width: 767px) {
    .ts-comment-card .card-body {
        padding: 15px;
    }

    .ts-comment-form-card .card-body {
        padding: 18px 16px;
    }

    .ts-comment-title {
        font-size: 19px;
    }

    .ts-comment-form-actions {
        align-items: stretch;
    }

    .ts-comment-submit-btn {
        width: 100%;
    }

    .ts-comment-form-user,
    .ts-comment-item-title {
        font-size: 14px;
    }

    .ts-comment-textarea {
        height: 82px !important;
        min-height: 82px !important;
        max-height: 110px !important;
    }

    .js-comment-edit-textarea {
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
    }
}

.ts-v2-detail-comments {
    margin-top: 28px;
}

.ts-v2-detail-comments .ts-comment-title,
.ts-v2-detail-comments .ts-comment-reply h3 {
    margin: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.ts-v2-detail-comments .ts-comment-list {
    margin-top: 4px;
}

.ts-v2-detail-comments .ts-comment-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 0;
}

.ts-v2-detail-comments .ts-comment-card:target {
    box-shadow: none;
}

.ts-v2-detail-comments .ts-comment-item-card:hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.ts-v2-detail-comments .ts-comment-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
}

.ts-v2-detail-comments .ts-comment-avatar .avatar-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f7e0e3;
    color: #d72542;
    font-size: 18px;
    font-weight: 700;
}

.ts-v2-detail-comments .ts-comment-item-title {
    display: block;
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.ts-v2-detail-comments .ts-comment-item-title small {
    margin-left: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 400;
}

.ts-v2-detail-comments .ts-comment-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 3px;
    margin-bottom: 10px;
}

.ts-v2-detail-comments .ts-comment-meta {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.ts-v2-detail-comments .ts-comment-toolbar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.ts-v2-detail-comments .ts-comment-toolbar .btn {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111827;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
}

.ts-v2-detail-comments .ts-comment-toolbar .btn:hover,
.ts-v2-detail-comments .ts-comment-toolbar .btn:focus,
.ts-v2-detail-comments .ts-comment-toolbar .js-comment-like-btn.active {
    background: transparent;
    color: #d72542;
}

.ts-v2-detail-comments .ts-comment-toolbar .btn i {
    margin-right: 3px;
    font-size: 12px;
}

.ts-v2-detail-comments .ts-comment-item-text {
    margin: 0;
    color: #374151;
    font-size: 15px;
    line-height: 1.7;
}

.ts-v2-detail-comments .ts-comment-empty {
    border-radius: 8px;
    background: transparent;
}

.ts-v2-detail-comments .ts-comment-reply {
    padding-top: 4px;
}

.ts-v2-detail-comments .ts-comment-textarea {
    height: auto !important;
    min-height: 96px !important;
    max-height: 180px !important;
    border-radius: 8px;
    font-size: 15px;
}

.ts-v2-detail-comments .ts-comment-submit-btn {
    min-width: 118px;
    height: 40px;
    border-radius: 4px;
    background: #d72542;
    border-color: #d72542;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
}

.ts-v2-detail-comments .ts-comment-submit-btn:hover,
.ts-v2-detail-comments .ts-comment-submit-btn:focus {
    background: #bd1d36;
    border-color: #bd1d36;
}

.ts-v2-detail-comments .js-comment-edit-box {
    margin-top: 14px !important;
}

.ts-v2-detail-comments .js-comment-edit-textarea {
    min-height: 72px !important;
    max-height: 140px !important;
    height: auto !important;
}

@media (max-width: 575px) {
    .ts-v2-detail-comments .ts-comment-avatar,
    .ts-v2-detail-comments .ts-comment-avatar .avatar-img {
        width: 42px;
        height: 42px;
    }

    .ts-v2-detail-comments .ts-comment-avatar {
        flex-basis: 42px;
    }

    .ts-v2-detail-comments .ts-comment-title,
    .ts-v2-detail-comments .ts-comment-reply h3 {
        font-size: 21px;
    }

    .ts-v2-detail-comments .ts-comment-item-title {
        font-size: 16px;
    }
}
