/*
 * New design (DesignV2, staging, every UI language) — area A: site header, mobile drawer and site footer
 * (components/v2/site-header + site-footer). Loaded after base.css while DesignV2::active(); every rule is scoped to
 * body.mm-v2. Unlayered on purpose: it overrides the layered app.css components (.mm-site-header, .mm-site-footer,
 * .mm-dropdown, .mm-drawer) without !important. One header for every layout (public, account, sitter, auth, flow,
 * minimal, and admin above its staff bar). Breakpoints: header bar ≥ 64em (wordmark from 85em), footer columns ≥ 48em (brand column
 * ≥ 64em). The labels differ in length per language (owner 2026-11-08: one layout in every language), so the bar's
 * fit is measured, not guessed per language: js/v2/header.js adds .v2-hdr--tight (no wordmark, tighter links) and then
 * .v2-hdr--collapsed (search + menu button as on phones) while the desktop bar would not fit; see "Fit" below.
 */

/* ---------- Header bar ---------- */
body.mm-v2 { --v2-line: #E7E1D2; }
@media (min-width: 64em) {
  body.mm-v2 { --mm-header-height: 6.5rem; }
  /* The root's scroll-padding-top (app.css) reads the token on <html>: give it the v2 header height as well, so focused
     elements and #anchors stop below the sticky header instead of under it (WCAG 2.4.11, local-optimization A07-03). */
  html:has(> body.mm-v2) { --mm-header-height: 6.5rem; }
  /* scroll-margin adds to scroll-padding: the root padding above already clears the header, so the base :target margin
     (app.css) would push #anchors a second header height down. */
  body.mm-v2 :target { scroll-margin-top: 0; }
}
body.mm-v2 .v2-hdr {
  position: sticky;
  top: 0;
  z-index: var(--mm-z-header);
  background: #fff;
  border-bottom: 1px solid var(--v2-line);
}
body.mm-v2 .v2-hdr__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(1200px, 100% - 2.5rem);
  min-height: var(--mm-header-height);
  margin-inline: auto;
}
body.mm-v2 .v2-hdr__brand {
  display: inline-flex;
  flex: none;
  padding: 2px;
  margin-inline-start: -2px;
  border-radius: var(--v2-radius-sm);
  text-decoration: none;
}
/* the big logo badge (64px, 92px on desktop) carries the brand in the bar */
body.mm-v2 .v2-hdr .v2-logo { gap: 0.85rem; }
body.mm-v2 .v2-hdr .v2-logo__mark { width: 64px; height: 64px; }
@media (min-width: 64em) {
  body.mm-v2 .v2-hdr .v2-logo__mark { width: 92px; height: 92px; }
  body.mm-v2 .v2-hdr .v2-logo__word { font-size: 2.4rem; }
}

/* Main navigation (desktop) */
body.mm-v2 .v2-hdr__nav { display: none; }
body.mm-v2 .v2-hdr__list { display: flex; align-items: center; gap: 0.125rem; margin: 0; padding: 0; list-style: none; }
body.mm-v2 .v2-hdr__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--v2-radius-sm);
  color: var(--mm-color-ink);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
