/* Modul "access" – Gruppen und Rechte. Nur Tokens aus theme.css. */

.ac-perms { display:grid; gap:var(--s-4); }
.ac-cat { display:grid; gap:var(--s-1-5); align-content:start; }
.ac-cat > .lbl { margin:var(--s-1) var(--s-0-5) 0; }

/* Recht mit Haekchen: an (ausgewaehlt), implied (gilt durch ein anderes Recht), aus */
.ac-check { display:grid; grid-template-columns:var(--pill-h) minmax(0,1fr) auto; gap:var(--s-3); align-items:start; width:100%; min-height:var(--row-h); padding:var(--s-2-5) var(--s-3); border:1px solid var(--border); border-radius:var(--r-md); background:var(--surface); color:var(--fg); text-align:left; font:inherit; cursor:pointer; }
@media (hover:hover) { .ac-check:not(:disabled):hover { border-color:var(--border-strong); } }
.ac-check:disabled { cursor:default; }
.ac-check .box { width:var(--pill-h); height:var(--pill-h); border-radius:var(--r-sm); border:1.5px solid var(--border-strong); display:grid; place-items:center; margin-top:var(--s-0-5); color:var(--primary-fg); }
.ac-check .box svg { width:var(--icon-sm); height:var(--icon-sm); stroke-width:2.5; }
.ac-check.on { border-color:var(--primary); background:var(--primary-tint); }
.ac-check.on .box { background:var(--primary); border-color:var(--primary); }
.ac-check.implied .box { background:var(--primary-tint); border-color:transparent; color:var(--primary-text); }
.ac-check .t b { display:block; font-weight:600; }
.ac-check .t small { display:block; font-size:var(--fs-xs); color:var(--fg-muted); margin-top:var(--s-0-5); }
.ac-check .t small.via, .ac-def small.via { color:var(--primary-text); }
.ac-check .id, .ac-def .id { font:var(--fs-2xs) var(--font-mono); color:var(--fg-subtle); }

/* Uebersicht (Rechte-Datei, wirksame Rechte) */
.ac-overview, .ac-eff { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:var(--s-4); }
.ac-def { padding:var(--s-2) 0; border-bottom:1px solid var(--border); display:grid; gap:var(--s-0-5); }
.ac-def .t { display:flex; justify-content:space-between; align-items:baseline; gap:var(--s-2); }
.ac-def .t b { font-weight:600; }
.ac-def small { font-size:var(--fs-xs); color:var(--fg-muted); }

.ac-foot { display:flex; align-items:center; gap:var(--s-2); margin-top:var(--s-4); padding-top:var(--s-3); border-top:1px solid var(--border); position:sticky; bottom:0; background:var(--bg-raised); padding-bottom:var(--s-2); }

@media (max-width:767px), (max-height:499px) and (max-width:1023px) {
  .ac-check .id { display:none; }
  .ac-check { grid-template-columns:var(--pill-h) minmax(0,1fr); }
}
