/**
 * Authored-screen chrome.
 *
 * The shell now renders the product's native MeinZuhause chrome (trust bar,
 * app header, sticky category-nav tabs, help FAB) using the `legacy-*` classes,
 * which are fully styled by legacy-preview.css (the product's own stylesheet).
 * So there is no parallel header stylesheet here: the authored screens wear the
 * exact same chrome as the frozen native screens.
 *
 * What remains here: the page backdrop (brand Stone paper) and the "Alle
 * Funktionen" module directory, which is authored rather than native. Contrast
 * of --legacy-ink (#232323) 15.9:1 and --legacy-ink-soft (#6b6560) 5.18:1 on
 * paper both clear the 4.5:1 AA floor; every control keeps a 44px short edge.
 */

/* Brand Stone paper behind every authored screen, matching the native shell.
   authored-shell.css loads after legacy-preview.css and the compiled bundle, so
   this wins the cascade by order for the plain `body` selector. */
body {
  background: var(--legacy-paper, #f6f4f1);
}

/* Shared refusal for a non-Verwalter session on a manager-only screen. No shell
   is rendered around it, so the manager navigation is never exposed. */
.authored-refusal {
  width: min(100% - 32px, 640px);
  margin: 72px auto;
  color: var(--legacy-ink, #232323);
}

.authored-refusal h1 {
  margin: 0 0 10px;
  font-family: var(--font-display, inherit);
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.02em;
}

.authored-refusal p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--legacy-ink-soft, #6b6560);
}

.authored-refusal a {
  color: var(--legacy-blue, #1300ff);
  font-weight: 650;
}

/* ---------- the module directory ("Alle Funktionen") ---------- */

/* Sits below the sticky category nav, aligned to the content column. Never
   inside the nav: that strip is `overflow-x: auto` and would clip the panel. */
.ashell__directory-wrap {
  width: min(100% - 32px, 1152px);
  margin: 18px auto 0;
}

/* Do not set `display` on the <summary> itself. Chromium stops hiding a closed
   <details>'s content when its summary is no longer a list-item box, so the
   directory would render permanently open. Style an inner wrapper instead. */
.ashell__summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
}

.ashell__summary::-webkit-details-marker {
  display: none;
}

.ashell__summary-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--legacy-ink, #232323);
  background: var(--legacy-surface, #fcfcfd);
  border: 1px solid var(--legacy-line, #e7e4e0);
  border-radius: 999px;
  box-shadow: var(--legacy-shadow-sm);
  font-size: 13px;
  font-weight: 700;
}

.ashell__summary-inner::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms var(--legacy-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.ashell__directory[open] .ashell__summary-inner::after {
  transform: translateY(2px) rotate(-135deg);
}

.ashell__summary:hover .ashell__summary-inner {
  border-color: color-mix(in srgb, var(--legacy-blue, #1300ff) 28%, var(--legacy-line, #e7e4e0));
  color: var(--legacy-blue, #1300ff);
}

.ashell__summary:focus-visible {
  outline: none;
}

.ashell__summary:focus-visible .ashell__summary-inner,
.ashell__grid a:focus-visible {
  outline: 2px solid var(--legacy-blue, #1300ff);
  outline-offset: 2px;
}

.ashell__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--legacy-blue, #1300ff);
  background: var(--legacy-blue-soft, #eceaff);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ashell__panel {
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--legacy-line, #e7e4e0);
  border-radius: var(--legacy-radius-md, 16px);
  background: var(--legacy-surface, #fcfcfd);
  box-shadow: var(--legacy-shadow-md);
}

.ashell__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--legacy-ink-soft, #6b6560);
}

.ashell__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ashell__grid a {
  display: block;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--legacy-radius-sm, 10px);
  color: inherit;
  text-decoration: none;
  transition: color 0.14s, border-color 0.14s, background-color 0.14s;
}

.ashell__grid a:hover {
  color: var(--legacy-blue, #1300ff);
  background: var(--legacy-paper, #f6f4f1);
  border-color: color-mix(in srgb, var(--legacy-blue, #1300ff) 24%, var(--legacy-line, #e7e4e0));
}

.ashell__grid a[aria-current="page"] {
  color: var(--legacy-blue, #1300ff);
  border-color: var(--legacy-blue, #1300ff);
}

.ashell__grid strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.ashell__grid small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--legacy-ink-soft, #6b6560);
}

@media (max-width: 900px) {
  .ashell__directory-wrap {
    width: min(100% - 24px, 640px);
  }
}

@media (max-width: 680px) {
  .ashell__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ashell__summary-inner::after {
    transition: none;
  }
}
