/* ── Bexgram 5-Item Vertical Mentions (@Ali) Autocomplete ── */
#bex-mention-dropdown {
    position: fixed;
    z-index: 100080;
    width: 290px;
    max-width: calc(100vw - 24px);
    background: var(--wa-surface, rgba(255, 255, 255, 0.98));
    border: 1px solid var(--wa-line, rgba(0, 0, 0, 0.12));
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: bexMentionFadeIn 0.14s ease-out;
}

html.dark #bex-mention-dropdown,
body.dark #bex-mention-dropdown,
[data-theme="dark"] #bex-mention-dropdown {
    background: var(--wa-surface, rgba(17, 27, 33, 0.96));
    border-color: var(--wa-line, rgba(255, 255, 255, 0.12));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

@keyframes bexMentionFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bex-mention-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wa-muted, #8696a0);
    border-bottom: 1px solid var(--wa-line, rgba(0, 0, 0, 0.06));
}

html.dark .bex-mention-head {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.bex-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.12s ease;
    user-select: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

html.dark .bex-mention-item {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

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

.bex-mention-item:hover,
.bex-mention-item.is-selected {
    background: var(--wa-hover, rgba(0, 168, 132, 0.12));
}

html.dark .bex-mention-item:hover,
html.dark .bex-mention-item.is-selected {
    background: rgba(0, 168, 132, 0.18);
}

.bex-mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--wa-line, rgba(0, 0, 0, 0.08));
    background: #182229;
}

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

.bex-mention-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bex-mention-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--wa-text, #111b21);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .bex-mention-name {
    color: #e9edef;
}

.bex-mention-user {
    font-size: 11px;
    color: var(--wa-muted, #667781);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark .bex-mention-user {
    color: #8696a0;
}

.bex-mention-tag-follow {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    flex-shrink: 0;
}
