/* Paketfenster für Pitch-Demos. Aussehen kommt aus der Welt der Demo: nur die --pf-Werte überschreiben,
   am besten in styles.css der Demo unter .pf { … }. Die Werte hier sind neutrale Platzhalter, keine fertige Gestaltung. */
.pf {
  --pf-flaeche: #ffffff;        /* Grund des Fensters */
  --pf-hover: #f3f2ee;          /* Zeile unter dem Zeiger */
  --pf-tinte: #262624;          /* Text und Linien */
  --pf-tinte-2: #5a5a56;        /* Nebentext, mind. 4.5:1 auf --pf-flaeche */
  --pf-akzent: #2b5c8a;         /* Kopf des Fensters, gewählte Stufe */
  --pf-akzent-tief: #1f4466;    /* Hover im Kopf, „empfohlen“ */
  --pf-akzent-tinte: #ffffff;   /* Text auf Akzent */
  --pf-rand: 3px;               /* Außenlinie */
  --pf-linie: 2px;              /* Trennlinien */
  --pf-radius: 5px;
  /* --pf-schrift: Schrift für Überschriften und Preise, --pf-schrift-text: Fließtext.
     Nicht gesetzt = Schrift der Demo wird übernommen. */
  --pf-oben: 4.5rem;            /* Höhe der Kopfleiste der Demo */
  --pf-unten-hand: 1rem;        /* Abstand unten auf dem Handy, z. B. 4.6rem über einer Leiste */
  --pf-ease: cubic-bezier(0.23, 1, 0.32, 1);

  position: fixed; z-index: 80; right: 1rem; bottom: 1rem;
  display: grid; justify-items: end; gap: .6rem;
  font-family: var(--pf-schrift-text);
  line-height: 1.4;
}
.pf *, .pf *::before, .pf *::after { box-sizing: border-box; }
.pf h2, .pf p { margin: 0; }

/* Griff: zeigt die aktuelle Stufe und den Preis */
.pf__griff { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: .1rem; padding: .55rem .9rem .6rem; min-width: 15rem;
  background: var(--pf-flaeche); color: var(--pf-tinte); border: 2px solid var(--pf-tinte); border-radius: var(--pf-radius);
  box-shadow: 0 10px 28px -10px rgb(0 0 0 / .45); transition: background-color 160ms var(--pf-ease); }
.pf__griff:hover { background: var(--pf-hover); }
.pf__griff:focus-visible { outline: 3px solid var(--pf-akzent); outline-offset: 3px; }
.pf__griff-titel { font-family: var(--pf-schrift); font-weight: 600; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--pf-tinte-2); }
.pf__griff-wert { font-family: var(--pf-schrift); font-weight: 700; font-size: 1.15rem; }
.pf__griff-wert b { color: var(--pf-akzent-tief); }
.pf__griff[aria-expanded="true"] { display: none; }

/* Fenster: groß genug, um es im Gespräch über den Tisch zu zeigen */
.pf__fenster { width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - var(--pf-oben) - 2rem); overflow: auto; overscroll-behavior: contain;
  background: var(--pf-flaeche); color: var(--pf-tinte); border: var(--pf-rand) solid var(--pf-tinte); border-radius: var(--pf-radius);
  box-shadow: 0 2px 4px rgb(0 0 0 / .25), 0 30px 60px -20px rgb(0 0 0 / .55);
  animation: pf-auf 220ms var(--pf-ease); transform-origin: 100% 100%; }
