/* =====================================================================
   PAGE GROUP: members — pages/group-members.css (created 2026-10-20, Session 253).
   The member list both member pages render: the grouping bar's label, the
   two layouts and their switch, the column toggles, the role/class group
   headings (also built by gp-char-sort.js), the name cell, and the member
   table's tighter two-row header. Members: ModerateTeam/Index (Manage Team),
   TeamComposition/Team (Team Members, public), ModerateTeam/Snapshot (the group
   headings and counts). Each links this file itself (Systems/StaticAssets.md).
   Moved from site.css and renamed .modteam-* -> .grp-members-*; declarations and
   comments unchanged.
   ===================================================================== */

.grp-members-sort-label {
    font-size: 0.688rem;
    color: var(--ink-3);
    margin-right: 0.125rem;
}

/*  SUPERSEDED 2026-08-24 (Session 208) — split into a shared block and two layout blocks so the
    table's group title can drop the bottom border. See the note under the split.

.grp-members-role-group-heading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.656rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.038rem;
    color: var(--ink-3);
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 0.125rem;
}
*/

/*  GROUP TITLE — the shared treatment, and then one block per layout.

    THE TWO LAYOUTS MUST NOT SHARE ONE CLASS, and the border is why. In the card grid the heading
    has nothing beneath it but a gap, so it draws its own bottom border to separate itself from the
    cards that follow. In the table the very next element is a <tr>, and .data-table already gives
    every body row a border-top — so the same rule lands a second line directly under the first and
    the title reads as sitting in a box.

    Everything that is genuinely common stays declared ONCE, in the grouped selector below. Only the
    two properties that differ get their own block, so this is a split rather than a copy. */
.grp-members-role-group-heading,
.grp-members-table-group-heading {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.656rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.038rem;
    color: var(--ink-3);
    padding: 0.25rem 0;
}

/*  The card grid's heading. grid-column spans the whole row of the cards grid; the border and the
    margin separate it from the cards beneath. */
.grp-members-role-group-heading {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 0.125rem;
}

/*  The table's heading. NO border-bottom — the row below brings its own border-top — and no
    grid-column, which is meaningless inside a table cell. */
.grp-members-table-group-heading {
    border-bottom: 0;
    margin-bottom: 0;
}

/* SUPERSEDED 2026-08-06 — .gp-badge now sets text-transform, letter-spacing and font-weight on
   ITSELF, so there is nothing left for this container reset to fix. Deleting the copy rather than
   keeping the two in step: the badge is the thing that has to survive being placed in a styled
   heading, so the fix belongs on the badge, not on every host that might contain one.
   The heading is already a flex row with a gap, so no margin is needed to separate the badges.

   Original reason, kept because it is why the badge sets those three properties at all: the heading
   is uppercase, letter-spaced and 600 weight; the old .role-rank-badge set none of those, so without
   a reset the badges inherited all three and looked nothing like the same badge on GuildSetup and
   GuildRoles. Inherited uppercase would also have dragged them under the Badges.md rule that an
   uppercase badge needs line-height: 1.
.grp-members-role-group-heading .role-linked-ranks {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}
*/

/* Per-group member count shown next to a sort group heading, e.g. "Tank (3)". Lighter than the
   heading label so it reads as a secondary value. */
.grp-members-group-count {
    font-weight: 400;
    opacity: 0.75;
}

/* ---- Member list: the two layouts (Session 208) ------------------------------------------------
   The Manage Team and Team Members pages render every member TWICE — as a card and as a table row
   — and one layout is shown. Which one is a per-viewer choice in localStorage, so only JavaScript
   can know it.

   THE SWITCH IS AN ATTRIBUTE ON <html>, NOT A CLASS ON A CONTAINER, and that is the whole
   anti-flash mechanism. member-layout-boot.js sets it from the <head>, before any page markup is
   parsed, so the correct layout is hidden from the very first paint. A class on a container could
   only be applied once that container exists, which is exactly too late.

   Cards are the default and the unqualified state — the absence of the attribute is a complete
   answer, so there is no third state to reason about. */
.grp-members-layout-table {
    display: none;
}

html[data-member-layout="table"] .grp-members-layout-cards {
    display: none;
}

html[data-member-layout="table"] .grp-members-layout-table {
    display: block;
}

/* The layout switch sits hard right in the grouping bar. The MARGIN IS ON THE WRAPPER, never on the
   pill, so the pill keeps exactly the appearance it has everywhere else on the site.

   The wrapper is also why UI/TogglePill.md's flex-parent caveat does not bite here: .gp-sort-bar
   is display:flex, and a .toggle-pill placed directly in it would blockify and span the bar. Inside
   this span the pill is in ordinary block flow and its inline-flex shrink-wraps as designed. */
.grp-members-layout-switch {
    margin-left: auto;
    display: inline-block;
}

/* ---- Member table: column toggles -------------------------------------------------------------
   The checkbox-backed .btn form from UI/Buttons.md — the label carries .btn and the real checkbox
   stays the state. Only the LAYOUT is declared here; nothing restates what .btn-active looks like. */
.grp-members-col-toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.grp-members-col-toggle input[type="checkbox"] {
    display: none;
}

/* .role-detail-label is a block with a top margin, which is right in a subrow card and wrong in a
   flex row. Layout only — the type treatment is the shared class's and is not restated. */
.grp-members-col-toggle-label {
    margin-top: 0;
    margin-right: 0.25rem;
}

