/* =============================================================================
   IMPRESSUM REDESIGN — body.impressum-page
   Date: 2026-05-07 · Clean rewrite per admin_redesign_playbook.md
   (customer-page adaptation). Replaces the broken `all: revert` strip-only
   artifact left over from an earlier session.

   Paradigm: "Legal letter — identity hero + key/value ledger + disclaimer
              prose + inline page rail."  No cards. No card-on-card.
              Hairlines and air separate sections.

   Owns: page shell, top rail, hero, ledger, disclaimer, page rail, footer,
         language-menu restyle, cookie-info-banner restyle, RTL + Cairo.

   Reused from legal-core.css (shared with kontakt/datenschutz/AGB):
     * { box-sizing: border-box }, body padding+gradient, @font-face Cairo,
     anchor base color. Everything else is owned here under the
     body.impressum-page scope.
   ============================================================================= */

/* §1 — Scoped tokens (light only — page meta sets color-scheme: light) */
body.impressum-page {
  --imp-content-max: min(1120px, 100%);
  --imp-stack-gap: clamp(28px, 4vw, 44px);

  --imp-ink: #0f172a;
  --imp-ink-strong: #050b16;
  --imp-ink-muted: #5a6473;
  --imp-ink-subtle: #8a94a3;
  --imp-hairline: rgba(15, 23, 42, 0.10);
  --imp-hairline-strong: rgba(15, 23, 42, 0.18);

  --imp-accent: #1a73e8;
  --imp-accent-strong: #0f5bcc;
  --imp-accent-soft: rgba(26, 115, 232, 0.10);
  --imp-accent-soft-hover: rgba(26, 115, 232, 0.16);
  --imp-accent-on: #ffffff;

  --imp-radius-pill: 999px;
  --imp-radius-md: 12px;
  --imp-radius-sm: 8px;

  --imp-touch: 44px;
  --imp-touch-sm: 38px;

  --imp-cairo-stack: "Cairo", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --imp-system-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

/* §2 — Strip (additive, scoped). The previous attempt used
   `body.impressum-page * { all: revert !important }` which hid every svg/img.
   Replaced with: override the body essentials (font + ink) that legal-core
   sets, and rely on the new partial to simply NOT use card/grid/badge
   classes. The classes are still defined in legal-core.css for siblings;
   they're harmless because we don't apply them. */
body.impressum-page {
  color: var(--imp-ink);
  font-family: var(--imp-system-stack);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* §3 — Page shell + top rail.
   Specificity bumped to (0,3,0) via `body.impressum-page.page-shell` so we
   win over batch7-polish.css's `body.page-shell .page-width { max-width:
   100% }` rule which would otherwise un-constrain the content frame. */
body.impressum-page.page-shell .page-width,
body.impressum-page .page-width {
  width: 100%;
  max-width: var(--imp-content-max);
  margin-inline: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--imp-stack-gap);
}

body.impressum-page .skip-link {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: 12px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--imp-ink-strong);
  color: #fff;
  border-radius: var(--imp-radius-md);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.16s ease;
}
body.impressum-page .skip-link:focus {
  transform: translateY(0);
}

body.impressum-page .imp-toprail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
  border-block-end: 1px solid var(--imp-hairline);
}
body.impressum-page .imp-toprail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--imp-touch);
  padding-inline: 6px;
  color: var(--imp-ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--imp-radius-md);
  transition: color 0.16s ease;
}
body.impressum-page .imp-toprail__back:hover,
body.impressum-page .imp-toprail__back:focus-visible {
  color: var(--imp-accent-strong);
  outline: none;
}
body.impressum-page .imp-toprail__back-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* §4 — Hero block (identity-as-hero, per H1) */
body.impressum-page .imp-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body.impressum-page .imp-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--imp-ink-subtle);
}
body.impressum-page .imp-hero__eyebrow-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--imp-ink-subtle);
}
body.impressum-page .imp-hero__crest {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
body.impressum-page .imp-hero__logo {
  width: 56px;
  height: 56px;
  border-radius: var(--imp-radius-md);
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--imp-hairline);
  flex-shrink: 0;
  padding: 4px;
}
body.impressum-page .imp-hero__name {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--imp-ink-strong);
  word-break: break-word;
  overflow-wrap: anywhere;
  flex: 1 1 auto;
  min-width: 0;
}
body.impressum-page .imp-hero__byline {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--imp-ink-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}
body.impressum-page .imp-hero__byline span {
  display: block;
}
body.impressum-page .imp-hero__lead {
  margin: 4px 0 0;
  color: var(--imp-ink-muted);
  font-size: 1rem;
  max-width: 56ch;
}

body.impressum-page .imp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 6px;
}
body.impressum-page .imp-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--imp-touch);
  padding: 8px 18px;
  border-radius: var(--imp-radius-pill);
  background: var(--imp-accent-soft);
  color: var(--imp-accent-strong);
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.16s ease, transform 0.16s ease;
}
body.impressum-page .imp-action-pill:hover,
body.impressum-page .imp-action-pill:focus-visible {
  background: var(--imp-accent-soft-hover);
  transform: translateY(-1px);
  outline: none;
}
body.impressum-page .imp-action-pill__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* §5 — Ledger sections (eyebrow + key/value rows, hairlines only) */
body.impressum-page .imp-section {
  padding-block-start: var(--imp-stack-gap);
  border-block-start: 1px solid var(--imp-hairline);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body.impressum-page .imp-section__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--imp-ink-subtle);
}
body.impressum-page .imp-section__title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--imp-ink-strong);
}

body.impressum-page .imp-ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
body.impressum-page .imp-ledger__row {
  display: grid;
  grid-template-columns: minmax(140px, 32%) 1fr;
  gap: 12px 18px;
  align-items: baseline;
  padding-block: 12px;
  border-block-end: 1px solid var(--imp-hairline);
}
body.impressum-page .imp-ledger__row:last-child {
  border-block-end: 0;
}
body.impressum-page .imp-ledger__label {
  color: var(--imp-ink-muted);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
}
body.impressum-page .imp-ledger__value {
  color: var(--imp-ink-strong);
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.impressum-page .imp-ledger__value a {
  color: var(--imp-accent-strong);
  text-decoration: none;
  border-block-end: 1px solid currentColor;
  padding-block-end: 1px;
  transition: color 0.16s ease;
}
body.impressum-page .imp-ledger__value a:hover,
body.impressum-page .imp-ledger__value a:focus-visible {
  color: var(--imp-ink-strong);
  outline: none;
}
body.impressum-page .imp-ledger__value-secondary {
  display: block;
  margin-block-start: 2px;
  color: var(--imp-ink-muted);
  font-weight: 500;
  font-size: 0.92rem;
}

body.impressum-page .imp-responsible {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.impressum-page .imp-responsible__name {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--imp-ink-strong);
  letter-spacing: -0.005em;
}
body.impressum-page .imp-responsible__address {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--imp-ink-muted);
  font-size: 0.98rem;
}
body.impressum-page .imp-responsible__address span {
  display: block;
}

/* §6 — Disclaimer + page rail + footer note */
body.impressum-page .imp-disclaimer {
  max-width: 65ch;
  margin: 0;
  color: var(--imp-ink-muted);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

/* Footer block — mirrors the Kontakt page footer paradigm
   (centred plain-text links + small muted copyright line, no pills, no
   border chrome). Lives directly inside .page-width so it inherits the
   1120 px content cap. */
body.impressum-page .imp-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-block: 14px 6px;
  margin-block-start: 8px;
}
body.impressum-page .imp-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 18px;
}
body.impressum-page .imp-footer__link {
  color: var(--imp-ink-muted);
  font-weight: 400;
  font-size: 0.86rem;
  text-decoration: none;
  padding: 2px 0;
  background: transparent;
  border: 0;
  transition: color 0.16s ease;
}
body.impressum-page .imp-footer__link:hover,
body.impressum-page .imp-footer__link:focus-visible {
  color: var(--imp-ink-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  outline: none;
}
body.impressum-page .imp-footer__link[aria-current="page"] {
  color: var(--imp-ink);
  font-weight: 500;
}
body.impressum-page .imp-footer__note {
  margin: 0;
  text-align: center;
  color: var(--imp-ink-subtle);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  unicode-bidi: plaintext;
}
body.impressum-page .imp-footer__note strong {
  color: var(--imp-ink-muted);
  font-weight: 500;
}

/* Platform attribution ("Ein Service von gastrozukunft.de") is appended
   to the body by restaurant-profile.js with its own inline stylesheet
   capping it at 920 px. Bump to match our content width so the bottom
   row aligns with the rail + copyright above it. */
body.impressum-page .gz-platform-attribution {
  max-width: var(--imp-content-max);
}

/* §7 — Language menu (existing JS, restyled to fit the page) */
body.impressum-page .rt-lang-menu {
  position: relative;
  z-index: 40;
}
body.impressum-page .rt-lang-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--imp-touch-sm);
  padding: 6px 12px;
  border-radius: var(--imp-radius-pill);
  border: 1px solid var(--imp-hairline-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--imp-ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
body.impressum-page .rt-lang-menu__toggle:hover,
body.impressum-page .rt-lang-menu__toggle:focus-visible {
  border-color: var(--imp-accent);
  outline: none;
}
body.impressum-page .rt-lang-menu__toggle img {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}
body.impressum-page .rt-lang-menu__chevron {
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.16s ease;
}
body.impressum-page .rt-lang-menu[data-open="true"] .rt-lang-menu__chevron {
  transform: rotate(180deg);
}
body.impressum-page .rt-lang-menu__dropdown {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  inset-inline-start: auto;
  min-width: 200px;
  max-height: min(320px, 70vh);
  overflow: auto;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: var(--imp-radius-md);
  background: #ffffff;
  border: 1px solid var(--imp-hairline-strong);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}
body.impressum-page .rt-lang-menu[data-open="true"] .rt-lang-menu__dropdown {
  display: flex;
}
body.impressum-page .rt-lang-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--imp-touch);
  border: 0;
  padding: 8px 10px;
  border-radius: var(--imp-radius-sm);
  background: transparent;
  color: var(--imp-ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
}
body.impressum-page .rt-lang-menu__item img {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
}
body.impressum-page .rt-lang-menu__item[data-lang="ar"] {
  font-family: var(--imp-cairo-stack);
}
body.impressum-page .rt-lang-menu__item:hover,
body.impressum-page .rt-lang-menu__item:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}
body.impressum-page .rt-lang-menu__item[aria-current="true"] {
  background: var(--imp-accent-soft);
  color: var(--imp-accent-strong);
  font-weight: 700;
}

/* §8 — Cookie info banner (existing JS, restyled to match the page) */
body.impressum-page .cookie-info-banner {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 3000;
  display: none;
  padding-block: 14px;
  padding-block-end: calc(14px + env(safe-area-inset-bottom, 0px));
  padding-inline: clamp(16px, 4vw, 32px);
  background: #ffffff;
  border-block-start: 1px solid var(--imp-hairline-strong);
  box-shadow: 0 -16px 32px rgba(15, 23, 42, 0.10);
  color: var(--imp-ink);
}
body.impressum-page .cookie-info-banner--visible {
  display: block;
}
body.impressum-page .cookie-info-banner-inner {
  max-width: var(--imp-content-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
body.impressum-page .cookie-info-text {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--imp-ink);
}
body.impressum-page .cookie-info-text a {
  color: var(--imp-accent-strong);
  text-decoration: none;
  border-block-end: 1px solid currentColor;
}
body.impressum-page .cookie-info-text a:hover,
body.impressum-page .cookie-info-text a:focus-visible {
  color: var(--imp-ink-strong);
}
body.impressum-page .cookie-info-button {
  border: 0;
  border-radius: var(--imp-radius-pill);
  background: var(--imp-accent);
  color: var(--imp-accent-on);
  font-weight: 700;
  min-height: var(--imp-touch);
  padding: 10px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, transform 0.16s ease;
}
body.impressum-page .cookie-info-button:hover,
body.impressum-page .cookie-info-button:focus-visible {
  background: var(--imp-accent-strong);
  transform: translateY(-1px);
  outline: none;
}

/* §9 — Arabic / RTL overrides
   Per feedback_arabic_rtl_direction (zero-tolerance gate) and
   feedback_arabic_cairo_font: every Arabic glyph uses the locally-hosted
   Cairo font; every translateX / scaleX / chevron is mirrored. */
html[lang="ar"] body.impressum-page,
html[dir="rtl"] body.impressum-page,
body.impressum-page.cairo-font {
  font-family: var(--imp-cairo-stack);
}
html[lang="ar"] body.impressum-page button,
html[lang="ar"] body.impressum-page input,
html[lang="ar"] body.impressum-page select,
html[lang="ar"] body.impressum-page textarea,
html[dir="rtl"] body.impressum-page button,
html[dir="rtl"] body.impressum-page input,
html[dir="rtl"] body.impressum-page select,
html[dir="rtl"] body.impressum-page textarea {
  font-family: inherit;
}

/* Phone numbers + tel: action pill stay LTR per
   feedback_numbers_never_translated_arabic + bidi readability */
body.impressum-page .js-restaurant-phone,
body.impressum-page .imp-action-pill[href^="tel:"] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Mirror the back-arrow icon under RTL (forward = inline-end) */
html[dir="rtl"] body.impressum-page .imp-toprail__back-icon,
html[lang="ar"] body.impressum-page .imp-toprail__back-icon,
html.admin-lang-ar body.impressum-page .imp-toprail__back-icon {
  transform: scaleX(-1);
}

/* §10 — Mobile (≤640) — re-set every desktop property the rule cares
   about (per A12 — desktop leakage is the #1 redesign bug source). */
@media (max-width: 640px) {
  body.impressum-page {
    --imp-stack-gap: 26px;
  }
  body.impressum-page .page-width {
    gap: var(--imp-stack-gap);
  }
  body.impressum-page .imp-toprail {
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 4px;
  }
  body.impressum-page .imp-toprail__back {
    font-size: 0.92rem;
    min-height: var(--imp-touch);
    padding-inline: 6px;
  }
  body.impressum-page .rt-lang-menu__toggle [data-rt-lang-current] {
    display: none;
  }
  body.impressum-page .rt-lang-menu__toggle {
    min-height: var(--imp-touch-sm);
    padding: 6px 10px;
  }
  body.impressum-page .imp-hero__crest {
    gap: 12px;
  }
  body.impressum-page .imp-hero__logo {
    width: 48px;
    height: 48px;
  }
  body.impressum-page .imp-hero__name {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }
  body.impressum-page .imp-hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  body.impressum-page .imp-action-pill {
    justify-content: center;
    width: 100%;
    padding: 10px 18px;
  }
  body.impressum-page .imp-section {
    padding-block-start: var(--imp-stack-gap);
  }
  body.impressum-page .imp-ledger__row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-block: 14px;
  }
  body.impressum-page .imp-ledger__label {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  body.impressum-page .imp-footer__nav {
    gap: 4px 16px;
  }
  body.impressum-page .cookie-info-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  body.impressum-page .cookie-info-button {
    width: 100%;
    text-align: center;
  }
}

/* §11 — Reduced motion + focus rings */
@media (prefers-reduced-motion: reduce) {
  body.impressum-page *,
  body.impressum-page *::before,
  body.impressum-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body.impressum-page :focus-visible {
  outline: 2px solid var(--imp-accent);
  outline-offset: 2px;
  border-radius: var(--imp-radius-sm);
}
body.impressum-page .imp-action-pill:focus-visible,
body.impressum-page .imp-footer__link:focus-visible,
body.impressum-page .rt-lang-menu__toggle:focus-visible,
body.impressum-page .cookie-info-button:focus-visible {
  outline-offset: 3px;
}
