/* ============================================================================
   [MENTIONS] قائمة @ وتلوين المنشن داخل الرسائل
   ============================================================================ */

#mtn-pop.mtn-pop {
    position: fixed;
    z-index: 2147482500;
    display: none;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px;
    direction: rtl;
    text-align: right;
    background: #ffffff;
    border: 1px solid #d3d6dc;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    font-family: var(--font-main);
}

#mtn-pop.mtn-pop.on {
    display: block;
}

#mtn-pop .mtn-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 13px !important;
    line-height: 1.2;
    text-align: right;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#mtn-pop .mtn-item:hover,
#mtn-pop .mtn-item.on {
    background: #eef4ff;
}

#mtn-pop .mtn-av {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    background-color: #e5e7eb;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#mtn-pop .mtn-txt {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

#mtn-pop .mtn-name {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13.5px !important;
    font-weight: 700;
    color: #1f2937;
}

#mtn-pop .mtn-user {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: right;
    font-size: 10.5px !important;
    color: #6b7280;
}

#mtn-pop .mtn-empty {
    padding: 10px 12px;
    color: #6b7280;
    font-size: 12.5px !important;
    text-align: center;
}

/* ---------- تلوين @الاسم داخل الرسائل ---------- */
.msg-mention {
    display: inline-block;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(37, 99, 235, .16);
    color: #1d4ed8;
    font-weight: 700;
    line-height: 1.35;
    unicode-bidi: isolate;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.msg-mention:hover {
    background: rgba(37, 99, 235, .24);
}

/* الشريط/الثيم الجديد */
body.nb .msg-mention {
    background: rgba(217, 194, 90, .18);
    color: #ffdf73;
}

body.nb .msg-mention:hover {
    background: rgba(217, 194, 90, .28);
}

/* Uireta */
html body.uireta-on:not(#uq) .msg-mention {
    background: rgba(11, 70, 44, .10);
    color: #0b6b45;
}

html body.uireta-on:not(#uq) .msg-mention:hover {
    background: rgba(11, 70, 44, .18);
}

/* القائمة في الوضع الداكن (nb) */
body.nb #mtn-pop.mtn-pop {
    background: #1b2430;
    border-color: #3b4856;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

body.nb #mtn-pop .mtn-item {
    color: #e5e7eb;
}

body.nb #mtn-pop .mtn-item:hover,
body.nb #mtn-pop .mtn-item.on {
    background: #27323f;
}

body.nb #mtn-pop .mtn-name {
    color: #f3f4f6;
}

body.nb #mtn-pop .mtn-user {
    color: #9ca3af;
}

body.nb #mtn-pop .mtn-av {
    background-color: #374151;
}
