.comments {
    color: #16202e;
    font-size: 13px;
    line-height: 1.6;
}

.comments__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.comments__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.comments__count {
    color: #8b95a6;
    font-size: 12px;
}

.comments__login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px dashed #d3d9e5;
    border-radius: 10px;
    background: #f8faff;
    color: #5b6779;
}

.comments__login p {
    margin: 0;
}

.comments__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid #e3e7ef;
    border-radius: 10px;
    background: #fbfcff;
}

.comments__identity {
    margin: 0;
    color: #5b6779;
    font-size: 12px;
}

.comments__identity strong {
    color: #16202e;
}

.comments__textarea {
    width: 100%;
    min-height: 82px;
    padding: 10px 12px;
    border: 1px solid #d3d9e5;
    border-radius: 8px;
    background: #fff;
    color: #16202e;
    font: inherit;
    line-height: 1.65;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.comments__textarea:focus,
.comments__captcha input:focus {
    border-color: #3568f0;
    box-shadow: 0 0 0 3px rgba(53, 104, 240, .13);
}

.comments__form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.comments__captcha {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comments__captcha input {
    width: 108px;
    padding: 8px 10px;
    border: 1px solid #d3d9e5;
    border-radius: 7px;
    background: #fff;
    color: #16202e;
    font: inherit;
    outline: none;
    box-sizing: border-box;
}

.comments__captcha img {
    width: 120px;
    height: 40px;
    border: 1px solid #d3d9e5;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    object-fit: cover;
}

.comments__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid #3568f0;
    border-radius: 8px;
    background: #3568f0;
    color: #fff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.comments__button:hover {
    background: #2f5ee0;
    border-color: #2f5ee0;
}

.comments__button:disabled {
    opacity: .55;
    cursor: default;
}

.comments__button--ghost {
    border-color: #d3d9e5;
    background: #fff;
    color: #5b6779;
}

.comments__button--ghost:hover {
    border-color: #3568f0;
    background: #f8faff;
    color: #3568f0;
}

.comments__captcha-btn {
    padding: 6px 8px;
    border: 0;
    background: transparent;
    color: #3568f0;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.comments__captcha-btn:hover {
    text-decoration: underline;
}

.comments__status {
    display: none;
    margin: 0;
    color: #b42318;
    font-size: 12px;
}

.comments__status.is-visible {
    display: block;
}

.comments__status.is-success {
    color: #12805c;
}

.comments__list {
    display: flex;
    flex-direction: column;
}

.comment {
    padding: 15px 0;
    border-top: 1px solid #edf0f5;
}

.comment:first-child {
    border-top: 0;
}

.comment__head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.comment__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #4c7cf5, #2f5ee0);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.comment__name {
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #16202e;
    font-size: 12.5px;
    font-weight: 700;
}

.comment__time {
    color: #9aa3b2;
    font-size: 11px;
}

.comment__edited {
    color: #9aa3b2;
    font-size: 10.5px;
}

.comment__body {
    margin: 7px 0 0 38px;
    color: #3c4758;
    font-size: 13px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 0 38px;
}

.comment__action {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8b95a6;
    font: inherit;
    font-size: 11.5px;
    cursor: pointer;
}

.comment__action:hover {
    color: #3568f0;
}

.comment__action.is-danger:hover {
    color: #b42318;
}

.comment__edit {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 0 38px;
}

.comment__edit textarea {
    width: 100%;
    min-height: 76px;
    padding: 9px 11px;
    border: 1px solid #d3d9e5;
    border-radius: 8px;
    background: #fff;
    color: #16202e;
    font: inherit;
    line-height: 1.65;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.comment__edit textarea:focus {
    border-color: #3568f0;
    box-shadow: 0 0 0 3px rgba(53, 104, 240, .13);
}

.comment__edit-actions {
    display: flex;
    gap: 8px;
}

.comments__empty,
.comments__loading {
    padding: 22px 0;
    color: #8b95a6;
    font-size: 12.5px;
    text-align: center;
}

.comments--compact .comments__title {
    font-size: 16px;
}

.comments--compact .comments__form,
.comments--compact .comments__login {
    padding: 12px;
}

.comments--compact .comment__body {
    margin-left: 0;
}

.comments--compact .comment__actions,
.comments--compact .comment__edit {
    margin-left: 0;
}

@media (max-width: 640px) {
    .comments__form-row {
        align-items: stretch;
    }

    .comments__captcha {
        width: 100%;
    }

    .comments__captcha input {
        flex: 1;
        min-width: 90px;
    }

    .comments__form-row > .comments__button {
        width: 100%;
    }

    .comment__body,
    .comment__actions,
    .comment__edit {
        margin-left: 0;
    }
}
