/* Groepen: de lijst (/groepen/) en wat de groepspagina (/groep/) ermee deelt. De paginalay-out (kop, tabs,
 * zijkant, kopregel) komt uit ../inhoud/inhoud.css, de componenten uit ../app.css. */

/* De tegel van een groep: de eerste letter op een zachte kleur die bij de titel hoort. */
.groeptegel { display: grid; place-items: center; flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--radius-card);
  background: oklch(92% 0.035 var(--tint, 40)); color: oklch(38% 0.06 var(--tint, 40)); font: 600 var(--text-lg)/1 var(--font-display); }
.groeptegel--beeld { position: relative; overflow: hidden; color: transparent; }
.groeptegel--beeld img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.groeptegel--groot { width: 88px; height: 88px; font-size: var(--text-2xl, 1.75rem); }

/* De lijst: een rij per groep, de titel voorop; jouw rol rechts. */
.groepen { list-style: none; margin: 0; padding: 0; display: grid; border-top: var(--rule-hair) solid var(--color-rule-2); }
.groepen:empty { border-top: 0; }
.groep { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule);
  transition: background-color var(--dur-micro) var(--ease-out); }
.groep:hover { background: var(--color-paper-2); }
.groep__tekst { display: grid; gap: var(--space-3xs); min-width: 0; flex: 1 1 auto; }
.groep__titel { justify-self: start; color: var(--color-ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.groep__titel:hover { text-decoration: underline; text-decoration-color: var(--color-accent-2); text-underline-offset: 0.16em; }
.groep__titel:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 2px; }
.groep__snippet { margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); overflow-wrap: anywhere; }
.groep__meta { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-md); margin: 0; font-size: var(--text-xs); color: var(--color-muted); }
.groep__rol { flex-shrink: 0; padding: var(--space-3xs) var(--space-xs); border-radius: var(--radius-pill); background: var(--color-paper-3);
  font-size: var(--text-xs); font-weight: 500; color: var(--color-ink-2); }
.groep__rol--owner { background: var(--color-board); color: var(--color-board-type); }
/* Open aanvragen: alleen voor de eigenaar en beheerders, in het accent want er moet iets gebeuren. */
.groep__aanvragen { flex-shrink: 0; padding: var(--space-3xs) var(--space-xs); border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--color-accent) 16%, var(--color-cotton)); color: var(--color-ink); font-size: var(--text-xs); font-weight: 500; }
.groep.is-laden .skelet { height: 0.8em; }
.groep.is-laden .groeptegel { background: var(--color-paper-3); }

@media (max-width: 40rem) {
  .groep { align-items: flex-start; }
  .groeptegel { width: 44px; height: 44px; font-size: var(--text-md); }
  /* alleen in de groepenlijst (daar staat de rol ook in de tekst); de ledentabel en de kop van een groep houden hem */
  .groep > .groep__rol { display: none; }
}
@media (prefers-reduced-motion: reduce) { .groep { transition: none; } }