.pf__fenster[hidden] { display: none; }
@keyframes pf-auf { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.pf__kopf { position: static; height: auto; display: flex; align-items: center; justify-content: space-between; background: var(--pf-akzent); color: var(--pf-akzent-tinte);
  padding: .7rem .7rem .7rem 1.2rem; border-bottom: var(--pf-rand) solid var(--pf-tinte); }
.pf__kopf h2 { font-family: var(--pf-schrift); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.pf__zu { all: unset; cursor: pointer; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 4px; }
.pf__zu:hover { background: var(--pf-akzent-tief); }
.pf__zu:focus-visible { outline: 3px solid var(--pf-akzent-tinte); outline-offset: -3px; }
.pf__zu svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }

/* Umschalter Abo / einmalig */
.pf__zahlung { display: grid; grid-template-columns: 1fr 1fr; margin: 1rem 1.2rem .4rem; border: 2px solid var(--pf-tinte); border-radius: 4px; overflow: hidden; }
.pf__zahlung button { all: unset; cursor: pointer; text-align: center; padding: .7rem .5rem; font-family: var(--pf-schrift); font-weight: 700; font-size: 1.08rem;
  transition: background-color 160ms var(--pf-ease), color 160ms var(--pf-ease); }
.pf__zahlung button + button { border-left: 2px solid var(--pf-tinte); }
.pf__zahlung button:hover { background: var(--pf-hover); }
.pf__zahlung button[aria-checked="true"] { background: var(--pf-tinte); color: var(--pf-flaeche); }
.pf__zahlung button:focus-visible { outline: 3px solid var(--pf-akzent); outline-offset: -5px; }

/* Die drei Stufen */
.pf__zeile { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; padding: 1rem 1.2rem; text-decoration: none; color: inherit;
  border-top: var(--pf-linie) solid var(--pf-tinte); transition: background-color 160ms var(--pf-ease); }
.pf__zahlung + .pf__zeile { margin-top: .8rem; }
.pf__zeile:hover { background: var(--pf-hover); }
.pf__zeile:focus-visible { outline: 3px solid var(--pf-akzent); outline-offset: -4px; }
.pf__name { font-family: var(--pf-schrift); font-weight: 700; font-size: 1.45rem; line-height: 1.1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; min-width: 0; }
.pf__empf { font-family: var(--pf-schrift); font-weight: 600; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pf-akzent-tief); }
.pf__preis { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-family: var(--pf-schrift); font-weight: 800; font-size: 1.85rem; line-height: 1; white-space: nowrap; align-self: center;
  font-variant-numeric: tabular-nums; }
.pf__preis small { font-family: var(--pf-schrift); font-weight: 600; font-size: .95rem; }
.pf__zusatz { grid-column: 2; text-align: right; font-size: .9rem; color: var(--pf-tinte-2); }
.pf__inhalt { grid-column: 1; grid-row: 2 / span 2; font-size: .95rem; line-height: 1.4; color: var(--pf-tinte-2); max-width: 30ch; }
.pf__zeile[aria-current] { background: var(--pf-akzent); color: var(--pf-akzent-tinte); }
.pf__zeile[aria-current] .pf__inhalt, .pf__zeile[aria-current] .pf__zusatz, .pf__zeile[aria-current] .pf__empf { color: var(--pf-akzent-tinte); }
.pf__fuss { padding: .8rem 1.2rem 1rem; border-top: var(--pf-linie) solid var(--pf-tinte); font-size: .84rem; line-height: 1.4; color: var(--pf-tinte-2); }
[data-zahlung="abo"] .pf [data-zahlung-nur="einmalig"], [data-zahlung="einmalig"] .pf [data-zahlung-nur="abo"] { display: none; }

/* Handy: Fenster über die ganze Breite, Preise unter den Namen */
@media (max-width: 760px) {
  .pf { left: 1rem; right: 1rem; bottom: var(--pf-unten-hand); justify-items: stretch; }
  .pf__griff { min-width: 0; grid-auto-flow: column; justify-content: space-between; align-items: baseline; padding: .55rem .9rem; }
  .pf--leiste .pf__griff { display: none; } /* Die Demo hat eine eigene Leiste mit [data-paket-oeffnen] */
  .pf__fenster { width: auto; max-height: calc(100svh - var(--pf-oben) - var(--pf-unten-hand) - 2rem); }
  .pf__zahlung { margin-inline: 1rem; }
  .pf__zahlung button { font-size: .98rem; padding-inline: .25rem; white-space: nowrap; }
  .pf__zeile { padding: .8rem 1rem; }
  .pf__name { font-size: 1.25rem; }
  .pf__preis { grid-row: 1; grid-column: 2; font-size: 1.5rem; text-align: right; }
  .pf__preis small { display: block; margin-top: .15rem; font-size: .85rem; }
  .pf__zusatz { grid-row: 2; grid-column: 1 / -1; text-align: left; }
  .pf__inhalt { grid-row: 3; grid-column: 1 / -1; max-width: none; }
}

/* Stufenwechsel: kurz ausblenden, neu laden, an derselben Stelle einblenden */
html.stufe-geht body { opacity: 0; transition: opacity 240ms ease-out; }
html.stufe-kommt body { opacity: 0; }
html:not(.stufe-kommt) body { transition: opacity 260ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .pf__fenster { animation: none; }
  html.stufe-geht body, html:not(.stufe-kommt) body { transition: none; }
}
