/* Gemeinsamer Material-3-Rechtszugang bleibt auch bei Anmeldung und Live-Verbindungen erreichbar. */
.app-legal-footer {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-body-small);
}
.app-legal-footer nav {
  width: min(1200px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}
.app-legal-footer .legal-link,
.app-legal-footer .legal-summary {
  min-height: 44px;
  height: auto;
  padding-inline: 12px;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.app-legal-footer .legal-link:hover,
.app-legal-footer .legal-summary:hover { color: var(--md-sys-color-on-surface); }
.app-legal-footer :focus-visible { outline: 3px solid var(--md-sys-color-secondary); outline-offset: 3px; }
.app-legal-footer details { width: min(1200px, 100%); margin-inline: auto; }
.app-legal-footer details nav { width: 100%; margin-top: 4px; }
.app-legal-footer .legal-summary { margin-inline: auto 0; list-style: none; cursor: pointer; }
.app-legal-footer .legal-summary::-webkit-details-marker { display: none; }
.app-legal-footer--live { min-height: 0; padding-block: 4px 8px; }
@media (max-width: 599px) {
  .app-legal-footer { padding-inline: 16px; }
  .app-legal-footer nav { justify-content: flex-start; }
  .app-legal-footer .legal-summary { margin-inline: 0 auto; }
  .portal-integrated:has([data-portal-shell]:not([hidden])) > .app-legal-footer { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
}
/* Anmeldung: Rechtslinks gehören zur schmalen Formularspalte, nicht zur App-Shell. */
body:has(> .portal-auth:not([hidden]), > .admin-auth:not([hidden])) > .app-legal-footer {
  width: min(420px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 0;
}
body:has(> .portal-auth:not([hidden]), > .admin-auth:not([hidden])) > .app-legal-footer nav { max-width: 380px; justify-content: center; }
body:has(> .portal-auth:not([hidden]), > .admin-auth:not([hidden])) > .app-legal-footer .legal-link {
  padding-inline: 8px;
  font: var(--md-sys-typescale-body-small);
}
@media print { .app-legal-footer { display: none; } }
