#comment-form {
    display: flex;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: column;
}

#comment-form [type=text], #comment-form [type=email] {
    margin-bottom: 22px;
    background: #f4f4f6;
    height: 50px;
    border-radius: 15px;
    padding: 0 15px;
    font-size: 15px;
}
.reply-form__group [type=text], .reply-form__group [type=email] {
    background: #f4f4f6;
    height: 50px;
    border-radius: 15px;
    padding: 0 15px;
    font-size: 15px;
}

#comment-form [type=submit] {
    width: 100%;
    background: #4f39f6;
    color: white;
    height: 60px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
}
#comment-form [type=submit]:hover {
    background: #000;
}
.reply-btn-group,
.comment-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    width: auto;
    align-self: flex-start;
}
.reply-btn-group {
    margin-top: 2px;
}
.reply-btn-group [type=submit],
.comment-form-actions [type=submit] {
    background: #4f39f6;
    color: white;
    height: 41px;
    width: auto;
    padding: 0 18px;
    font-size: 15px;
    border-radius: 15px;
    cursor: pointer;
}
.reply-btn-group [type=submit]:hover,
.comment-form-actions [type=submit]:hover {
    background: #000000;
}
#comment-form .comment-form-actions [type=submit] {
    width: auto;
    min-width: 0;
}
#comment-form .comment-form-actions .cancel-btn {
    margin-left: 0;
}
#comment-header {
    margin-bottom: 20px;
    font-size: 18px;
}
.reply-form [type=text], .reply-form [type=email] {
    width: 100%;
    margin-bottom: 22px;
}
.reply-form {
    margin-left: 40px;
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    border: 2px dashed #DDD;
    padding: 15px;
    border-radius: 15px;
    position: relative;
    box-sizing: border-box;
}
.emoji-wrapper {
    width: 100%;
    position: relative;
}
#comment-form textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 22px;
    padding-right: 59px;
    display: block;
    overflow: auto;
    resize: vertical;
    max-width: 100%;
    background: #f4f4f6;
    border-radius: 15px;
    padding-left: 8px;
    padding-top: 8px;
    font-size: 16px;
    color: black;
    box-sizing: border-box;

}
.reply-form textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 22px;
    background: #f4f4f6;
    border-radius: 15px;
    padding-left: 8px;
    padding-top: 8px;
    font-size: 16px;
    color: black;
}

.comment-consent {
    width: 100%;
    margin: -4px 0 18px;
}

.comment-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.comment-consent__checkbox {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #4f39f6;
}

.comment-consent__text {
    font-size: 14px;
    line-height: 1.45;
    color: #3f3f46;
}

.comment-consent__text a {
    color: #4f39f6;
    text-decoration: underline;
}

.comment-consent__text a:hover {
    color: #000;
}

.comment-consent__error {
    display: block;
    margin-top: 8px;
    color: red;
    font-size: 12px;
    line-height: 1.35;
}


@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#comments-list .comment {
    padding: 28px 0;
}
.reaction {
    display: flex;
    align-items: center;
    border-radius: 34px;
    padding: 2px 8px;
    cursor: pointer;
    transition: background-color .3s;
    background: #f7f7f7;
}
.reaction:hover {
    background-color: #f0f0f0;
}
.reaction span {
    margin-left: 5px;
    font-size: 16px;
    line-height: 1;
    color: black;
}
.meta small {
    font-size: 12px;
}
.reactions {
    display: flex;
    align-items: center;
}
.reaction-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    gap: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.reaction-popup button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
}
.comment-header img {
    width: 42px;
    height: auto;
}
.comment p {
    margin-bottom: 25px;
    font-size: 16px;
    margin-top: 25px;
}
.comment-header {
    display: flex;
    align-items: flex-start;

}
.comment-header-left {
    margin-right: 9px;
}
.comment-header-right {
    display: flex;
    flex-direction: column;
}
.admin-label {
    font-size: 13px;
    color: #6a37f6;
    border: 1px solid #6a37f6;
    border-radius: 5px;
    padding: 0 3px;
    margin-left: 3px;
}
.comment-header-right strong {
    line-height: 1;
    font-size: 15px;
}
.emoji-button {
    background: none !important;
    padding: 0;
    position: absolute;
    right: 68px;
    bottom: 29px;
    font-size: 20px;
}
.comment-input-group {
    width: 49%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.textarea-group {
    width: 100%;
}
.error-message {
    color: red;
    font-size: 12px;
    margin: 5px 0;
    display: block;
    position: absolute;
    bottom: -3px;
}
.comment-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.reply-btn {
     background: none;
     padding: 0;
     color: black;
     display: flex;
     align-items: center;
     margin-right: 19px;
    font-size: 15px;
    cursor: pointer;
}
.edit-btn {
    background: none;
    padding: 0;
    color: black;
    line-height: 1;
    margin-right: 16px;
    font-size: 15px;
    cursor: pointer;
}
.toggle-replies-btn {
    background: none;
    padding: 0;
    color: #6a37f6 !important;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-right: 19px;
    font-size: 15px;
    cursor: pointer
}
.toggle-replies-btn:hover {
    background: none;
    color: #6a37f6 !important;
    font-weight: bold;
}
.toggle-replies-btn:active, .toggle-replies-btn:focus {
    background: none;
    color: #6a37f6 !important;
}
#comment-form textarea::placeholder {
    color: #000 !important;
}
.reply-btn:active, .reply-btn:focus {
    background: none;
    color: black
}
.cancel-btn {
    background: #DDD;
    color: #000;
    height: 41px;
    padding: 0 20px;
    font-size: 15px;
    border-radius: 15px;
    cursor: pointer;
}
.cancel-btn:hover {
    background: rgb(255, 0, 0);
    color: #FFF
}
.reply-btn:hover {
    background: none;
    color: #6a37f6
}
.edit-btn:hover {
    background: none;
    color: #6a37f6
}
.remove-btn:hover {
    background: none;
    color: #6a37f6
}

