/* ── Wrapper ──────────────────────────────────────────── */
.top-comments-wrap {
    margin: 16px 0;
    font-family: inherit;
    max-width: 100%;
    overflow: hidden;
}

/* ── Title ────────────────────────────────────────────── */
.top-comments-title {
    font-size: 1em; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; margin: 0 0 8px; color: #333;
    border-bottom: 1px solid #ddd; padding-bottom: 6px;
}
.top-comments-count { font-weight: 400; color: #999; font-size: .85em; }

/* ── Leave a comment link (top) ───────────────────────── */
.top-comments-link {
    display: inline-block; margin-bottom: 14px;
    font-size: .82em; color: #666; text-decoration: none;
    border: 1px solid #ccc; border-radius: 20px;
    padding: 4px 12px;
    transition: background .15s;
}
.top-comments-link:hover { background: #f4f4f4; color: #333; }

/* ── Comment list ─────────────────────────────────────── */
.top-comments-list { list-style: none; margin: 0; padding: 0; }

.top-comment-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.top-comment-item:last-child { border-bottom: none; }

/* ── Meta row ─────────────────────────────────────────── */
.top-comment-meta {
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 4px; flex-wrap: wrap;
}
.top-comment-meta img { border-radius: 50%; width: 26px; height: 26px; flex-shrink: 0; }
.top-comment-meta strong { font-size: .82em; color: #444; }
.top-comment-date { font-size: .74em; color: #bbb; }

/* Delete button */
.tc-delete {
    margin-left: auto; background: none; border: none;
    cursor: pointer; font-size: .85em; color: #ccc;
    padding: 0 2px; line-height: 1;
}
.tc-delete:hover { color: #c00; }

/* ── Comment text — fix overflow ──────────────────────── */
.top-comment-text {
    font-size: .83em; color: #555; line-height: 1.55;
    padding-left: 33px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
}

/* ── Thumbs voting ────────────────────────────────────── */
.tc-votes {
    display: flex; gap: 10px; padding-left: 33px;
    margin-top: 5px;
}
.tc-vote-btn {
    background: none; border: none; cursor: pointer;
    font-size: .8em; color: #aaa; padding: 2px 6px;
    border-radius: 12px; transition: background .15s, color .15s;
    display: flex; align-items: center; gap: 3px;
}
.tc-vote-btn:hover { background: #f0f0f0; color: #555; }
.tc-vote-btn.tc-voted { color: #333; font-weight: 600; background: #f0f0f0; }
.tc-up.tc-voted  { color: #1a7f1a; }
.tc-down.tc-voted { color: #b00; }

/* ── Empty state ──────────────────────────────────────── */
.top-comments-empty { font-size: .83em; color: #bbb; font-style: italic; margin: 6px 0 12px; }

/* ── New comment highlight ────────────────────────────── */
.top-comment-new { background: #f6fff6; }

/* ── Modal overlay ────────────────────────────────────── */
.tc-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.tc-modal {
    background: #fff; border-radius: 6px;
    padding: 26px 30px; width: 100%; max-width: 400px;
    position: relative; box-shadow: 0 8px 32px rgba(0,0,0,.2);
    box-sizing: border-box;
}
.tc-modal h3 { margin: 0 0 14px; font-size: 1.05em; color: #333; }
.tc-modal-close {
    position: absolute; top: 10px; right: 14px;
    background: none; border: none; font-size: 1.3em;
    cursor: pointer; color: #aaa;
}
.tc-modal-close:hover { color: #333; }

/* ── Form ─────────────────────────────────────────────── */
.tc-form label { display: block; font-size: .84em; color: #555; margin-bottom: 11px; }
.tc-form input,
.tc-form textarea {
    display: block; width: 100%; margin-top: 3px;
    padding: 7px 10px; border: 1px solid #ddd; border-radius: 4px;
    font-size: .88em; box-sizing: border-box; font-family: inherit;
}
.tc-form textarea { resize: vertical; }
.tc-form input:focus,
.tc-form textarea:focus { outline: none; border-color: #888; }
.tc-req { color: #c00; }
.tc-submit {
    margin-top: 4px; padding: 8px 20px;
    background: #333; color: #fff; border: none;
    border-radius: 4px; cursor: pointer; font-size: .88em;
}
.tc-submit:hover { background: #555; }
.tc-submit:disabled { opacity: .6; cursor: default; }

/* ── Messages ─────────────────────────────────────────── */
.tc-msg { font-size: .83em; margin-bottom: 8px; min-height: 1.2em; }
.tc-msg-ok  { color: #2a7a2a; }
.tc-msg-err { color: #c00; }
