/*
 * Pop-up fuer aktuelle Hinweise - gehoert zu assets/js/popup.js.
 *
 * Eigenes Stylesheet statt Tailwind-Klassen: Die Seite liefert nur Klassen aus, die beim
 * Bauen im Quelltext standen; dieses Fenster soll ohne neuen Tailwind-Lauf vollstaendig sein.
 * Farben und Schrift kommen aus den Variablen der Seite (assets/css/tailwind.css) und folgen
 * damit den Hausfarben aus dem Redaktionsbereich.
 *
 * Aufbau:  .sp-popup (Vorlage, Farbe, Zustand)
 *            .sp-popup__backdrop      Schleier, nur bei .sp-popup--modal
 *            .sp-popup__card          Karte; ihre Breite steuert das Innenleben (@container)
 *              .sp-popup__x           Schliessen
 *              .sp-popup__inner       Bild + Text
 * Zustaende: .is-open (eingeblendet), .is-closing (blendet aus)
 */

.sp-popup {
  --sp-accent: var(--color-primary, #2980b9);
  --sp-accent-strong: var(--sp-accent);
  --sp-accent-soft: #eef1f4;
  --sp-ink: var(--color-secondary, #1c1917);
  --sp-ink-soft: #4a5260;
  --sp-surface: #fdfdfe;
  --sp-line: #e2e5ea;
  --sp-night: #12151b;
  --sp-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sp-ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --sp-radius: 6px;
  --sp-width: 400px;

  position: fixed;
  z-index: 70; /* ueber Kopfzeile und Cookie-Hinweis (50), unter der Barrierefreiheits-Hilfe (90) */
  right: 24px;
  bottom: 24px;
  width: min(var(--sp-width), calc(100vw - 48px));
  font-family: var(--font-body, "Inter", system-ui, sans-serif);
  color: var(--sp-ink);
  line-height: 1.5;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.sp-popup--c-fbh { --sp-accent: var(--color-fbh, #d1041b); }
.sp-popup--c-wp { --sp-accent: var(--color-wp, #3ca333); }
.sp-popup--c-fliesen { --sp-accent: var(--color-fliesen, #647985); }
.sp-popup--c-bad { --sp-accent: var(--color-bad, #005ba8); }

/* Weisse Schrift auf der Bereichsfarbe braucht mehr Kontrast, als das Gruen und das Blau von sich aus haben. */
@supports (color: color-mix(in srgb, red, blue)) {
  .sp-popup {
    --sp-accent-strong: color-mix(in srgb, var(--sp-accent) 80%, #000);
    --sp-accent-soft: color-mix(in srgb, var(--sp-accent) 9%, #fff);
  }
}

.sp-popup *,
.sp-popup *::before,
.sp-popup *::after {
  box-sizing: border-box;
}

/* ---- Das Fenster verdeckt die Seite (Rechner, Vorlagen split und poster) ---- */

.sp-popup--modal {
  inset: 0;
  z-index: 95;
  width: auto;
  display: grid;
  place-items: center;
  padding: 24px;
}

.sp-popup__backdrop {
  display: none;
}

.sp-popup--modal .sp-popup__backdrop {
  display: block;
  position: absolute;
  inset: 0;
  background: rgb(14 17 22 / 0.64);
  opacity: 0;
  transition: opacity 0.45s ease-out;
}

@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .sp-popup--modal .sp-popup__backdrop {
    background: rgb(14 17 22 / 0.5);
    -webkit-backdrop-filter: blur(7px) saturate(0.85);
    backdrop-filter: blur(7px) saturate(0.85);
  }
}

html.sp-popup-lock,
html.sp-popup-lock body {
  overflow: hidden;
}

/* In der Vorschau des Redaktionsbereichs soll nichts anderes ueber der Seite liegen. */
html.sp-popup-previewing [data-cookie-banner] {
  display: none !important;
}

/* ---- Karte ---- */

.sp-popup__card {
  position: relative;
  container: sp / inline-size;
  width: 100%;
  max-height: min(78vh, 640px);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
  box-shadow:
    0 1px 2px rgb(16 24 40 / 0.06),
    0 14px 30px -8px rgb(16 24 40 / 0.2),
    0 44px 90px -24px rgb(16 24 40 / 0.34);
  overflow: hidden;
  outline: none;
  opacity: 0;
  transform: translate3d(36px, 0, 0);
  transition:
    opacity 0.5s var(--sp-ease),
    transform 0.75s var(--sp-ease);
  will-change: transform, opacity;
}

.sp-popup--modal .sp-popup__card {
  width: min(var(--sp-width), 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  transform: translate3d(0, 30px, 0) scale(0.965);
}

.sp-popup__inner {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ---- Schliessen ---- */

.sp-popup__x {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sp-ink);
  cursor: pointer;
  opacity: 0;
  transform: rotate(-90deg) scale(0.8);
  transition:
    opacity 0.35s ease-out 0.45s,
    transform 0.6s var(--sp-ease) 0.45s;
  -webkit-tap-highlight-color: transparent;
}

/* Sichtbare Scheibe 36 px, Tippflaeche 44 px. */
.sp-popup__x::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fdfdfe;
  box-shadow:
    0 0 0 1px rgb(16 24 40 / 0.08),
    0 2px 8px rgb(16 24 40 / 0.22);
  transition: transform 0.2s var(--sp-ease);
}

.sp-popup__x svg {
  position: relative;
}

.sp-popup__x:hover::before {
  transform: scale(1.08);
}

.sp-popup__x:active::before {
  transform: scale(0.94);
}

/* ---- Bild ---- */

.sp-popup__media {
  position: relative;
  overflow: hidden;
  background: var(--sp-accent-soft);
  -webkit-clip-path: var(--sp-clip, inset(0 0 100% 0));
  clip-path: var(--sp-clip, inset(0 0 100% 0));
  transition:
    clip-path 0.95s var(--sp-ease) 0.08s,
    -webkit-clip-path 0.95s var(--sp-ease) 0.08s;
}

.sp-popup__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: scale(1.14);
  transition: transform 1.5s var(--sp-ease) 0.08s;
}

/* Grafik, Logo oder freigestelltes PNG: ganz zeigen statt zuschneiden. */
.sp-popup--contain .sp-popup__img {
  inset: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  object-fit: contain;
}

/* ---- Text ---- */

.sp-popup__body {
  position: relative;
  padding: 20px 20px 22px;
}

.sp-popup__rise {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.55s ease-out calc(0.2s + var(--d, 0) * 0.075s),
    transform 0.8s var(--sp-ease) calc(0.2s + var(--d, 0) * 0.075s);
}

.sp-popup__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sp-accent-strong);
}

/* Kurzer Strich vor der kleinen Ueberschrift; er wird beim Einblenden gezogen. */
.sp-popup__mark {
  flex: none;
  width: 26px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s var(--sp-ease) 0.35s;
}

.sp-popup__title {
  margin: 0 0 10px;
  font-family: var(--font-heading, "Inter", system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--sp-ink);
  text-wrap: balance;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.sp-popup__word {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.sp-popup__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sp-ink-soft);
  max-width: 46ch;
}

.sp-popup__text p {
  margin: 0;
}

.sp-popup__text p + p {
  margin-top: 0.6em;
}

.sp-popup__text strong {
  font-weight: 600;
  color: var(--sp-ink);
}

.sp-popup__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 18px;
}

.sp-popup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 4px;
  background: var(--sp-accent-strong);
  color: #fdfdfe;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition:
    filter 0.2s ease-out,
    transform 0.2s var(--sp-ease);
}

.sp-popup__cta svg {
  flex: none;
  transition: transform 0.3s var(--sp-ease);
}

.sp-popup__cta:hover {
  filter: brightness(1.1);
}

.sp-popup__cta:hover svg {
  transform: translateX(4px);
}

.sp-popup__cta:active {
  transform: scale(0.98);
}

.sp-popup__link,
.sp-popup__later {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
}

.sp-popup__link {
  color: var(--sp-ink);
  text-decoration: underline;
  text-decoration-color: rgb(28 25 23 / 0.3);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease-out;
}

.sp-popup__link:hover {
  text-decoration-color: currentColor;
}

.sp-popup__later {
  color: var(--sp-ink-soft);
  transition: color 0.2s ease-out;
}

.sp-popup__later:hover {
  color: var(--sp-ink);
}

.sp-popup__x:focus-visible,
.sp-popup__cta:focus-visible,
.sp-popup__link:focus-visible,
.sp-popup__later:focus-visible {
  outline: 2px solid var(--sp-accent-strong);
  outline-offset: 3px;
}

/* ---- Eingeblendet ---- */

.sp-popup.is-open .sp-popup__backdrop {
  opacity: 1;
}

.sp-popup.is-open .sp-popup__card {
  opacity: 1;
  transform: none;
}

.sp-popup.is-open .sp-popup__x,
.sp-popup.is-closing .sp-popup__x {
  opacity: 1;
  transform: none;
}

.sp-popup.is-open .sp-popup__media,
.sp-popup.is-closing .sp-popup__media {
  -webkit-clip-path: inset(0 0 0 0);
  clip-path: inset(0 0 0 0);
}

.sp-popup.is-open .sp-popup__img,
.sp-popup.is-closing .sp-popup__img,
.sp-popup.is-open .sp-popup__mark,
.sp-popup.is-closing .sp-popup__mark,
.sp-popup.is-open .sp-popup__rise,
.sp-popup.is-closing .sp-popup__rise {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---- Blendet aus: nur Karte und Schleier, schneller als das Einblenden ---- */

.sp-popup.is-closing .sp-popup__backdrop {
  opacity: 0;
  transition: opacity 0.22s ease-in;
}

.sp-popup.is-closing .sp-popup__card {
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.985);
  transition:
    opacity 0.2s var(--sp-ease-in),
    transform 0.22s var(--sp-ease-in);
}

/* =============================================================================
 * Vorlage 1 "split": Bild neben Text
 * ========================================================================== */

.sp-popup--split {
  --sp-width: 880px;
}

.sp-popup--split .sp-popup__media {
  height: clamp(96px, 16vh, 136px);
}

/* Ohne Bild schmaler, sonst steht der Text verloren in einer breiten Flaeche. */
.sp-popup--split.sp-popup--no-image {
  --sp-width: 640px;
}

.sp-popup--split.sp-popup--no-image .sp-popup__body {
  padding-top: 26px;
}

.sp-popup--no-image .sp-popup__eyebrow,
.sp-popup--no-image .sp-popup__title {
  padding-right: 44px;
}

@container sp (min-width: 620px) {
  .sp-popup--split .sp-popup__inner {
    display: grid;
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
    min-height: 440px;
  }

  .sp-popup--split.sp-popup--no-image .sp-popup__inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .sp-popup--split .sp-popup__media {
    --sp-clip: inset(0 100% 0 0);
    height: auto;
  }

  .sp-popup--split .sp-popup__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 48px 48px;
  }

  .sp-popup--split.sp-popup--no-image .sp-popup__body {
    padding: 52px 56px 48px;
  }

  .sp-popup--split .sp-popup__eyebrow {
    margin-bottom: 16px;
    padding-right: 28px;
  }

  .sp-popup--split .sp-popup__title {
    margin-bottom: 16px;
    padding-right: 0;
    font-size: 1.875rem;
    line-height: 1.14;
    letter-spacing: -0.025em;
  }

  .sp-popup--split .sp-popup__text {
    font-size: 1rem;
  }

  .sp-popup--split .sp-popup__actions {
    margin-top: 28px;
  }
}

/* =============================================================================
 * Vorlage 2 "poster": Text auf dem Bild
 * ========================================================================== */

.sp-popup--poster {
  --sp-width: 760px;
}

.sp-popup--poster .sp-popup__card {
  background: var(--sp-night);
}

.sp-popup--poster .sp-popup__inner {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 300px;
}

.sp-popup--poster .sp-popup__media {
  --sp-clip: inset(0 0 0 0);
  position: absolute;
  inset: 0;
  background: var(--sp-night);
}

.sp-popup--poster .sp-popup__img {
  filter: blur(16px);
  transform: scale(1.12);
  transition:
    filter 1.1s ease-out,
    transform 1.8s var(--sp-ease);
}

/* Abdunklung, damit weisse Schrift auf jedem Foto lesbar bleibt. */
.sp-popup--poster .sp-popup__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(14 17 22 / 0.94) 0%, rgb(14 17 22 / 0.78) 34%, rgb(14 17 22 / 0.28) 68%, rgb(14 17 22 / 0.1) 100%),
    linear-gradient(to right, rgb(14 17 22 / 0.42) 0%, rgb(14 17 22 / 0) 60%);
}

.sp-popup--poster .sp-popup__body {
  padding: 96px 20px 22px;
}

.sp-popup--poster .sp-popup__eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 3px;
  background: var(--sp-accent-strong);
  color: #fdfdfe;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
}

.sp-popup--poster .sp-popup__mark {
  display: none;
}

.sp-popup--poster .sp-popup__title {
  color: #fdfdfe;
  font-size: 1.5rem;
  line-height: 1.12;
}

/* Die Woerter der Ueberschrift steigen nacheinander auf. */
.sp-popup--poster .sp-popup__title.sp-popup__rise {
  opacity: 1;
  transform: none;
}

.sp-popup--poster .sp-popup__word {
  opacity: 0;
  transform: translate3d(0, 0.6em, 0);
  transition:
    opacity 0.5s ease-out calc(0.3s + var(--w, 0) * 0.045s),
    transform 0.85s var(--sp-ease) calc(0.3s + var(--w, 0) * 0.045s);
}

.sp-popup--poster.is-open .sp-popup__word,
.sp-popup--poster.is-closing .sp-popup__word {
  opacity: 1;
  transform: none;
}

.sp-popup--poster .sp-popup__text {
  color: rgb(253 253 254 / 0.88);
}

.sp-popup--poster .sp-popup__text strong {
  color: #fdfdfe;
}

.sp-popup--poster .sp-popup__link {
  color: #fdfdfe;
  text-decoration-color: rgb(253 253 254 / 0.45);
}

.sp-popup--poster .sp-popup__later {
  color: rgb(253 253 254 / 0.78);
}

.sp-popup--poster .sp-popup__later:hover {
  color: #fdfdfe;
}

.sp-popup--poster .sp-popup__cta:focus-visible,
.sp-popup--poster .sp-popup__link:focus-visible,
.sp-popup--poster .sp-popup__later:focus-visible {
  outline-color: #fdfdfe;
}

/* Ohne Bild: die Flaeche IST die Farbe. */
.sp-popup--poster.sp-popup--no-image .sp-popup__card {
  background:
    radial-gradient(90% 120% at 100% 0%, rgb(255 255 255 / 0.2) 0%, rgb(255 255 255 / 0) 55%),
    radial-gradient(70% 90% at 0% 100%, rgb(0 0 0 / 0.26) 0%, rgb(0 0 0 / 0) 60%),
    var(--sp-accent-strong);
}

.sp-popup--poster.sp-popup--no-image .sp-popup__inner {
  min-height: 0;
}

.sp-popup--poster.sp-popup--no-image .sp-popup__body {
  padding-top: 30px;
}

.sp-popup--poster.sp-popup--no-image .sp-popup__eyebrow {
  background: rgb(255 255 255 / 0.18);
}

.sp-popup--poster.sp-popup--no-image .sp-popup__cta {
  background: #fdfdfe;
  color: var(--sp-ink);
}

/* Grafik oder freigestelltes PNG: steht oben auf einer Buehne in der Bereichsfarbe, der Text darunter. */
.sp-popup--poster.sp-popup--contain .sp-popup__inner {
  display: block;
  min-height: 0;
}

.sp-popup--poster.sp-popup--contain .sp-popup__media {
  position: relative;
  inset: auto;
  height: clamp(140px, 26vh, 220px);
  background:
    radial-gradient(80% 110% at 50% 100%, rgb(255 255 255 / 0.22) 0%, rgb(255 255 255 / 0) 62%),
    var(--sp-accent-strong);
}

.sp-popup--poster.sp-popup--contain .sp-popup__media::after {
  display: none;
}

.sp-popup--poster.sp-popup--contain .sp-popup__img {
  filter: blur(10px) drop-shadow(0 18px 22px rgb(0 0 0 / 0.3));
  transform: translate3d(0, 18px, 0) scale(0.96);
}

.sp-popup--poster.sp-popup--contain.is-open .sp-popup__img,
.sp-popup--poster.sp-popup--contain.is-closing .sp-popup__img {
  filter: drop-shadow(0 18px 22px rgb(0 0 0 / 0.3));
  transform: none;
}

.sp-popup--poster.sp-popup--contain .sp-popup__body {
  padding-top: 22px;
}

@container sp (min-width: 620px) {
  .sp-popup--poster .sp-popup__inner {
    min-height: min(500px, calc(100vh - 48px));
  }

  .sp-popup--poster .sp-popup__body {
    max-width: 38rem;
    padding: 160px 48px 44px;
  }

  .sp-popup--poster .sp-popup__eyebrow {
    margin-bottom: 18px;
  }

  .sp-popup--poster .sp-popup__title {
    margin-bottom: 16px;
    font-size: 2.5rem;
    line-height: 1.06;
    letter-spacing: -0.03em;
  }

  .sp-popup--poster .sp-popup__text {
    font-size: 1.0625rem;
    max-width: 50ch;
  }

  .sp-popup--poster .sp-popup__actions {
    margin-top: 28px;
  }

  .sp-popup--poster.sp-popup--no-image .sp-popup__inner,
  .sp-popup--poster.sp-popup--contain .sp-popup__inner {
    min-height: 0;
  }

  .sp-popup--poster.sp-popup--no-image .sp-popup__body {
    padding: 64px 56px 52px;
  }

  .sp-popup--poster.sp-popup--contain .sp-popup__media {
    height: 260px;
  }

  .sp-popup--poster.sp-popup--contain .sp-popup__body {
    padding: 36px 48px 44px;
  }
}

/* =============================================================================
 * Vorlage 3 "card": kleine Karte in der Ecke, die Seite bleibt frei
 * ========================================================================== */

.sp-popup--card {
  --sp-width: 420px;
}

.sp-popup--card .sp-popup__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
  padding: 18px 18px 14px;
}

/* Die Teile des Textblocks ordnen sich direkt ins Raster der Karte ein. */
.sp-popup--card .sp-popup__body {
  display: contents;
}

.sp-popup--card .sp-popup__media {
  --sp-clip: inset(0 0 0 0);
  grid-row: 1 / span 2;
  width: 68px;
  height: 68px;
  border-radius: 4px;
  opacity: 0;
  transform: scale(0.86);
  transition:
    opacity 0.5s ease-out 0.2s,
    transform 0.8s var(--sp-ease) 0.2s;
}

.sp-popup--card.is-open .sp-popup__media,
.sp-popup--card.is-closing .sp-popup__media {
  opacity: 1;
  transform: none;
}

.sp-popup--card .sp-popup__img {
  transform: none;
}

.sp-popup--card.sp-popup--contain .sp-popup__img {
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
}

.sp-popup--card .sp-popup__eyebrow,
.sp-popup--card .sp-popup__title {
  grid-column: 2;
  padding-right: 40px; /* Platz fuer das X */
}

.sp-popup--card.sp-popup--no-image .sp-popup__eyebrow,
.sp-popup--card.sp-popup--no-image .sp-popup__title,
.sp-popup--card .sp-popup__text,
.sp-popup--card .sp-popup__actions {
  grid-column: 1 / -1;
}

.sp-popup--card .sp-popup__eyebrow {
  align-self: end;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
}

/* Punkt statt Strich; er pulsiert dreimal und bleibt dann ruhig. */
.sp-popup--card .sp-popup__mark {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
}

.sp-popup--card .sp-popup__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}

.sp-popup--card.is-open .sp-popup__mark::after {
  animation: sp-popup-pulse 1.6s ease-out 0.9s 3;
}

@keyframes sp-popup-pulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3.4);
  }
}