.reply-btn svg {
    margin-left: 3px;
    width: 11px;
}
.remove-btn {
    background: none;
    padding: 0;
    color: black;
    line-height: 1;
    margin-right: 10px;
    font-size: 15px;
    cursor: pointer;
}
.replies .replies {
    margin-left: 0 !important;
}
.image-btn {
    background: none !important;
    padding: 0;
    position: absolute;
    right: 41px;
    bottom: 29px;
    font-size: 20px;
}
.hidden {
    display: none;
}

.readonly-name {
    font-weight: bold;
    color: #007bff; /* Цвет имени */
    pointer-events: none; /* Запретить взаимодействие */
    user-select: none; /* Запретить выделение текста */
}
.bottom-btn-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.comment.is-editing-target {
    display: none;
}
.comment-edit-form {
    width: 100%;
    margin-bottom: 15px;
    margin-top: 0;
    background: #fff;
    border: 1px solid #e8ebf3;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    padding: 18px;
}
.comment-form-mode {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6a37f6;
}
.main-form-cancel-btn {
    margin-left: 0;
}
.existing-images-editor {
    margin-top: 12px;
    margin-bottom: 16px;
}
.existing-images-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}
.existing-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.existing-image-item {
    position: relative;
    width: 90px;
    height: 90px;
}
.existing-image-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
}
.existing-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.comment-reaction-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
}
.comment-reaction-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 15px;
}
.comment-images img {
    border-radius: 15px;
}
.highlight {
    background-color: #f0f8ff;
    transition: background-color 0.3s ease;
}
.emoji-button svg {
    pointer-events: none;
    stroke:black
}
#image-upload-container-reply {
    width: 100%;
}
.comment-link {
    font-size: 15px;
    margin-left: 0;
}
.card-wrapper {
    display: flex;
    gap: 20px;
    flex-direction: column;
}
.comment-link-text {
    color: #6a37f6;
    
}
.comment-link-text:hover {
    color: #000;
    
}
.code-btn {
    background: none !important;
    padding: 0;
    position: absolute;
    right: 15px;
    bottom: 29px;
    font-size: 20px;
}
.image-btn svg {
    stroke: black
}
.code-btn svg {
    stroke: black
}
.code-btn:hover svg, 
.emoji-button:hover svg, 
.image-btn:hover svg {
    stroke: #6a37f6; /* Цвет при наведении */
}
.comment pre {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 10px;
    border-radius: 15px;
    overflow-x: auto;
    font-family: Consolas, Monaco, monospace;
    max-height: 425px;
    text-shadow: none !important;
    margin: 15px 0 !important;
}

code {
    font-family: inherit;
    background: none;
    color: inherit;
    padding: 0;
    text-shadow: none !important;
}

p pre {
    margin: 0;
}

p code {
    white-space: pre-wrap;
}
.comment table {
    border: 0;
    margin-top: 0 !important;
}
.comment table td {
    border: 0;
}
/* 🔥 Выделение комментария */
.highlighted {
    background-color: #fffcba;
    transition: background-color 2s ease-in-out;
}

/* 📉 Плавное исчезновение */
.fade-out {
    background-color: transparent !important;
}


.filter-buttons {
    padding-top: 40px;
    padding-bottom: 15px;
    display: flex;
}
.filter-buttons button {
    background: none !important;
    color: black;
    padding: 0;
    margin-right: 15px;
    display: flex;
    align-items: center;
    font-size: 12px;
}
.filter-buttons button:hover {
    color: #6a37f6;
}
.filter-buttons button:hover svg {
    stroke: #6a37f6;
}
.filter-buttons svg {
   margin-right: 5px;
}
.filter-btn.active-filter {
    background-color: none;
    color: #6a37f6;
    transition: 0.3s;
    font-weight: bold;
}

