/*
    Groups (Pages/Groups): the list at /groups and a group's own page. A person in a group
    is drawn like the team page's (.team-person, contact.css). Variables from site.css only.
*/

.groups-page { display: flex; flex-direction: column; gap: 16px; }

/* ---- The list ---- */
.group-list { margin: 0; padding: 0; list-style: none; }
.group-row { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.group-row:first-child { border-top: 0; }
.group-row-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.group-row-name { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.group-row-name .role-chip { font-size: 16px; }
.group-row-name:hover .role-chip, .group-row-name:focus-visible .role-chip { text-decoration: underline; }
.group-row-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.group-row-state .tag { margin-right: 0; }
.group-row-state a.tag { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; }
.group-about { margin: 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.group-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; color: var(--muted); font-size: 14px; }
.group-title .role-chip { font-size: 20px; }

/* ---- A group's page ---- */
.group-you-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.group-you-body p { margin: 0; }
.group-ask { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.group-ask .m-field { align-self: stretch; }

.group-requests { margin: 0; padding: 0; list-style: none; }
.group-request { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.group-request-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.group-request-who .avatar { flex: none; width: 40px; height: 40px; }
.group-note { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent-line); background: var(--surface-alt); border-radius: var(--radius-small); white-space: pre-line; overflow-wrap: anywhere; }

.group-since { font-size: 14px; }
.group-remove { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; }
.group-remove:hover, .group-remove:focus-visible { color: var(--danger); }

@media (min-width: 640px) {
    .group-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
    .group-row-state { flex: none; justify-content: flex-end; }
}
