/* ================================================================
   FriendsByChance — people-select.css
   FBC.peopleSelect (people-select.js) — contacts and the tags that name
   them, searched and picked: The Map's People mode, a privacy table's
   Selected and Excluded rows.  `--compact`: the picks as a row of chips
   (a table cell, The Map's pane); `--off`, a pick turned off;
   `--coloured`, a person's in their colour.
   ================================================================ */

.people-select {
    display:        flex;
    flex-direction: column;
    gap:            10px;
    min-width:      0;
}

.people-select-search { position: relative; }
.people-select-input  { width: 100%; box-sizing: border-box; }

/* What the search offers, under the field: one press adds it. */
.people-select-results {
    display:        flex;
    flex-direction: column;
    gap:            2px;
    margin-top:     6px;
    padding:        4px;
    border:         1px solid var(--color-border);
    border-radius:  8px;
    background:     var(--color-surface);
}
.people-select-result {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             8px;
    min-width:       0;
    padding:         5px 6px;
    border:          0;
    border-radius:   6px;
    background:      transparent;
    text-align:      left;
    cursor:          pointer;
}
.people-select-result:hover,
.people-select-result:focus-visible { background: var(--color-hover); }
.people-select-result-meta,
.people-select-row-meta {
    flex:        0 0 auto;
    font-size:   0.76rem;
    color:       var(--color-text-muted);
    white-space: nowrap;
}
.people-select-none,
.people-select-empty {
    margin:    0;
    padding:   4px 6px;
    font-size: 0.85rem;
    color:     var(--color-text-muted);
}

/* The selection. */
.people-select-selected-head {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             8px;
    margin-bottom:   6px;
}
/* .people-select-selected-title: its look is .fbc-section-title's (components/shared.css). */
.people-select-list {
    display:        flex;
    flex-direction: column;
    gap:            4px;
    margin:         0;
    padding:        0;
    list-style:     none;
}
.people-select-row {
    display:       flex;
    align-items:   center;
    gap:           6px;
    padding:       4px 2px 4px 6px;
    border-radius: 8px;
}
.people-select-row:hover { background: var(--color-hover); }
.people-select-row-body {
    flex:           1;
    min-width:      0;
    display:        flex;
    flex-direction: column;
    align-items:    flex-start;
    gap:            2px;
}
.people-select-row-meta { white-space: normal; }

/* Someone picked whom the catalogue no longer has (excluded, then no
   longer a contact): their @nickname, plainly. */
.people-select-unknown {
    background: var(--color-hover);
    color:      var(--color-text-secondary);
}

/* ── Compact: the picks as chips in a row, under the field ─────────── */
.people-select--compact { gap: 6px; }
.people-select--compact .people-select-list {
    flex-direction: row;
    flex-wrap:      wrap;
    gap:            4px 6px;
}
.people-select--compact .people-select-row {
    gap:        2px;
    padding:    2px 2px 2px 4px;
    background: var(--color-hover);
}
.people-select--compact .people-select-row-body { flex-direction: row; align-items: center; gap: 6px; }
.people-select--compact .fbc-icon-btn { width: 22px; height: 22px; }

/* A pick turned off (`toggle`): kept where it is, greyed, its switch the
   one way back — and every pick but the SOLO one, while there is one. */
.people-select-row--off .people-select-row-body,
.people-select-row--muted .people-select-row-body { opacity: 0.45; }
.people-select-row--off .people-select-switch   { color: var(--color-primary); }
/* The solo pick (`solo`): marked, the others greyed round it. */
.people-select-row--solo { box-shadow: inset 0 0 0 2px var(--color-primary); }
.people-select-solo-mark {
    display:     inline-flex;
    color:       var(--color-primary);
}
.people-select-solo-mark svg { width: 14px; height: 14px; }

/* A person's pick in their colour (`colours`): the one their journeys
   are drawn in — the selection reads as the map's legend. */
.people-select-row--coloured { box-shadow: inset 0 0 0 2px var(--pick-ink); }

/* A chip pressed to open what the host shows of it (`open`). */
/* .people-select-open: pressed, the host's card — its look .fbc-pressable's (FBC.ui.pressable). */