body.mm-v2 .v2-hdr__link:hover { background: var(--v2-green-tint); color: var(--v2-green); }
body.mm-v2 .v2-hdr__link[aria-current="page"],
body.mm-v2 .v2-hdr__link[aria-current="true"] {
  color: var(--v2-green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}
body.mm-v2 .v2-hdr__link .mm-dropdown__chevron { width: 1rem; height: 1rem; }
body.mm-v2 .v2-hdr__menu[open] > .v2-hdr__link { background: var(--v2-green-tint); color: var(--v2-green); }

/* "Leistungen": flat menu — pictogram + one word per service, nothing else */
body.mm-v2 .v2-hdr__panel {
  min-width: 17.5rem;
  padding: 0.5rem;
  border-color: var(--v2-line);
  border-radius: var(--v2-radius);
  box-shadow: 0 14px 36px rgb(29 55 46 / 0.14), 0 2px 6px rgb(29 55 46 / 0.06);
}
body.mm-v2 .v2-hdr__services { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
body.mm-v2 .v2-hdr__service {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: 12px;
  color: var(--mm-color-ink);
  font-weight: 600;
  text-decoration: none;
}
body.mm-v2 .v2-hdr__service:hover { background: var(--v2-cream); color: var(--v2-green); }
body.mm-v2 .v2-hdr__service[aria-current="page"] { background: var(--v2-green-tint); color: var(--v2-green); font-weight: 700; }

/* Right-hand actions (the bell is a plain link while its menu has no items: same round button as inbox/search) */
body.mm-v2 .v2-hdr__actions { display: flex; align-items: center; gap: 0.375rem; margin-inline-start: auto; }
body.mm-v2 .v2-hdr__icon,
body.mm-v2 a.v2-hdr__bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--v2-green-tint-border);
  border-radius: 999px;
  background: #fff;
  color: var(--v2-green);
  text-decoration: none;
}
body.mm-v2 .v2-hdr__icon:hover, body.mm-v2 a.v2-hdr__bell:hover { background: var(--v2-green-tint); color: var(--v2-green-hover); }
body.mm-v2 .v2-hdr__icon .mm-icon, body.mm-v2 a.v2-hdr__bell .mm-icon { width: 1.375rem; height: 1.375rem; }
body.mm-v2 .v2-hdr__icon .mm-count, body.mm-v2 a.v2-hdr__bell .mm-count { top: -4px; right: -4px; }
body.mm-v2 .v2-hdr__icon .mm-count--inline { position: absolute; top: -4px; right: -4px; box-shadow: 0 0 0 2px #fff; }
body.mm-v2 .v2-hdr__bell > summary {
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--v2-green-tint-border);
  border-radius: 999px;
  color: var(--v2-green);
}
body.mm-v2 .v2-hdr__bell > summary .mm-count { top: -4px; right: -4px; }
body.mm-v2 .v2-hdr__lang > summary {
  min-height: 44px;
  padding: 0.5rem 0.625rem;
  border-radius: var(--v2-radius-sm);
  color: var(--mm-color-ink);
  font-weight: 600;
}
body.mm-v2 .v2-hdr__lang > summary .mm-icon:first-child { width: 1.25rem; height: 1.25rem; color: var(--v2-green); }
body.mm-v2 .v2-hdr__account > summary { min-height: 44px; padding: 0.25rem 0.375rem 0.25rem 0.25rem; border-radius: 999px; border: 1px solid var(--v2-green-tint-border); }
body.mm-v2 .v2-hdr__signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--v2-radius-sm);
  color: var(--mm-color-ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
body.mm-v2 .v2-hdr__signin:hover { color: var(--v2-green); text-decoration: underline; text-underline-offset: 0.25em; }
/* "Registrieren": outlined, so the page's own main action stays the ONE solid button on screen (principle 3) */
body.mm-v2 .v2-hdr__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--v2-green);
  border-radius: var(--v2-radius-sm);
  background: #fff;
  color: var(--v2-green);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
body.mm-v2 .v2-hdr__cta:hover { background: var(--v2-green-tint); border-color: var(--v2-green-hover); color: var(--v2-green-hover); }
body.mm-v2 .v2-hdr__cta:active { background: var(--v2-green-tint-border); border-color: var(--v2-green-active); color: var(--v2-green-active); }

/* Mobile ↔ desktop */
@media (max-width: 63.99em) {
  body.mm-v2 .v2-hdr__desktop { display: none; }
}
/* Phones: the badge alone names the brand where badge + wordmark + icon buttons would overflow the bar (the wordmark is
   aria-hidden). Guests (search + menu) need ~455px with the wordmark; signed in, inbox + bell need ~560px. */
