/* quik Sites: Rollenwahl als Auswahlliste und Karte „Rollen“ (public/js/rollen-auswahl.js, public/js/rollen-marke.js;
   docs/BAUPLAN.md Abschnitt 35). Nur Farben aus den Tokens von app.css, hell und dunkel gleich gebaut. */

/* Auswahlliste: Rollen mit einer Zeile, was sie darf; Fuß „Was darf welche Rolle?“ als ruhiger Verweis */
.qsel-pop .qsel-foot { color: var(--ink-soft); font-size: var(--fs-sm); position: sticky; bottom: -5px; margin-bottom: -5px; border-radius: 0 0 10px 10px; background: var(--pop); box-shadow: 0 -1px 0 var(--line-soft); }
/* Am Handy (Blatt): Fuß am Ende der Liste, nicht klebend */
.sheet .qsel-foot { position: static; margin-bottom: 0; border-radius: 7px; box-shadow: none; }
/* Rollenlisten dürfen höher sein als andere Auswahlen: mehr Rollen auf einen Blick */
.pop.qsel-pop:has(.qsel-foot) { max-height: min(560px, calc(100vh - 16px)); }
.qsel-pop .qsel-foot > .ic { color: var(--ink-faint); }
.qsel-pop .qsel-foot.act, .qsel-pop .qsel-foot:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, var(--pop)); }
.qsel-pop:has(.qsel-foot) .qsel-l > small { white-space: normal; }
.qsel.qs-rolle .qsel-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsel.qs-rolle.block { width: 100%; }
.mk2-meta .qsel.mk2-rolesel { min-width: 0; max-width: 220px; }

/* Zusatzrechte aus einer früheren Rolle (Personen eines Kunden) */
.tm-acc-caps.tm-zusatz { color: var(--ink-faint); }

/* Karte „Rollen“ unter Marke → Team & Sicherheit */
.rm-lede { margin: 0 0 12px; max-width: 64ch; }
.rm-list { display: flex; flex-direction: column; }
.rm-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 32px; column-gap: 12px; align-items: center; padding: 10px; border-radius: 10px; border-bottom: 1px solid var(--line-soft); }
.rm-row:last-child { border-bottom: 0; }
.rm-row:hover { background: var(--hover); }
.rm-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--hover); color: var(--ink-soft); }
.rm-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rm-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rm-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--fg); }
.rm-sub { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.45; }
.rm-capsum { color: var(--ink-faint); }
.rm-n { font-size: var(--fs-sm); color: var(--ink-soft); white-space: nowrap; }
.rm-more-sp { width: 32px; }
.rm-was { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* Dialog „Rolle anlegen“: Häkchen je Fähigkeit wie bei „Eigene Auswahl“ */
.rm-form { display: flex; flex-direction: column; gap: 4px; }
.rm-caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rm-cap { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); cursor: pointer; }
.rm-cap:hover { background: var(--hover); }
.rm-cap:has(input:checked) { border-color: var(--line-strong); }
.rm-cap:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.rm-cap input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.rm-cap-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rm-cap-t b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-base); font-weight: 600; color: var(--fg); }
.rm-cap-t > span { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.45; }
.rm-cap.is-off { cursor: default; }
.rm-cap.is-off:hover { background: none; }
.rm-cap.is-off .rm-cap-t b { color: var(--ink-soft); }
.rm-tag { font-style: normal; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .02em; padding: 1px 7px; border-radius: 99px; background: var(--hover); color: var(--ink-soft); }
.rm-vorlage { display: flex; flex-direction: column; gap: 6px; }
.rm-vorlage .qsel { width: 100%; }

/* Onboarding des Kunden: Satz zum Leitprinzip unter der Begrüßung */
.ob-g-fach { color: var(--ink-soft); font-size: var(--fs-sm); }

@media (max-width: 640px) {
  .rm-row { grid-template-columns: 32px minmax(0, 1fr) 32px; grid-template-areas: "ic who more" ". n n"; row-gap: 4px; }
  .rm-ic { grid-area: ic; }
  .rm-who { grid-area: who; }
  .rm-n { grid-area: n; }
  .rm-row > .row-more, .rm-more-sp { grid-area: more; }
  .rm-caps, .rm-form .rm-caps { grid-template-columns: minmax(0, 1fr); }
  .mk2-meta .qsel.mk2-rolesel { max-width: none; }
}
