/* @-mentions in consultant internal notes (mentions app).
   Loaded by both internal base templates for the navbar badge; everything else is scoped to the notes list,
   the suggestion dropdown (.mention-picker) or the My mentions page (.mn-page). Dark internal theme via the
   --kb-* tokens from workflow.css, with fallbacks so pages without that stylesheet look the same. */

/* ── Navbar badge ─────────────────────────────────────────────────────────── */

.nav-mentions { display: inline-flex; align-items: center; gap: 6px; }

.nav-mentions__badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #ed4fc7;
    color: #190129;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.nav-mentions__badge[hidden] { display: none; }

/* ── Mentions inside note text ────────────────────────────────────────────── */

.mention { color: #f3a6e0; font-weight: 600; }

.mention--me { color: #ed4fc7; font-weight: 700; }

.workflow-note-new {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #ed4fc7;
    vertical-align: middle;
}

.workflow-note-item--target {
    border-radius: var(--kb-radius-sm, 5px);
    outline: 2px solid #ed4fc7;
    outline-offset: 2px;
    transition: outline-color 1.2s ease;
}

.workflow-note-item--target-fade { outline-color: transparent; }

/* ── Suggestion dropdown (Tribute.js menu; its own stylesheet is not used) ── */

.mention-picker {
    position: absolute;
    z-index: 1060; /* above Bootstrap modals (1050): works inside the kanban notes modal */
    min-width: 240px;
    max-width: 320px;
    margin-top: 4px;
    padding: 4px 0;
    background: var(--kb-surface, #200832);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: var(--kb-radius-sm, 5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    color: var(--kb-text, #ffffff);
}

.mention-picker::before {
    content: "Mention a teammate";
    display: block;
    padding: 5px 12px 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--kb-text-muted, #6b5a7a);
}

.mention-picker ul { margin: 0; padding: 0; list-style: none; }

.mention-picker li {
    display: block;
    padding: 0;
    border-left: 2px solid transparent;
    cursor: pointer;
}

.mention-picker li.highlight {
    background: var(--kb-card-hover, rgba(255, 255, 255, 0.09));
    border-left-color: #ed4fc7;
}

.mention-picker li.no-match { cursor: default; }

.mention-picker__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 10px;
}

.mention-picker__avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--kb-purple, #7c3aed), var(--kb-purple-light, #a78bfa));
}

.mention-picker__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }

.mention-picker__name {
    overflow: hidden;
    font-size: 13px;
    color: var(--kb-text, #ffffff);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-picker__handle { font-size: 12px; color: var(--kb-text-sec, #988ca2); }

.mention-picker__empty { padding: 6px 12px 8px; font-size: 12px; color: var(--kb-text-sec, #988ca2); }

/* ── My mentions page ─────────────────────────────────────────────────────── */

.mn-page .roles-header { align-items: center; }

.mn-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mn-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -1px;
    padding: 8px 14px;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65) !important;
}

.mn-tab:hover { color: #ffffff !important; text-decoration: none; }

.mn-tab--active { border-bottom-color: #ed4fc7; color: #ffffff !important; }

.mn-tab__count {
    padding: 0 7px;
    border-radius: 999px;
    background: #ed4fc7;
    color: #190129;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
}

.mn-tab__count--muted { background: rgba(255, 255, 255, 0.15); color: #ffffff; }

.mn-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.mn-filter { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }

.mn-filter--grow { flex: 1 1 240px; }

.mn-filter > label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--kb-text-sec, #988ca2);
}

.mn-filter--actions { flex-direction: row; gap: 8px; min-width: 0; }

.mn-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 5px 9px;
    font-size: 13px;
    color: var(--kb-text, #ffffff);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--kb-radius-sm, 5px);
    outline: none;
    color-scheme: dark;
}

.mn-input::placeholder { color: var(--kb-text-muted, #6b5a7a); }

.mn-input:focus { border-color: var(--kb-purple-light, #a78bfa); box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.25); }

select.mn-input option { background: #200832; color: #ffffff; }

.mn-range { display: flex; align-items: center; gap: 6px; color: var(--kb-text-sec, #988ca2); }

.mn-range .mn-input { width: 150px; }

.mn-list { margin: 0; padding: 0; list-style: none; }

.mn-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mn-row:last-child { border-bottom: 0; }

.mn-row--unread { background: rgba(237, 79, 199, 0.05); }

.mn-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: transparent;
}

.mn-row--unread .mn-dot { background: #ed4fc7; }

.mn-row__main { flex: 1 1 auto; min-width: 0; }

.mn-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }

.mn-page a.mn-row__candidate { font-size: 15px; font-weight: 700; color: #ffffff; }

.mn-page a.mn-row__candidate:hover { color: #f3a6e0; }

.mn-row__to { font-size: 13px; color: var(--kb-text-sec, #988ca2); }

.mn-source--portal { background: rgba(237, 79, 199, 0.16); color: #f3a6e0; }

.mn-source--breezy { background: rgba(59, 130, 246, 0.16); color: #93c5fd; }

.mn-row__text {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
    word-break: break-word;
}

.mn-row__text--clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.mn-row__text--expanded { display: block; -webkit-line-clamp: unset; }

.mn-more { margin-top: 2px; }

.mn-row__meta { margin-top: 6px; font-size: 12px; color: var(--kb-text-sec, #988ca2); }

.mn-row__side { flex: 0 0 auto; padding-top: 2px; }

.mn-seen { font-size: 12px; font-weight: 600; color: var(--kb-text-sec, #988ca2); }

.mn-seen--yes { color: #6ee7b7; }

.mn-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