@media (max-width: 28.74em) {
  body.mm-v2 .v2-hdr .v2-hdr__brand .v2-logo__word { display: none; }
}
@media (max-width: 35.99em) {
  body.mm-v2 .v2-hdr--signed-in .v2-logo__word { display: none; }
}
@media (min-width: 64em) {
  body.mm-v2 .v2-hdr__mobile { display: none; }
  body.mm-v2 .v2-hdr__nav { display: block; margin-inline-start: 1rem; }
  body.mm-v2 .v2-hdr__bar { gap: 0.75rem; }
}
/* the large badge needs the wordmark's room on narrow desktops */
@media (min-width: 64em) and (max-width: 84.99em) { /* wordmark hidden while the 5 nav links need the room (Ratgeber added) */
  body.mm-v2 .v2-hdr__brand .v2-logo__word { display: none; }
}
@media (min-width: 64em) and (max-width: 69.99em) {
  body.mm-v2 .v2-hdr__nav { margin-inline-start: 0.5rem; }
}

/* Fit (owner 2026-11-08, every language): a too-long bar must never push "Registrieren" off screen.
   Without JS the nav may shrink and its links wrap onto a second row (taller bar, nothing hidden or clipped).
   With JS (header.js) the bar stays one row: first .v2-hdr--tight, then .v2-hdr--collapsed = the phone header
   (search + menu buttons, every link in the drawer), where the wordmark has room again. */
body.mm-v2 .v2-hdr__nav { min-width: 0; }
@media (min-width: 64em) {
  body.mm-v2 .v2-hdr__list { flex-wrap: wrap; }
  body.mm-v2 .v2-hdr--tight .v2-hdr__brand .v2-logo__word { display: none; }
  body.mm-v2 .v2-hdr--tight .v2-hdr__nav { margin-inline-start: 0.25rem; }
  body.mm-v2 .v2-hdr--tight .v2-hdr__link { padding-inline: 0.5rem; }
  body.mm-v2 .v2-hdr--tight .v2-hdr__lang > summary,
  body.mm-v2 .v2-hdr--tight .v2-hdr__signin { padding-inline: 0.5rem; }
  body.mm-v2 .v2-hdr--collapsed .v2-hdr__nav,
  body.mm-v2 .v2-hdr--collapsed .v2-hdr__desktop { display: none; }
  body.mm-v2 .v2-hdr--collapsed .v2-hdr__mobile { display: inline-grid; }
  body.mm-v2 .v2-hdr--collapsed .v2-hdr__brand .v2-logo__word { display: inline; }
}

