/* ==========================================================================
   Labour Life practice system: group.css. Group comms (27 Oct 2026): the list
   (views/group-comms.js), New group message (views/group-new.js) and one group
   message (views/group-send.js). Every class here starts with grp-. Tokens
   only, no raw colours. Phone first: every part stacks; from 720px the form
   keeps one readable column.

     .grp, .grp-part, .grp-h        the parts of the form, each a card-like block with its heading
     .grp-chan                      Send as: Email or SMS (a .seg)
     .grp-sub, .grp-set             the choices under a ticked source, a group of radio rows
     .grp-chosen, .grp-chips        the companies chosen one by one, with Add a company
     .grp-pv (__n --err, __list)    who will get it: the count, the list, who is left out
     .grp-det, .grp-tbl, .grp-addr  a folded list of people and its table
     .grp-put (__l)                 Put in {name} and {company}
     .grp-att (__r __n)             the attachments
     .grp-foot, .grp-send           the note and Send at the bottom
     .grp-facts (__n), .grp-body    one group message: the counts, the message as written
     .grp-msg (__i __t)             the Message column of the list
   27 Oct 2026, evening:
     .grp-groups                    Only these groups: a tick box per group of the employees' company
     .grp-file__btns __n __more     People from a file: Choose a file and Remove, what it gave, rows not used
     .grp-ticks, .grp-who           Show who: Tick all and Untick all, and the list with a tick box per
                                    person (.tbl__pick of components.css); a row taken off is .is-off
     .grp-pv__save                  Save as a group
   ========================================================================== */

.grp { display: grid; gap: var(--s5); max-width: 860px; }

.grp-part {
  display: grid; gap: var(--s3); min-width: 0;
  padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
@media (min-width: 720px) { .grp-part { padding: var(--s5); } }
.grp-h { margin: 0; font-family: var(--font-display); font-size: var(--fs-h3); line-height: var(--lh-tight); }

.grp-chan { justify-self: start; }
.grp-chan .seg__b { display: inline-flex; align-items: center; gap: var(--s2); }
.grp-notes:empty { display: none; }

.grp-part__t { font-weight: 600; }
.grp-sub {
  display: grid; gap: var(--s3); min-width: 0;
  margin: 0 0 var(--s2) calc(22px + var(--s3)); padding-left: var(--s3);
  border-left: 2px solid var(--line);
}
.grp-set { display: grid; gap: 0; margin: 0; padding: 0; border: 0; min-width: 0; }
.grp-set > legend { padding: 0; margin-bottom: var(--s1); }
.grp-radio input { border-radius: 50%; }
.grp-chosen { display: grid; gap: var(--s2); justify-items: start; }
.grp-chips { min-width: 0; }
.grp-chips .chip { max-width: 100%; }
.grp-chips .chip > span { min-width: 0; overflow-wrap: anywhere; }

.grp-pv { display: grid; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); min-width: 0; }
.grp-pv__n { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.grp-pv__n--err { color: var(--danger-ink); }
.grp-det > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.grp-tbl { max-height: 420px; overflow: auto; min-width: 0; }
.grp-addr { overflow-wrap: anywhere; }

.grp-put { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.grp-put__l { font-size: var(--fs-sm); color: var(--ink-soft); }
.grp-email, .grp-sms { display: grid; gap: var(--s3); min-width: 0; }

.grp-att { display: grid; gap: var(--s1); margin: 0; padding: 0; list-style: none; }
.grp-att__r { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); min-width: 0; }
.grp-att__n { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.grp-foot { display: grid; gap: var(--s3); justify-items: start; }
.grp-foot > .note { justify-self: stretch; }
@media (max-width: 559px) { .grp-send { justify-self: stretch; } }

.grp-facts { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.grp-facts__n { margin: 0; font-size: var(--fs-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.grp-body { overflow-wrap: anywhere; }
.grp-body img { max-width: 100%; height: auto; }
.grp-err { margin: var(--s1) 0 0; color: var(--danger-ink); }

.grp-msg { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; }
.grp-msg__i { flex: none; color: var(--ink-soft); }
.grp-msg__t { min-width: 0; overflow-wrap: anywhere; }

/* Only these groups (27 Oct 2026, evening). */
.grp-groups { display: grid; gap: 0; min-width: 0; }
.grp-groups .check__t { min-width: 0; overflow-wrap: anywhere; }

/* People from a file. */
.grp-file__btns { display: flex; flex-wrap: wrap; gap: var(--s2); }
.grp-file__n { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.grp-file__n:empty, .grp-file__more:empty { display: none; }
.grp-file__more { display: grid; gap: var(--s2); min-width: 0; }

/* Show who: a tick box per person, ticked at first. */
.grp-ticks { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0; }
.grp-who tr.is-off td { color: var(--ink-mute); }
.grp-who td.tbl__main { overflow-wrap: anywhere; }
.grp-pv__save { display: flex; }
.grp-pv__save:empty { display: none; }

@media (max-width: 559px) {
  .grp-file__btns .btn, .grp-pv__save .btn { flex: 1 1 auto; justify-content: center; }
}