/* ---- Member table: the group heading row ------------------------------------------------------
   THE HEADING CLASS IS ON A DIV INSIDE THE CELL, NEVER ON THE <td>. It carries display:flex, and a
   flex td stops being a table-cell and collapses its own colspan — the same trap UI/Tables.md
   records for .detail-panel.

   That div is .grp-members-table-group-heading, NOT the card grid's .grp-members-role-group-heading. The two
   share their type treatment through a grouped selector further up and differ in exactly one thing
   that matters: the card's heading draws a bottom border to separate itself from the cards below,
   and in a table the next element is a <tr> that already brings its own border-top — so the shared
   rule would put two lines under every group title. */
/*  SUPERSEDED 2026-08-24 (Session 208), same day. `transparent` was the wrong tool for both jobs and
    did neither — see the rule below.

.data-table tbody tr.grp-members-group-row td {
    padding: 0.625rem 1rem 0.25rem;
    background: transparent;
}

.data-table tbody tr.grp-members-group-row:hover td {
    background: transparent;
}
*/

/*  A GROUP HEADING IS NOT A MEMBER, so it is tinted one step DARKER than the rows it introduces and
    takes no hover at all.

    var(--bg) is that step: rows are var(--bg-2), and var(--bg) is the darker neighbour this document
    already pairs them with — it is what .detail-panel uses to sit behind a row for the same reason.

    !! THE OPAQUE BACKGROUND IS ALSO WHAT KILLS THE HOVER, and `transparent` could never have done
    it. .data-table tbody tr:hover applies a background-IMAGE gradient to the <tr>, and a transparent
    <td> lets it show straight through — the heading row highlighted exactly like a member row. A
    <td> background paints ABOVE its <tr>'s, whatever the specificity (this file's Row Attention
    Highlight note is the same fact from the other direction), so one opaque cell answers both the
    tint and the hover and no :hover rule is needed at all.

    Setting it on the <tr> instead would lose to nothing and fix nothing: the hover gradient is on
    that same element and would simply layer over it. */
.data-table tbody tr.grp-members-group-row td {
    padding: 0.625rem 1rem 0.25rem;
    background: var(--bg);
}

/*  SUPERSEDED 2026-08-24 (Session 208) — the table's heading is .grp-members-table-group-heading now
    and zeroes its own margin, so there is nothing left for a context override to fix.

.grp-members-group-row .grp-members-role-group-heading {
    margin-bottom: 0;
}
*/

/* The class group heading's icon, in both layouts. The role heading's icon is a masked div sized by
   .role-icon; a class icon is a plain <img>, so it needs its own box here.

   UNREACHABLE SINCE 2026-08-27 (Session 212): the class group heading no longer renders an icon, so
   no .ccw-class-icon exists inside either heading. Commented rather than deleted because it is the
   other half of a one-line restore — gp-char-sort.js's class spec has `imgOf` commented out on the
   same date, and uncommenting that alone would bring the icon back UNSIZED at its natural
   resolution. Restore both or neither.

   .ccw-class-icon ITSELF IS STILL LIVE and must not be touched: it is the class icon on the member
   card and the member table row, which this change did not affect.
.grp-members-role-group-heading .ccw-class-icon,
.grp-members-table-group-heading .ccw-class-icon {
    width: 1rem;
    height: 1rem;
}
*/

/* ---- Member table: the name cell --------------------------------------------------------------
   Level and realm sit under the name, which is the one thing this cell does that no other name cell
   on the site does.

   The anchor carries NO shared component class and none should be invented — a bare <a> already has
   the portal's link colour and hover (UI/Tables.md). These rules are LAYOUT ONLY: the colour is set
   per row from the server-resolved class colour, and nothing here restates weight or hover. */
/*  SUPERSEDED 2026-08-24 — the name shares a flex line with the role icon now, so the anchor is a
    flex item rather than a block, and it has to carry its own truncation. See below.

.grp-members-cell-name {
    display: block;
}
*/

/*  The role icon and the name on one line, as they are on the card. The icon moved here from a
    column of its own: it identifies who the row is about rather than being a field in its own
    right. */
.grp-members-cell-name-line {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

/*  THE TRUNCATION HAD TO MOVE ONTO THE NAME ITSELF. .col-name sets overflow, text-overflow and
    white-space on the CELL, which truncates text in the cell's own flow — it does not reach text
    inside a nested flex item, so the name would have overflowed the 30ch cap instead of ellipsing.
    min-width: 0 is what allows a flex item to shrink below its content width at all; without it the
    item refuses to shrink and there is nothing to ellipse. */
.grp-members-cell-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grp-members-cell-sub {
    display: block;
    font-size: 0.688rem;
    color: var(--ink-3);
}

/*  A TIGHTER HEADER, because this table's is TWO ROWS.

    .data-table thead th is padding: 0.75rem 1rem, which is right for a single header row. Stacked
    twice it is 3rem of vertical padding above the first member, and the group label and the column
    labels under it read as two separate bands rather than one heading.

    Only the VERTICAL padding is reduced; the horizontal 1rem is left alone, since that is what keeps
    a header aligned with the cell beneath it.

    !! SCOPED TO THIS TABLE ON PURPOSE. .data-table thead th is the header of every table in the
    project and all the others have ONE row, where the current padding is correct — changing it
    globally would restyle dozens of surfaces to fix a problem only this table has. That is a
    migration, not a fix, and it is the same call made for the controls column's vertical-align
    above. If a compact header is ever wanted site-wide it should be a documented modifier rather
    than a redefinition of the base rule. */
.data-table.grp-members-member-table thead th {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

/*  The group label row is tighter still. It labels the row beneath it rather than a column, so the
    two want to read as one block — the space belongs BELOW the pair, not between them. */
.data-table.grp-members-member-table thead th.th-group {
    padding-top: 0.25rem;
    padding-bottom: 0.125rem;
}