/* ---------- Mobile drawer ---------- */
body.mm-v2 .v2-drawer { width: min(23rem, calc(100vw - 2.5rem)); }
body.mm-v2 .v2-drawer .mm-drawer__header { border-bottom-color: var(--v2-line); }
body.mm-v2 .v2-drawer .mm-drawer__title { font-size: 1.125rem; }
body.mm-v2 .v2-drawer .mm-drawer__body { padding: 0.75rem 1rem 1rem; }
body.mm-v2 .v2-drawer__nav { gap: 2px; }
body.mm-v2 .v2-drawer .mm-mobile-nav__link,
body.mm-v2 .v2-drawer .mm-mobile-nav__summary { min-height: 3rem; border-radius: 12px; }
body.mm-v2 .v2-drawer .mm-mobile-nav__link > .mm-icon,
body.mm-v2 .v2-drawer .mm-mobile-nav__summary > .mm-icon:first-child { color: var(--v2-green); }
body.mm-v2 .v2-drawer .mm-mobile-nav__link:hover,
body.mm-v2 .v2-drawer .mm-mobile-nav__summary:hover { background: var(--v2-cream); }
body.mm-v2 .v2-drawer .mm-mobile-nav__link[aria-current="page"],
body.mm-v2 .v2-drawer .mm-mobile-nav__link[aria-current="true"] { background: var(--v2-green-tint); color: var(--v2-green); box-shadow: inset 3px 0 0 var(--v2-green); }
body.mm-v2 .v2-drawer__step[open] > .mm-mobile-nav__summary { color: var(--v2-green); }
body.mm-v2 .v2-drawer__services { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0.125rem 0 0.5rem 0.75rem; list-style: none; }
body.mm-v2 .v2-drawer__service { gap: 0.75rem; min-height: 2.875rem; padding-block: 0.375rem; font-weight: 600; }
body.mm-v2 .v2-drawer__lang .mm-mobile-nav__summary .mm-dropdown__chevron { margin-inline-start: 0.25rem; }
body.mm-v2 .v2-drawer__current { margin-inline-start: auto; color: var(--mm-color-ink-muted); font-weight: 500; }
body.mm-v2 .v2-drawer__lang .mm-locale-list { padding: 0 0 0.5rem 0.75rem; }
/* The step's own summary already says "Sprache"; the list heading stays for aria-labelledby only. */
body.mm-v2 .v2-drawer__lang .mm-mobile-nav__heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body.mm-v2 .v2-drawer .mm-drawer__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--v2-line);
}
body.mm-v2 .v2-drawer__signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--v2-green);
  border-radius: var(--v2-radius-sm);
  color: var(--v2-green);
  font-weight: 700;
  text-decoration: none;
}
body.mm-v2 .v2-drawer__signin:hover { background: var(--v2-green-tint); }

/* ---------- Focused flows: the exit under the shared header ---------- */
body.mm-v2 .v2-flow__exit { display: flex; justify-content: flex-end; padding-top: 1rem; }

/* ---------- Back office: the staff bar under the shared header ---------- */
/* The shared header is the one sticky bar; the staff bar scrolls away and the sticky admin sidebar starts below
   the header instead of at the viewport top. */
@media (min-width: 64em) {
  body.mm-v2 .mm-workspace--admin .mm-workspace__nav {
    top: calc(var(--mm-header-height) + 1rem);
    max-height: calc(100vh - var(--mm-header-height) - 2rem);
  }
}

/* ---------- Footer ---------- */
body.mm-v2 .v2-ftr {
  --v2-ftr-ink: #1B3A36;
  --v2-ftr-muted: #46605A;
  --v2-ftr-line: rgb(27 58 54 / 0.14);
  margin-top: auto;
  padding-block: 2.25rem 1.5rem;
  background: #DDE8E0;
  color: var(--v2-ftr-ink);
}
body.mm-v2 .v2-ftr a { color: var(--v2-ftr-ink); text-decoration: none; }
body.mm-v2 .v2-ftr a:hover { color: var(--v2-ftr-ink); text-decoration: underline; text-underline-offset: 0.2em; }
body.mm-v2 .v2-ftr a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--v2-green); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
body.mm-v2 .v2-ftr :focus-visible { outline: 3px solid var(--v2-green-active); outline-offset: 2px; }
body.mm-v2 .v2-ftr__inner { display: grid; gap: 1.5rem; width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
body.mm-v2 .v2-ftr__logo { display: inline-flex; border-radius: var(--v2-radius-sm); }
body.mm-v2 .v2-ftr__logo:hover { text-decoration: none; }
body.mm-v2 .v2-ftr__claim { margin: 0.75rem 0 0; color: var(--v2-ftr-muted); font-size: 0.9375rem; }

/* Link groups: collapsible on mobile */
body.mm-v2 .v2-ftr__groups { display: grid; border-top: 1px solid var(--v2-ftr-line); }
body.mm-v2 .v2-ftr__group { border-bottom: 1px solid var(--v2-ftr-line); }
body.mm-v2 .v2-ftr__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  list-style: none;
  cursor: pointer;
}
body.mm-v2 .v2-ftr__summary::-webkit-details-marker { display: none; }
body.mm-v2 .v2-ftr__heading { margin: 0; font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--v2-green); }
body.mm-v2 .v2-ftr__chevron { flex: none; width: 1.25rem; height: 1.25rem; color: var(--v2-ftr-ink); transition: transform 0.2s ease; }
body.mm-v2 .v2-ftr__group[open] > .v2-ftr__summary .v2-ftr__chevron { transform: rotate(180deg); }
body.mm-v2 .v2-ftr__list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0 0 0.875rem; list-style: none; }
body.mm-v2 .v2-ftr__list a { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; font-size: 0.9375rem; }
body.mm-v2 .v2-ftr__service .v2-svc__tile { border-color: transparent; }

