/* =====================================================
   CLAUX - MENTIONS
   ===================================================== */

/* ── Comment input area ───────────────────────────── */
.comment-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-mention-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0 2px;
}

.comment-mention-hint kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.comment-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.comment-input-container {
    flex: 1;
    position: relative;
    min-width: 0;
}

.comment-textarea {
    resize: none;
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.5;
}

.comment-submit-btn {
    height: 38px;
    width: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
}

/* ── Mention dropdown ─────────────────────────────── */
.mention-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    z-index: 500;
    overflow: hidden;
    max-height: 260px;
    overflow-y: auto;
}

.mention-loading,
.mention-empty {
    padding: 12px 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.mention-item:last-child {
    border-bottom: none;
}

.mention-item--active,
.mention-item:hover {
    background: var(--accent-dim);
}

.mention-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.mention-item-body {
    flex: 1;
    min-width: 0;
}

.mention-item-name {
    font-size: 0.8375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-item-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-item-type {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 1px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* ── Rendered mention chips in comment text ───────── */
.mention-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s, box-shadow 0.15s;
    position: relative;
}

.mention-tag:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 0 2px currentColor;
    text-decoration: none;
}

.mention-tag i {
    font-size: 0.75em;
}

.mention-id {
    font-size: 0.65em;
    font-weight: 400;
    opacity: 0.55;
    margin-left: 2px;
    font-family: monospace;
}

.mention-tag--user {
    background: rgba(37,99,235,0.15);
    color: #60a5fa;
    border: 1px solid rgba(37,99,235,0.25);
}

.mention-tag--contract {
    background: rgba(124,58,237,0.15);
    color: #a78bfa;
    border: 1px solid rgba(124,58,237,0.25);
    cursor: pointer;
}
