/* cv-mention.css — the @-picker that /js/cv-mention.js paints, shared by every composer.
   Colours come from the page's own theme tokens, never from a hardcoded hex, so the list looks
   at home under a smart note and under the timeline chat bar in both themes. */

/* The list hangs above the box you are typing in, so it never covers the text. The anchor
   (.popup-comment-input-wrap, #jchatBar, #mobJchatBar) is what it measures itself against. */
.cv-mention-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-panel, #1a2030);
    border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
    border-radius: 10px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 20;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.cv-mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .1s;
}

.cv-mention-item:hover {
    background: var(--bg-item-hover, rgba(255, 255, 255, 0.07));
}

/* The row the arrows walked to. Louder than a hover on purpose: with ten names in the box you
   have to be able to see from across the screen which one Enter is about to take. */
.cv-mention-item.is-active {
    background: color-mix(in srgb, var(--accent, #6c8cf4) 22%, transparent);
    box-shadow: inset 0 0 0 1px var(--accent, #6c8cf4);
}

@supports not (background: color-mix(in srgb, red 20%, transparent)) {

    .cv-mention-item.is-active {
        background: var(--bg-item-hover, rgba(255, 255, 255, 0.07));
    }

}

.cv-mention-item__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent, #6c8cf4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}

.cv-mention-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cv-mention-item__name {
    font-size: 13px;
    color: var(--text-primary, #f0f0f0);
}

.cv-mention-loading {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-muted);
    opacity: .7;
}

/* The anchor is never given its position here: .jchat-bar is already relative and
   .mob-jchat-bar is already fixed in dashboard.css, and re-stating it in a shared file would
   fight that rule depending on which stylesheet the page loads last. */