/* Legal links (always visible) + country/language + copyright */
body.mm-v2 .v2-ftr__bottom { display: grid; gap: 1rem; }
body.mm-v2 .v2-ftr__legal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}
body.mm-v2 .v2-ftr__legal-list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--v2-ftr-muted); }
body.mm-v2 .v2-ftr__legal-list a:hover { color: var(--v2-ftr-ink); }
body.mm-v2 .v2-ftr__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; font-size: 0.875rem; }
body.mm-v2 .v2-ftr__locale {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.875rem;
  border: 1px solid var(--v2-ftr-line);
  border-radius: 999px;
}
body.mm-v2 .v2-ftr__locale .mm-icon { width: 1.125rem; height: 1.125rem; }
body.mm-v2 .v2-ftr__locale:hover { border-color: var(--v2-ftr-muted); text-decoration: none; }
body.mm-v2 .v2-ftr__copy { margin: 0; color: var(--v2-ftr-muted); }

@media (min-width: 48em) {
  body.mm-v2 .v2-ftr { padding-block: 3rem 1.75rem; }
  body.mm-v2 .v2-ftr__inner { row-gap: 2rem; }
  body.mm-v2 .v2-ftr__groups { grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)); gap: 2rem; border-top: 0; }
  body.mm-v2 .v2-ftr__group { border-bottom: 0; }
  /* Open columns here; without JS current browsers show the content of a closed group too. */
  body.mm-v2 .v2-ftr__group::details-content { content-visibility: visible; }
  body.mm-v2 .v2-ftr__summary { min-height: 0; margin-bottom: 0.5rem; cursor: default; }
  body.mm-v2 .v2-ftr__chevron { display: none; }
  body.mm-v2 .v2-ftr__list { padding: 0; }
  body.mm-v2 .v2-ftr__bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--v2-ftr-line);
  }
  body.mm-v2 .v2-ftr__legal-list { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
}
@media (min-width: 64em) {
  body.mm-v2 .v2-ftr__inner { grid-template-columns: 15rem minmax(0, 1fr); column-gap: 3rem; }
  body.mm-v2 .v2-ftr__bottom { grid-column: 1 / -1; }
}

/* Wordmark + 5 nav links (Ratgeber) + actions need more than the 1200px content width:
   on wide screens the bar may grow a little and the links/wordmark are a touch tighter. */
@media (min-width: 85em) {
  body.mm-v2 .v2-hdr__bar { width: min(1300px, 100% - 2.5rem); gap: 0.5rem; }
  body.mm-v2 .v2-hdr__nav { margin-inline-start: 0.5rem; }
  body.mm-v2 .v2-hdr__link { padding-inline: 0.625rem; }
  body.mm-v2 .v2-hdr .v2-logo__word { font-size: 2.1rem; }
}

/* 1024–1119 px (owner QA 2026-11-08): with the Ratgeber link the bar overflowed by ~15 px at 1024 –
   a slightly smaller badge and tighter links keep "Registrieren" inside the viewport. */
@media (min-width: 64em) and (max-width: 69.99em) {
  body.mm-v2 .v2-hdr__link { padding-inline: 0.5rem; }
  body.mm-v2 .v2-hdr .v2-logo__mark { width: 72px; height: 72px; }
}
