/* Rückweg-Zeile von ElbeDigitalMD über den Beispielseiten unter /beispiele/.
   Eine schmale Zeile unten links (rechts unten sitzt das Paketfenster der Demo):
   ‹ ElbeDigitalMD · „Beispielseite, erfundener Betrieb“ (klappt die Tafel auf) · Kostenloser Entwurf.
   Die Tafel öffnet nach oben: Hinweis, Entwurf, Impressum, Datenschutz, Bildnachweis.
   Handy (bis 860 px, dort hat jede Demo unten eine eigene Leiste): Rückweg und „Beispiel“ über der Leiste.
   Abstand über der Leiste: --edr-unten am <body>. */
@font-face { font-family: "EDR Inter"; src: url("../assets/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "EDR Inter"; src: url("../assets/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

.edr {
  --edr-grund: rgb(7 11 22 / .94);
  --edr-tinte: #e8eefc;
  --edr-tinte-2: #a9b6cf;
  --edr-linie: rgb(148 170 215 / .24);
  --edr-akzent: #2563eb;
  --edr-akzent-2: #1d4ed8;
  --edr-hell: #93c5fd;
  --edr-aus: cubic-bezier(.23, 1, .32, 1);
  position: fixed; z-index: 70; left: 1rem; bottom: 1rem;
  display: grid; grid-template-columns: auto auto auto; grid-template-areas: "tafel tafel tafel" "heim mehr cta";
  align-items: center; gap: 0 .25rem;
  max-width: calc(100vw - 2rem);
  padding: .3125rem;
  background: var(--edr-grund); color: var(--edr-tinte);
  -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid var(--edr-linie); border-radius: 999px;
  box-shadow: 0 1rem 2.25rem -1rem rgb(0 0 0 / .7);
  font: 500 .875rem/1.4 "EDR Inter", system-ui, sans-serif; letter-spacing: 0;
  text-align: left; -webkit-font-smoothing: antialiased;
  animation: edr-rein 700ms var(--edr-aus) 600ms both;
  transition: border-radius 250ms var(--edr-aus);
}
.edr.ist-offen { border-radius: 1.125rem; }
.edr *, .edr *::before, .edr *::after { box-sizing: border-box; }
.edr a { color: inherit; }
.edr svg { width: 1rem; height: 1rem; flex: none; }
.edr :focus-visible { outline: 2px solid var(--edr-hell); outline-offset: 2px; }
.sr-edr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.edr__heim, .edr__mehr, .edr__cta {
  display: flex; align-items: center; gap: .4375rem; min-height: 2.5rem; border-radius: 999px;
  white-space: nowrap; text-decoration: none;
  transition: background-color 200ms var(--edr-aus), color 200ms var(--edr-aus), transform 200ms var(--edr-aus);
}
.edr__heim { grid-area: heim; padding: 0 .75rem 0 .5rem; font-weight: 700; font-size: .9375rem; letter-spacing: -.01em; }
.edr__heim img { width: 1.4375rem; height: auto; }
.edr__heim:hover { background: rgb(255 255 255 / .07); }
.edr__pfeil { transition: transform 250ms var(--edr-aus); }
.edr__heim:hover .edr__pfeil { transform: translateX(-3px); }

.edr__mehr {
  all: unset; box-sizing: border-box; grid-area: mehr; cursor: pointer;
  display: flex; align-items: center; gap: .375rem; min-height: 2.5rem; padding: 0 .75rem; border-radius: 999px;
  color: var(--edr-tinte-2); font: 500 .8125rem/1 "EDR Inter", system-ui, sans-serif; white-space: nowrap;
  transition: background-color 200ms var(--edr-aus), color 200ms var(--edr-aus);
}
.edr__mehr:hover, .edr__mehr[aria-expanded="true"] { background: rgb(255 255 255 / .07); color: var(--edr-tinte); }
.edr__mehr:focus-visible { outline: 2px solid var(--edr-hell); outline-offset: 2px; }
.edr__mehr svg { transition: transform 250ms var(--edr-aus); }
.edr__mehr[aria-expanded="true"] svg { transform: rotate(180deg); }
.edr__kurz { display: none; }

.edr__cta { grid-area: cta; padding: 0 .875rem 0 1rem; background: var(--edr-akzent); color: #fff !important; font-weight: 700; font-size: .875rem; }
.edr__cta:hover { background: var(--edr-akzent-2); }
.edr__cta:hover svg, .edr__knopf:hover svg { transform: translateX(3px); }
.edr__cta svg, .edr__knopf svg { transition: transform 250ms var(--edr-aus); }
.edr__cta:active, .edr__knopf:active { transform: scale(.97); }

.edr__tafel { grid-area: tafel; display: none; gap: .75rem; width: 0; min-width: 100%; padding: .625rem .5rem .75rem; }
.edr.ist-offen .edr__tafel { display: grid; animation: edr-auf 320ms var(--edr-aus) both; }
.edr__hinweis { margin: 0; color: var(--edr-tinte-2); font-size: .8125rem; }
.edr__hinweis strong { display: block; margin-bottom: .125rem; color: var(--edr-tinte); font-weight: 700; font-size: .875rem; }
.edr__knopf {
  display: none; grid-template-columns: 1fr auto; align-items: center; column-gap: .75rem;
  padding: .625rem .875rem; border-radius: .75rem;
  background: var(--edr-akzent); color: #fff !important; text-decoration: none; font-size: .8125rem; line-height: 1.3;
  transition: background-color 200ms var(--edr-aus), transform 200ms var(--edr-aus);
}
.edr__knopf span { grid-column: 1; font-weight: 700; font-size: .9375rem; }
.edr__knopf svg { grid-column: 2; grid-row: 1 / span 2; }
.edr__knopf:hover { background: var(--edr-akzent-2); }
.edr__recht { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; font-size: .8125rem; }
.edr__recht a { color: var(--edr-tinte-2); text-decoration: underline; text-decoration-color: rgb(169 182 207 / .45); text-underline-offset: .2em; }
.edr__recht a:hover { color: var(--edr-tinte); text-decoration-color: currentColor; }

/* Eingeklappt: nur der runde Rückweg (Pfeil und Zeichen). Ganz, solange sie am Anfang kurz steht,
   am Fuß der Demo, beim Zeigen, mit Fokus oder bei offener Tafel. */
.edr__heim > span:not(.sr-edr), .edr__mehr, .edr__cta {
  max-width: 22rem; overflow: hidden;
  transition: max-width 450ms var(--edr-aus), opacity 250ms var(--edr-aus), padding 450ms var(--edr-aus), background-color 200ms var(--edr-aus), color 200ms var(--edr-aus);
}
.edr:not(.ist-voll):not(.ist-offen):not(:hover):not(:focus-within) { gap: 0; }
.edr:not(.ist-voll):not(.ist-offen):not(:hover):not(:focus-within) .edr__heim { padding: 0 .5rem; gap: .25rem; }
.edr:not(.ist-voll):not(.ist-offen):not(:hover):not(:focus-within) .edr__heim > span:not(.sr-edr),
.edr:not(.ist-voll):not(.ist-offen):not(:hover):not(:focus-within) .edr__mehr,
.edr:not(.ist-voll):not(.ist-offen):not(:hover):not(:focus-within) .edr__cta { max-width: 0; opacity: 0; padding-inline: 0; }
.edr:not(.ist-voll):not(.ist-offen):not(:hover):not(:focus-within) .edr__mehr,
.edr:not(.ist-voll):not(.ist-offen):not(:hover):not(:focus-within) .edr__cta { visibility: hidden; }

/* Platz unter dem Fuß der Demo, damit die Zeile dort nichts verdeckt */
body footer.fuss { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }

/* Solange das Paketfenster offen ist, tritt die Zeile zurück */
.stufen-offen .edr { opacity: 0; pointer-events: none; transform: translateY(.5rem); transition: opacity 200ms, transform 200ms; }

@keyframes edr-rein { from { opacity: 0; transform: translateY(.75rem); } to { opacity: 1; transform: none; } }
@keyframes edr-auf { from { opacity: 0; transform: translateY(.375rem); } to { opacity: 1; transform: none; } }

/* Schmale Rechner: Hinweis kurz, damit rechts das Paketfenster frei bleibt */
@media (max-width: 1180px) {
  .edr__lang { display: none; }
  .edr__kurz { display: inline; }
}
@media (max-width: 860px) {
  .edr {
    left: .625rem; bottom: calc(var(--edr-unten, 1rem) + env(safe-area-inset-bottom));
    max-width: calc(100vw - 1.25rem);
    grid-template-columns: auto auto; grid-template-areas: "tafel tafel" "heim mehr";
    padding: .25rem;
  }
  .edr.ist-offen { width: min(20rem, calc(100vw - 1.25rem)); grid-template-columns: 1fr auto; }
  .edr__heim { padding: 0 .625rem 0 .5rem; font-size: .875rem; }
  .edr__mehr { background: rgb(255 255 255 / .08); color: var(--edr-tinte); font-weight: 600; }
  .edr__cta { display: none; }
  .edr.ist-offen .edr__knopf { display: grid; }
  body footer.fuss { padding-bottom: calc(var(--edr-unten, 1rem) + 4.25rem + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .edr, .edr.ist-offen .edr__tafel { animation: none; }
  .edr, .edr * { transition: none !important; }
}
@media print { .edr { display: none; } }