.reply-form__wrapper {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    flex-wrap: wrap;
}
.comment-wrapper {
    width: 100%;
    position: relative;
}
.reply-form-wrapper {
    width: 100%;
    margin: 10px 0;
}
.branch-line {
    position: absolute;
    top: 0;
    left: -17px;
    width: 1px;
    height: 100%;
    background-color: #ccc;
    content: "";
}
.comment-branch__arc {
    width: 16px;
    height: 46px;
    border: solid #ccc;
    border-width: 0 0 1px 1px;
    border-bottom-left-radius: 8px;
    position: absolute;
    left: -17px;
    top: 0px;
    pointer-events: none;
  }
  
#comments-list {
    opacity: 1;
    transition: opacity 0.3s ease;
  }
.comment:last-child .branch-line {
    height: 50%;
}

.comment-wrapper {
    position: relative;
}

.comment-placeholder {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #eee;
    min-height: 80px;
}

.placeholder-avatar {
    width: 40px;
    height: 40px;
    background: #ddd;
    border-radius: 50%;
    margin-right: 10px;
}

.placeholder-content {
    flex: 1;
}

.placeholder-line {
    height: 10px;
    background: #eee;
    margin-bottom: 5px;
    border-radius: 2px;
}

.placeholder-line:last-child {
    width: 60%;
}
.reply-form__group {
    width: 49%;
    position: relative;
}
.icon {
    width: 20px;
    height: 20px;
    stroke: black;
    fill: none;
}
.filter-btn.active-filter svg {
    stroke: #6a37f6
}
.user-label {
    font-size: 13px;
    color: #363636;
    border: 1px solid #363636;
    border-radius: 5px;
    padding: 0 3px;
    margin-left: 3px;
}
.comment-counter svg {
    pointer-events: none;
}
.comment {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .comment.comment-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .popular-comments-widget {
    margin-bottom: 28px;
      background: #FFF;
      padding: 15px;
      border-radius: 15px;
}
.sidebar #popular-comments-sidebar .popular-comments-title, .box.popular-comments .popular-comments-title {
    margin-bottom: 18px;
    color: black;
    font-weight: bold;
    font-size: 17px;
}
.sidebar #popular-comments-sidebar .popular-comments-list, .box.popular-comments .popular-comments-list {
    gap: 14px;
}
.popular-comments-list {
    display: flex;
    flex-direction: column;

}
.popular-comment-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: start;
}
.popular-comment-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.sidebar #popular-comments-sidebar .popular-comment-avatar, .box.popular-comments .popular-comment-avatar {
    width: 37px;
    height: 37px;
    max-width: none;
}
.sidebar #popular-comments-sidebar .popular-comment-head, .box.popular-comments .popular-comment-head {
    margin-bottom: 8px;
}
.popular-comment-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.sidebar #popular-comments-sidebar .popular-comment-name, .box.popular-comments .popular-comment-name {
    font-size: 13px;
}
.popular-comment-name {
    font-size: 23px;
    line-height: 1.1;
    font-weight: 700;
    color: #383838;
}
.sidebar #popular-comments-sidebar .popular-comment-in-post, .box.popular-comments .popular-comment-in-post {
    font-size: 13px;
}
.popular-comment-in-post {
    font-size: 18px;
    line-height: 1.1;
    color: rgb(93 93 93 / 66%);
}
.sidebar #popular-comments-sidebar .popular-comment-post, .box.popular-comments .popular-comment-post {
    font-size: 14px;
    color: #222222;
}
.popular-comment-post {
    font-size: 19px;
    line-height: 1.25;
    color: #151515;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar #popular-comments-sidebar .popular-comment-text, .box.popular-comments .popular-comment-text {
    font-size: 1.34rem;
    color: black;
    margin-bottom: 10px;
    display: block;
}
.popular-comment-text {
    font-size: 19px;
    line-height: 1.42;
    color: #ffffff;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
}
.popular-comment-reactions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sidebar #popular-comments-sidebar .popular-comment-emojis, .box.popular-comments .popular-comment-emojis {
    font-size: 1rem;
    gap: 4px;
}
.popular-comment-emojis {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 26px;
    line-height: 1;
}
.popular-comment-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 1;
}
.popular-comment-emoji img {
    display: block;
    width: 18px;
    height: 18px;
}
.sidebar #popular-comments-sidebar .popular-comment-reactions-total, .box.popular-comments .popular-comment-reactions-total {
    font-size: 1.18rem;
}
.popular-comment-reactions-total {
    font-size: 18px;
    line-height: 1.2;
    color: #222222;
}
.popular-comment-flags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.popular-comment-flag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgb(0 0 0 / 82%);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}
@media (max-width: 767px) {
    #comment-form [type=submit] {
         height: 51px;
    }
}
