/* ==========================================================================
   Comments block (BEM block: comments)
   ========================================================================== */

.comments {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 26px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    box-sizing: border-box;
}

.comments__header {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.comments__title {
    margin: 0;
    color: #eef0f8;
    font-size: 17px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
}

.comments__count {
    color: #676d85;
    font-size: 12px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
}

.comments__input {
    align-self: stretch;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #eef0f8;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    box-sizing: border-box;
    outline: none;
}

.comments__input::placeholder {
    color: #676d85;
}

.comments__textarea {
    align-self: stretch;
    width: 100%;
    min-height: 96px;
    resize: vertical;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #eef0f8;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    box-sizing: border-box;
    outline: none;
}

.comments__textarea::placeholder {
    color: #676d85;
}

.comments__submit {
    display: inline-flex;
    align-items: flex-start;
    padding: 11px 22px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(90deg, #8a6bff 0%, #26d7e6 100%);
    width: 100px;
    color: #fff;
    font-size: 14px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.comments__submit:hover {
    opacity: 0.92;
}

.comments__list {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
}

.comments__item {
    align-self: stretch;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    margin-top: 18px;
}

.comments__avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    object-fit: cover;
    display: block;
}

.comments__avatar--initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #8a6bff 0%, #5b7bff 100%);
    overflow: hidden;
}

.comments__avatar-letter {
    color: #fff;
    font-size: 14px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.comments__body {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    overflow: hidden;
}

.comments__name {
    align-self: stretch;
    color: #eef0f8;
    font-size: 13px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.25;
}

.comments__date {
    align-self: stretch;
    color: #676d85;
    font-size: 11px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
}

.comments__text {
    align-self: stretch;
    margin: 0;
    color: #a7acc2;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 20.8px;
}

.comments__empty {
    display: none;
    align-self: stretch;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin: 0;
    color: #676d85;
    font-size: 13px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
}

.comments__list:empty + .comments__empty,
.comments__empty--visible {
    display: block;
    border-top: none;
    padding-top: 0;
}

.comments__reply-to {
    color: #676d85;
    font-weight: 400;
}

.comments__reply-btn {
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #8a6bff;
    font-size: 12px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 500;
    cursor: pointer;
}

.comments__reply-btn:hover {
    color: #26d7e6;
}

.comments__reply-form {
    display: none;
    align-self: stretch;
    width: 100%;
    margin-top: 12px;
    flex-direction: column;
    gap: 10px;
}

.comments__reply-form--open {
    display: flex;
}

.comments__item--reply {
    align-self: stretch;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comments__item--reply > .comments__avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.comments__item--reply > .comments__avatar-letter {
    font-size: 12px;
}

.comments__submit.is-submitting,
.comments__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================================================
   Comments — Mobile (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    .comments {
        padding: 18px;
        border-radius: 24px;
    }
}