.sp-popup--card .sp-popup__title {
  margin-bottom: 0;
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.sp-popup--card .sp-popup__text {
  max-width: none;
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.sp-popup--card .sp-popup__actions {
  margin-top: 12px;
  gap: 0 16px;
}

.sp-popup--card .sp-popup__cta {
  min-height: 44px;
  padding: 10px 16px;
}

/* =============================================================================
 * Handy: jede Vorlage ist eine Karte am unteren Rand, ueber dem Knopf der
 * Barrierefreiheits-Hilfe (unten links, 48 px). Die Seite bleibt bedienbar.
 * ========================================================================== */

@media (max-width: 639px) {
  .sp-popup:not(.sp-popup--modal) {
    left: 12px;
    right: 12px;
    bottom: 84px;
    width: auto;
  }

  .sp-popup:not(.sp-popup--modal) .sp-popup__card {
    max-height: min(66vh, 560px);
    box-shadow:
      0 0 0 1px rgb(16 24 40 / 0.07),
      0 12px 40px rgb(16 24 40 / 0.3);
  }

  /* Von unten herein; nur der Startzustand, damit "offen" gewinnt. */
  .sp-popup:not(.sp-popup--modal):not(.is-open) .sp-popup__card {
    transform: translate3d(0, 28px, 0);
  }

  .sp-popup--modal {
    padding: 12px;
  }

  .sp-popup--modal .sp-popup__card {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .sp-popup--card .sp-popup__inner {
    column-gap: 12px;
    padding: 16px 16px 12px;
  }

  .sp-popup--card .sp-popup__media {
    width: 60px;
    height: 60px;
  }
}

/* =============================================================================
 * Weniger Bewegung: nur weich ein- und ausblenden.
 * Gilt fuer die Systemeinstellung und fuer den Schalter der Barrierefreiheits-Hilfe.
 * ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .sp-popup__card,
  .sp-popup__x,
  .sp-popup__media,
  .sp-popup__img,
  .sp-popup__mark,
  .sp-popup__rise,
  .sp-popup__word {
    transform: none !important;
    filter: none !important;
    -webkit-clip-path: none !important;
    clip-path: none !important;
    transition: opacity 0.15s linear !important;
  }

  .sp-popup--poster.sp-popup--contain .sp-popup__img {
    filter: drop-shadow(0 18px 22px rgb(0 0 0 / 0.3)) !important;
  }

  .sp-popup__mark::after {
    animation: none !important;
  }
}

html.a11y-reduce-motion .sp-popup__card,
html.a11y-reduce-motion .sp-popup__x,
html.a11y-reduce-motion .sp-popup__media,
html.a11y-reduce-motion .sp-popup__img,
html.a11y-reduce-motion .sp-popup__mark,
html.a11y-reduce-motion .sp-popup__rise,
html.a11y-reduce-motion .sp-popup__word {
  transform: none !important;
  filter: none !important;
  -webkit-clip-path: none !important;
  clip-path: none !important;
  transition: opacity 0.15s linear !important;
}

html.a11y-reduce-motion .sp-popup--poster.sp-popup--contain .sp-popup__img {
  filter: drop-shadow(0 18px 22px rgb(0 0 0 / 0.3)) !important;
}

html.a11y-reduce-motion .sp-popup__mark::after {
  animation: none !important;
}

@media print {
  .sp-popup {
    display: none !important;
  }
}
