/* Assistent unten links: Knopf „Fragen?“ und kleines Chatfenster in den Praxisfarben (Aubergine #5b003d, Mauve #8c637b) */
.ps-assistent {
  --ps-primary: #5b003d;
  --ps-primary-dark: #45002e;
  --ps-knopf: #8c637b;
  --ps-knopf-dark: #5b003d;
  --ps-shade: #f6f2f4;
  --ps-line: #ece3e7;
  --ps-head: #40353a;
  --ps-body: #5f565b;
  font-family: 'Noto Sans', sans-serif;
}
.ps-assistent__start { position: fixed; left: 20px; bottom: 20px; z-index: 990; height: 54px; padding: 0 22px 0 16px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 999px; cursor: pointer; background: var(--ps-primary); color: #fff; font-family: 'Open Sans', sans-serif; font-weight: 600; font-size: 16px; line-height: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 6px 22px rgba(0,0,0,.25); transition: background-color .2s ease, transform .2s ease; }
.ps-assistent__start svg { width: 28px; height: 28px; display: block; overflow: visible; }
.ps-assistent__start:hover { background: var(--ps-primary-dark); transform: translateY(-2px); }
.ps-assistent__start:focus-visible { outline: 3px solid var(--ps-knopf); outline-offset: 3px; }
.ps-assistent__icon, .ps-assistent__x { display: flex; }
.ps-assistent__x, .ps-assistent.is-offen .ps-assistent__icon { display: none; }
.ps-assistent.is-offen .ps-assistent__x { display: flex; }
.ps-assistent.is-offen .ps-assistent__start { background: var(--ps-knopf); }

.ps-assistent__fenster { position: fixed; left: 20px; bottom: 86px; z-index: 991; width: min(380px, calc(100vw - 32px)); max-height: min(600px, calc(100dvh - 110px)); display: flex; flex-direction: column; background: #fff; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; animation: ps-assistent-auf .2s ease; }
.ps-assistent__fenster[hidden] { display: none; }
@keyframes ps-assistent-auf { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ps-assistent__kopf { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; background: var(--ps-primary); color: #fff; }
.ps-assistent__kopf strong { display: block; font-family: 'Open Sans', sans-serif; font-size: 17px; line-height: 1.2; color: #fff; }
.ps-assistent__kopf small { font-size: 13px; color: rgba(255,255,255,.8); }
.ps-assistent__avatar { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; background: #fff; color: var(--ps-primary); }
.ps-assistent__avatar svg { width: 26px; height: 26px; overflow: visible; }
.ps-assistent__zu { margin-left: auto; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: #fff; cursor: pointer; }
.ps-assistent__zu svg { width: 22px; height: 22px; }
.ps-assistent__zu:hover { background: rgba(255,255,255,.15); }
.ps-assistent__zu:focus-visible { outline: 2px solid #fff; }

.ps-assistent__verlauf { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--ps-shade); }
.ps-assistent__blase { align-self: flex-start; max-width: 92%; margin: 0; padding: 11px 14px; border-radius: 4px 16px 16px 16px; background: #fff; color: var(--ps-head); font-size: 15px; font-weight: 400; line-height: 1.5; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ps-assistent__blase p { margin: 0; }
.ps-assistent__blase p + p { margin-top: 8px; }
.ps-assistent__blase:focus { outline: none; }
.ps-assistent__blase--frage { align-self: flex-end; border-radius: 16px 4px 16px 16px; background: var(--ps-primary); color: #fff; }
.ps-assistent__hinweis { margin: 6px 0 0; font-size: 13px; color: var(--ps-body); }
.ps-assistent__themen { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-assistent__thema, .ps-assistent__knopf { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; font-family: 'Open Sans', sans-serif; font-weight: 500; font-size: 14px; line-height: 1.25; text-align: left; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.ps-assistent__thema { border: 1.5px solid var(--ps-primary); background: #fff; color: var(--ps-primary); }
.ps-assistent__thema:hover, .ps-assistent__thema:focus-visible { background: var(--ps-primary); color: #fff; }
.ps-assistent__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ps-assistent__knopf, .ps-assistent__knopf:visited { border: 0; background: var(--ps-knopf); color: #fff; font-weight: 600; }
.ps-assistent__knopf:hover, .ps-assistent__knopf:focus-visible { background: var(--ps-knopf-dark); color: #fff; text-decoration: none; }
.ps-assistent__notruf { margin: 0; padding: 10px 16px; border-top: 1px solid var(--ps-line); background: #fff; font-size: 13px; color: var(--ps-body); }
.ps-assistent__notruf a { color: var(--ps-head); font-weight: 700; }

/* Auf dem Handy liegt der Footer-Credit mittig: Platz im letzten Footer-Abschnitt lassen (gleiche Farbe), damit der Knopf ihn nicht verdeckt */
@media (max-width: 40rem) {
  .ps-assistent__start { left: 16px; bottom: 16px; height: 50px; padding: 0 18px 0 14px; }
  .ps-assistent__fenster { left: 16px; bottom: 76px; max-height: calc(100dvh - 96px); }
  .tm-page > footer > :last-child { padding-bottom: calc(20px + 5rem); }
}
@media (max-height: 560px) {
  .ps-assistent__kopf { padding: 8px 10px 8px 14px; }
  .ps-assistent__kopf small { display: none; }
  .ps-assistent__avatar { width: 30px; height: 30px; }
  .ps-assistent__notruf { padding: 6px 14px; font-size: 12px; }
  .ps-assistent__verlauf { padding: 12px; }
  .ps-assistent__fenster { bottom: 12px; max-height: calc(100dvh - 24px); }
  .ps-assistent.is-offen .ps-assistent__start { display: none; }
}
@media print { .ps-assistent { display: none; } }
@media (prefers-reduced-motion: reduce) { .ps-assistent__fenster { animation: none; } .ps-assistent__start { transition: none; } }

/* Symbol: gefüllte Sprechblase mit kleinem Fragezeichen in der Hintergrundfarbe (Abstand zum Rand).
   Beim Überfahren wandert der Zipfel um die Blase von unten links nach oben links. */
.ps-assistent__start { --ps-q: var(--ps-primary); }
.ps-assistent__start:hover { --ps-q: var(--ps-primary-dark); }
.ps-assistent__avatar { --ps-q: #fff; }
.ps-ico__blase, .ps-ico__zipfel { fill: currentColor; }
.ps-ico__frage { fill: none; stroke: var(--ps-q); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s ease; }
.ps-ico__punkt { fill: var(--ps-q); transition: fill .2s ease; }
.ps-ico__zipfel { transform-box: view-box; transform-origin: 12px 12px; transition: transform .45s cubic-bezier(.34, 1.4, .64, 1); }
.ps-assistent__start:hover .ps-ico__zipfel, .ps-assistent__start:focus-visible .ps-ico__zipfel { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .ps-ico__zipfel { transition: none; } }
