/* ── Mention Autocomplete Dropdown ─────────────────────────────────── */

.mention-dropdown {
    display: none;
    position: fixed;
    z-index: 99999;
    width: 260px;
    background: var(--modal-bg, #000);
    border: 1px solid var(--border-color, #2f3336);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    padding: 4px 0;
    animation: mentionFadeIn 0.12s ease;
    pointer-events: all;
}

@keyframes mentionFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mention-dropdown--above {
    animation: mentionFadeInUp 0.12s ease;
}

@keyframes mentionFadeInUp {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.12s;
}

.mention-item:hover,
.mention-item-active {
    background: var(--card-hover, rgba(255,255,255,0.08));
}

.mention-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mention-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.mention-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main, #e7e9ea);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mention-username {
    font-size: 13px;
    color: var(--text-muted, #71767b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-badge {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

/* Warna badge via inline style (dari badge_color API) — class di bawah
   tetap dipertahankan sebagai fallback jika ada badge yang dirender secara statis */
.mention-badge-gold  { color: #E2B719; }
.mention-badge-blue  { color: #1D9BF0; }
.mention-badge-green { color: #00BA7C; }
.mention-badge-red   { color: #F4212E; }
.mention-badge-gray  { color: #71767b; }

/* Light mode */
body.light-mode .mention-dropdown {
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

body.light-mode .mention-item:hover,
body.light-mode .mention-item-active {
    background: rgba(0, 0, 0, 0.05);
}

/* ── Mention highlight di rich editor ───────────────────────────────── */

.mention-highlighted {
    color: var(--primary-color, #1d9bf0);
    font-weight: inherit;
    background: transparent;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}

html[data-theme="light"] .mention-highlighted,
body.light-mode .mention-highlighted {
    color: var(--primary-color, #1d9bf0);
}