/* ================================================================
   FriendsByChance — components/taglike.css
   TagLike class hierarchy styles (.tl-* namespace).
   Works with shared.css (.fbc-icon-btn, .fbc-side-col).
   ================================================================ */

/* ── Chip — colored pill ─────────────────────────────────────── */

.tl-chip {
    /* Narrow (main.css --fbc-chip-h, the user, 2026-11-02) and readable on
       any colour: bold, with a faint halo of the opposite tone round the
       letters (.fbc-ink-*, shared.css); one line, never wider than what holds it —
       the name cut, with "…", only where it does not fit there
       (.tl-chip-name: a flex box cuts no text of its own, it clipped it at
       its border). */
    display:        inline-flex;
    align-items:    center;
    gap:            5px;
    min-height:     var(--fbc-chip-h);
    padding:        2px 11px;
    border-radius:  calc(var(--fbc-chip-h) / 2);
    font-size:      0.86rem;
    font-weight:    650;
    line-height:    1.2;
    background:     #e8e8e8;
    flex-shrink:    0;
    max-width:      100%;
    white-space:    nowrap;
    user-select:    none;
}
/* An uncoloured chip's words — at no weight at all (:where), so a coloured
   chip's ink (.fbc-ink-*, shared.css, loaded before this sheet) wins. */
:where(.tl-chip) { color: var(--color-text); }
.tl-chip-name {
    min-width:     0;
    overflow:      hidden;
    text-overflow: ellipsis;
}
/* The ink a coloured chip's background calls for (taglike.js _styleChip):
   light on a dark colour, dark on a light one — each with a halo of the
   other tone, a pixel wide, that holds the letters' edges on the colours
   in between (orange, mid green) without reading as an outline. */

/* ── Chip marker ─────────────────────────────────────────────────
   The small glyph saying what kind of thing a chip is (FBC.ui.markers),
   at its top right.  Any TagLike can carry one, so this lives with the
   chip rather than in a feature stylesheet.  A box of the row, after the
   name — never over it (it sat on the name's last letters). */

.tl-chip--marked { padding-right: 7px; }

.tl-chip-marker {
    flex:            none;
    align-self:      flex-start;
    width:           12px;
    height:          12px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    /* Inherits the chip's text colour, so it stays readable on any
       background the colour picker can produce. */
    color:           inherit;
    opacity:         0.75;
}
.tl-chip-marker svg { width: 10px; height: 10px; display: block; }

/* ── Compact view mode ───────────────────────────────────────────
   Chips packed together with no description, many more per screen.
   Clicking one opens an FBC.ui.Popover with the full detail and the
   same action buttons the expanded row shows. */

.tl-compact-wrap {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
    padding:   8px 14px 10px;
}

/* .tl-chip--compact: pressed, its card — its look is .fbc-pressable's
   (components/shared.css, FBC.ui.pressable). */

/* ── Row — NiceAndCleanStyle list item ───────────────────────── */

.tl-row {
    display:         flex;
    align-items:     center;
    gap:             10px;
    padding:         8px 12px 8px 14px;
    border-bottom:   1px solid var(--color-divider);
    transition:      background 0.08s;
}
.tl-row:hover { background: var(--color-hover, rgba(0,0,0,0.03)); }

.tl-row-main {
    flex:        1;
    display:     flex;
    flex-wrap:   wrap;
    align-items: center;
    gap:         6px 10px;
    min-width:   0;
}

/* What a page adds about an item (`extras` — a tag's things and chats):
   in a row, a line of its own under the chip and its description; in the
   compact popover, a block of its own, ruled off like the others. */
.tl-row-extras,
.tl-row-members { flex-basis: 100%; min-width: 0; }

/* A TITLED LINE OF CHIPS (FBC.ui.chipBlock): a combo's members, what a
   tag is on — the title's look is .fbc-section-title's (shared.css). */
.tl-chip-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-chip-block-chips {
    display:     flex;
    flex-wrap:   wrap;
    align-items: center;
    gap:         4px;
    min-width:   0;
}
.fbc-popover-extras {
    border-top:  1px solid var(--color-divider);
    padding-top: 10px;
    margin-top:  3px;
}

.tl-row-desc {
    flex:          1;
    font-size:     0.82rem;
    color:         var(--color-text-secondary);
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
    min-width:     0;
}

/* Type badge shown in flat (search) mode */
.tl-type-badge {
    flex-shrink:   0;
    font-size:     0.74rem;
    color:         var(--color-text-secondary);
    border:        1px solid var(--color-divider);
    border-radius: 10px;
    padding:       1px 8px;
    white-space:   nowrap;
}

/* ── TagLike_TagType row specifics ───────────────────────────── */

/* Color swatch square */
.tl-type-swatch {
    width:         22px;
    height:        22px;
    border-radius: 4px;
    flex-shrink:   0;
    background:    #e8e8e8;
    border:        2px solid rgba(0,0,0,0.20);
}

/* Row main for a type: swatch + stacked name/desc */
.tl-type-row-main {
    align-items: center;
}

/* Name + desc stack */
.tl-type-text {
    flex:           1;
    display:        flex;
    flex-direction: column;
    gap:            2px;
    min-width:      0;
}

.tl-type-name {
    font-size:   0.9rem;
    font-weight: 600;
    color:       var(--color-text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.tl-type-desc {
    font-size:     0.8rem;
    color:         var(--color-text-secondary);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    min-height:    1.2em; /* always reserves desc-line height for uniform row sizing */
}

/* Spacer — holds the same 30×30 slot as a .fbc-icon-btn,
   used when a button slot is empty so all type rows stay
   uniformly 2-button tall. */
.tl-btn-spacer {
    width:      30px;
    height:     30px;
    flex-shrink: 0;
}

/* ── Count badge (item counts on section headers / left rows) ── */

.tl-count-badge {
    display:       inline-block;
    margin-left:   8px;
    padding:       0 7px;
    border-radius: 9px;
    font-size:     0.72rem;
    font-weight:   600;
    line-height:   1.5;
    background:    rgba(0,0,0,0.07);
    color:         var(--color-text-secondary);
    vertical-align: 1px;
}

/* ── Row group (e.g. places grouped by country) ──────────────── */

.tl-group-hdr { padding: 10px 14px 3px 16px; }   /* its look: .fbc-section-title (components/shared.css) */

/* Select mode (taglike-page.js): the box on each item, first in it. */
.tlp-select-item { flex: 0 0 auto; margin: 0 6px 0 0; }
