/* ==========================================================================
   @-Mention-System — globale Styles (Token + Vorschlags-Popup).
   Global geladen, weil das Vorschlags-Popup an <body> haengt und das .mention-
   Token in vielen v-html-Kontexten vorkommt. Nur CSS-Variablen (Light + Dark).
   ========================================================================== */

/* --- Mention-Token (im Editor UND in gerenderten Nachrichten) --- */
.mention {
    color: var(--primary-color);
    background: var(--alert-info-bg);
    font-weight: 600;
    border-radius: 4px;
    padding: 0 3px;
    white-space: nowrap;
    text-decoration: none;
}

/* --- Vorschlags-Popup (TipTap-Suggestion, body-mounted) --- */
.mention-suggestions {
    position: fixed;
    z-index: 2000;
    min-width: 220px;
    max-width: 300px;
    max-height: 260px; /* Fallback; wird per JS an den verfuegbaren Platz angepasst */
    overflow-y: auto;
    background: var(--background-color);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 6px 24px var(--black-a18);
    padding: 6px;
}

.mention-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 8px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    color: var(--text-color);
    transition: background 0.12s;
}

.mention-suggestion-item:hover,
.mention-suggestion-item.is-selected {
    background: var(--alert-info-bg);
}

.mention-suggestion-avatar {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--text-on-color);
    font-size: 12px;
    font-weight: 600;
}

.mention-suggestion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mention-suggestion-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
