/*!
 * MentionJS v1.0.0 — Default Stylesheet
 * Import this file alongside mention.js
 */

/* ── Dropdown container ─────────────────────────────────────────────────── */
.mention-dropdown {
    position: absolute;
    background: #ffffff;
    border: 2px solid #1976d2;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999;
    min-width: 220px;
    font-family: inherit;

    /* Hidden by default — toggled via .active */
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.mention-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

/* Thin scrollbar */
.mention-dropdown::-webkit-scrollbar { width: 4px; }
.mention-dropdown::-webkit-scrollbar-track { background: transparent; }
.mention-dropdown::-webkit-scrollbar-thumb { background: #c5d0de; border-radius: 4px; }

/* ── Dropdown items ─────────────────────────────────────────────────────── */
.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    transition: background-color 0.1s;
    user-select: none;
}

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

.mention-item:hover,
.mention-item.mention-active {
    background-color: #e3f2fd;
}

.mention-item.mention-no-results {
    cursor: default;
    color: #888;
}

.mention-item.mention-no-results:hover {
    background-color: transparent;
}

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mention-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

/* ── Item text ──────────────────────────────────────────────────────────── */
.mention-info {
    flex: 1;
    min-width: 0;
}

.mention-name {
    font-weight: 500;
    font-size: 14px;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-details {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* ── Loading row ────────────────────────────────────────────────────────── */
.mention-loading .mention-item {
    color: #888;
    font-size: 13px;
    cursor: default;
    justify-content: center;
}

.mention-loading .mention-item:hover {
    background-color: transparent;
}

/* ── Mention spans inside contenteditable ───────────────────────────────── */
.mention {
    color: #1976d2;
    font-weight: 500;
    border-radius: 3px;
    padding: 0 1px;
    cursor: pointer;
    text-decoration: none;
}

.mention.active {
    background-color: #e3f2fd;
    outline: none;
}
