/* ============================================================================
   v0.29.1.0 - УПОМИНАНИЕ ДРУГА. "@" in the compose bar opens a list of friends
   (wwwroot/js/compose-mentions.js builds it; /studio copies the markup).

   It sits inside .compose-slot, above the field: the script sets "bottom" to the compose group's
   current height, because the group grows upward over the board with long text. Absolutely
   positioned and capped, so the page never changes height (Home fits one screen), and nothing
   reaches past its own border. Token-driven, logical properties only; before the RTL layer and
   the dark theme like every component sheet.
   ============================================================================ */
.mention-pop {
    position: absolute;
    inset-inline-start: 0;
    z-index: 22;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: min(300px, 100%);
    max-height: 292px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    background: var(--chronos-card-bg);
    border: 1px solid var(--chronos-outline);
    border-radius: var(--radius-card);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.16), 0 3px 10px rgba(17, 24, 39, 0.10);
    animation: mention-pop-in 0.12s ease-out;
}
.mention-pop[hidden] { display: none; }

@keyframes mention-pop-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .mention-pop { animation: none; }
}

/* /studio draws it in flow. */
.mention-pop.is-static {
    position: static;
    animation: none;
}

/* While the list is open the capability chips stay away: one popover above the bar at a time. */
.compose-slot.is-mentioning > .compose-hints { display: none; }

.mention-title {
    padding: 2px 8px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--chronos-fg-muted);
}

.mention-empty {
    padding: 6px 8px 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--chronos-fg-muted);
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.mention-item:hover,
.mention-item.is-active {
    background: color-mix(in srgb, var(--chronos-violet) 12%, transparent);
}

.mention-ava {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--chronos-violet) 80%, #fff);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.mention-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

/* A phone: the list spans the field, so a thumb reaches every row. */
@media (max-width: 480px) {
    .mention-pop { width: 100%; }
    .mention-item { padding-block: 9px; }
}
