/* ===== КОММЕНТАРИИ К ЗАПИСИ ===== 
site/comments.css */

.qm-comments { margin-top: 44px; scroll-margin-top: 90px; }

.qm-comments-title {
    font-family: var(--font-head);
    font-size: 22px; font-weight: 700; color: var(--ink);
    margin: 0 0 20px;
    padding-left: 14px;
    position: relative;
}
.qm-comments-title::before {
    content: ''; position: absolute;
    left: 0; top: 3px; bottom: 3px;
    width: 4px; border-radius: 3px;
    background: var(--red);
}
.qm-comments-title span { color: var(--secondary); font-weight: 600; font-size: 18px; }

/* ── Гость ── */
.qm-cm-guest {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    background: #faf8f5;
    border: 1px solid var(--border, #e5e0da);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 26px;
    font-family: var(--font-head); font-size: 14px; color: var(--ink);
}
.qm-cm-guest-btn {
    background: var(--red); color: #fff;
    font-family: var(--font-head); font-size: 14px; font-weight: 700;
    border-radius: 8px; padding: 9px 22px;
    text-decoration: none;
    transition: background .15s;
}
.qm-cm-guest-btn:hover { background: #a81513; }

/* ── Форма ── */
.qm-cm-form { display: flex; gap: 12px; margin-bottom: 28px; }
.qm-cm-form-body { flex: 1; }
.qm-cm-ava {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0; background: #f5f2ee;
}
.qm-cm-replying {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--secondary);
    margin-bottom: 6px;
}
.qm-cm-replying b { color: var(--ink); }
.qm-cm-replying button {
    border: none; background: none; cursor: pointer;
    color: var(--secondary); font-size: 16px; line-height: 1; padding: 0 4px;
}
.qm-cm-textarea {
    width: 100%; min-height: 76px;
    border: 1px solid var(--border, #e5e0da);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: var(--font-body); font-size: 15px; color: var(--ink);
    resize: vertical;
}
.qm-cm-textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196,26,24,.07); }
.qm-cm-form-foot {
    display: flex; align-items: center; justify-content: flex-end; gap: 14px;
    margin-top: 8px;
}
.qm-cm-ban-msg { font-size: 13px; color: #b91c1c; }
.qm-cm-submit {
    border: none; background: var(--red); color: #fff;
    font-family: var(--font-head); font-size: 14px; font-weight: 700;
    border-radius: 8px; padding: 10px 26px; cursor: pointer;
    transition: background .15s, opacity .15s;
}
.qm-cm-submit:hover:not(:disabled) { background: #a81513; }
.qm-cm-submit:disabled { opacity: .5; cursor: default; }

/* ── Список ── */
.qm-cm-loading, .qm-cm-empty { color: var(--secondary); font-size: 14px; padding: 18px 0; }

.qm-cm-thread { border-bottom: 1px solid var(--warm-2, #f0ece6); padding: 16px 0 14px; }
.qm-cm-thread:last-child { border-bottom: none; }

.qm-cm-item { display: flex; gap: 12px; }
.qm-cm-body { flex: 1; min-width: 0; }
.qm-cm-head { display: flex; align-items: baseline; gap: 10px; }
.qm-cm-name { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--ink); }
.qm-cm-time { font-size: 12px; color: var(--secondary); }
.qm-cm-text {
    font-family: var(--font-body); font-size: 15px; line-height: 1.55;
    color: var(--ink); margin-top: 4px;
    overflow-wrap: break-word; word-break: break-word;
}
.qm-cm-at { color: var(--red); font-weight: 600; }

.qm-cm-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.qm-cm-react {
    display: inline-flex; align-items: center; gap: 5px;
    border: none; background: none; cursor: pointer;
    font-size: 13px; color: var(--secondary);
    padding: 0;
    transition: color .15s;
}
.qm-cm-react:hover { color: var(--ink); }
.qm-cm-react.active { color: var(--red); }
.qm-cm-react.active svg { fill: currentColor; }
.qm-cm-react.qm-cm-dis.active { color: #6b7280; }
.qm-cm-action {
    border: none; background: none; cursor: pointer;
    font-family: var(--font-head); font-size: 13px; font-weight: 600;
    color: var(--secondary); padding: 0;
    transition: color .15s;
}
.qm-cm-action:hover { color: var(--ink); }
.qm-cm-action.qm-cm-del { color: #b91c1c; }
.qm-cm-action.qm-cm-del:hover { color: #a81513; }

/* ── Ответы (инстаграм-стиль) ── */
.qm-cm-replies { margin-left: 50px; }
.qm-cm-reply { margin-top: 14px; }
.qm-cm-reply .qm-cm-ava { width: 30px; height: 30px; }

.qm-cm-more-replies {
    margin: 12px 0 0 50px;
    border: none; background: none; cursor: pointer;
    font-family: var(--font-head); font-size: 13px; font-weight: 600;
    color: var(--secondary); padding: 0;
}
.qm-cm-more-replies:hover { color: var(--ink); }
.qm-cm-more-replies::before { content: '── '; color: var(--border); }

/* ── Показать ещё (корневые) ── */
.qm-cm-more-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 20px 0 8px;
}
.qm-cm-shown { font-size: 13px; color: var(--secondary); }
.qm-cm-more {
    border: 1px solid var(--border, #e5e0da);
    background: #fff;
    font-family: var(--font-head); font-size: 14px; font-weight: 600;
    color: var(--ink);
    border-radius: 22px; padding: 10px 28px; cursor: pointer;
    transition: background .15s, border-color .15s;
}
.qm-cm-more:hover { background: #faf8f5; border-color: var(--secondary); }

@media (max-width: 560px) {
    .qm-cm-replies { margin-left: 36px; }
    .qm-cm-more-replies { margin-left: 36px; }
}