/* Threaded comments view: input box, comment rows, actions, edit/reply (extracted from inline). */

.v2-comment-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.v2-comment-textarea {
    width: 100%;
    min-height: 60px;
    max-height: 200px;
    resize: vertical;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.5;
    font-family: var(--font-ui);
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.v2-comment-textarea:focus {
    border-color: var(--accent);
}

.v2-comment-btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    align-items: center;
}

.v2-comment-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-right: auto;
}

.v2-comment-cancel-btn {
    padding: 4px 12px;
    font-size: 12px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.v2-comment-cancel-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.v2-comment-submit-btn {
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.v2-comment-submit-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.v2-comment-submit-btn:disabled {
    opacity: 0.6;
}

.v2-comment-action-btn {
    font-size: 11px;
    padding: 1px 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
}

.v2-comment-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.v2-comment-action-btn.danger {
    color: var(--console-error);
}

.v2-comment-action-btn.danger:hover {
    background: var(--bg-tertiary);
    color: #ff7b72;
}

.v2-comment-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

.v2-comment-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Comment rows. margin-left (indent) is set inline from the thread depth. */
.v2-comment {
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 0 4px 4px 0;
    border-left: 2px solid var(--accent);
    background: var(--bg-tertiary);
    transition: background 0.15s;
}

.v2-comment.is-reply {
    border-left-color: var(--border);
    background: transparent;
}

.v2-comment:hover {
    background: var(--bg-tertiary);
}

.v2-comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.v2-comment-reply-icon {
    font-size: 10px;
    color: var(--text-muted);
    display: inline-block;
}

.v2-comment-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid var(--border);
}

.v2-comment-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.v2-comment-author:hover {
    color: var(--accent);
}

.v2-comment-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
}

.v2-comment-body {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word;
}

.v2-comment-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.v2-comment:hover .v2-comment-actions {
    opacity: 1;
}

.v2-comment-reply-input {
    margin-top: 8px;
}

.v2-comment-edit-input {
    margin-top: 4px;
}

.v2-comment-edited {
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
}

/* Empty / placeholder state */
.v2-comment-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.v2-comment-empty-state.with-input {
    height: auto;
    padding: 30px;
}

.v2-comment-empty-state-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.v2-comment-empty-state-text {
    font-size: 13px;
}
