/* ==========================================================================
   Peter — der Förderkonzepte-Chat. Launcher, Fenster, Nachrichten, Lead-Form.
   ========================================================================== */

/* --- Launcher: Peter-Avatar mit Verlaufsring ------------------------------- */
.pk-start{position:fixed;right:1.25rem;bottom:1.25rem;z-index:55;display:flex;align-items:center;gap:.7rem;
border:none;cursor:pointer;background:none;padding:0;-webkit-tap-highlight-color:transparent;
transform:translateY(120px);opacity:0;transition:transform .6s cubic-bezier(.16,.84,.44,1),opacity .6s}
.pk-start.pk-da{transform:none;opacity:1}
.pk-start-label{background:#fff;border:1px solid var(--linie);border-radius:999px;
padding:.55rem 1.05rem;font-size:.85rem;font-weight:600;color:var(--tinte);
box-shadow:0 12px 30px -12px rgba(12,96,168,.4)}
.pk-start-bild{position:relative;width:3.6rem;height:3.6rem;border-radius:50%;padding:3px;
background:var(--verlauf);background-size:200% auto;animation:verlaufWandern 8s ease infinite;
box-shadow:0 16px 36px -12px rgba(216,48,120,.55)}
.pk-start-bild img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.pk-start-punkt{position:absolute;right:1px;bottom:1px;width:.95rem;height:.95rem;border-radius:50%;
background:#2fbf71;border:2.5px solid #fff}
.pk-start-punkt::after{content:"";position:absolute;inset:0;border-radius:50%;background:#2fbf71;
animation:fxPuls 2s ease-out infinite}
.pk-start:hover .pk-start-bild{transform:scale(1.06)}
.pk-start .pk-start-bild{transition:transform .3s}
@media (max-width:1023px){.pk-start{bottom:calc(4.9rem + env(safe-area-inset-bottom,0px));right:1rem}}
@media (max-width:640px){.pk-start-label{display:none}}

/* --- Fenster ---------------------------------------------------------------- */
.pk-panel{position:fixed;right:1.25rem;bottom:1.25rem;z-index:60;width:min(392px,calc(100vw - 1.6rem));
display:flex;flex-direction:column;max-height:min(640px,calc(100dvh - 6rem));
background:#fff;border:1px solid var(--linie);border-radius:1.5rem;overflow:hidden;
box-shadow:0 40px 90px -30px rgba(8,40,70,.45);
transform:translateY(28px) scale(.96);opacity:0;pointer-events:none;transform-origin:bottom right;
transition:transform .45s cubic-bezier(.16,.84,.44,1),opacity .35s}
.pk-panel.pk-offen{transform:none;opacity:1;pointer-events:auto}
@media (max-width:640px){
  .pk-panel{right:.5rem;left:.5rem;width:auto;
  bottom:calc(4.9rem + env(safe-area-inset-bottom,0px));
  max-height:min(480px,calc(100dvh - 10rem))}
}

/* --- Kleine Teaser-Nachricht (Mobile statt Auto-Open) ----------------------- */
.pk-teaser{position:fixed;right:1rem;z-index:54;cursor:pointer;
bottom:calc(9rem + env(safe-area-inset-bottom,0px));
background:#fff;border:1px solid var(--linie);border-radius:1.1rem 1.1rem .3rem 1.1rem;
padding:.65rem 2rem .65rem .95rem;font-size:.85rem;font-weight:600;color:var(--tinte);
box-shadow:0 16px 40px -14px rgba(12,96,168,.45);max-width:14.5rem;
transform:translateY(14px) scale(.92);opacity:0;transform-origin:bottom right;
transition:transform .45s cubic-bezier(.34,1.56,.64,1),opacity .35s}
.pk-teaser.pk-teaser-da{transform:none;opacity:1}
.pk-teaser-zu{position:absolute;top:.15rem;right:.3rem;border:none;background:none;
color:var(--grau);font-size:.8rem;cursor:pointer;padding:.25rem;line-height:1}
@media (min-width:1024px){.pk-teaser{right:1.25rem;bottom:6.3rem}}
@media (prefers-reduced-motion:reduce){.pk-teaser{transition:none;transform:none;opacity:1}}

/* Kopf */
.pk-kopf{display:flex;align-items:center;gap:.8rem;padding:1rem 1.1rem;
background:linear-gradient(115deg,#08325a,#0C60A8 55%,#8A4A96);color:#fff}
.pk-kopf img{width:2.8rem;height:2.8rem;border-radius:50%;object-fit:cover;
border:2px solid rgba(255,255,255,.55)}
.pk-kopf-name{font-weight:700;font-size:.98rem;line-height:1.2}
.pk-kopf-status{font-size:.74rem;color:rgba(255,255,255,.78);display:flex;align-items:center;gap:.35rem}
.pk-kopf-status::before{content:"";width:.5rem;height:.5rem;border-radius:50%;background:#2fbf71}
.pk-zu{margin-left:auto;background:rgba(255,255,255,.14);border:none;color:#fff;cursor:pointer;
width:2.1rem;height:2.1rem;border-radius:50%;font-size:1.05rem;line-height:1;
display:flex;align-items:center;justify-content:center;transition:background .25s}
.pk-zu:hover{background:rgba(255,255,255,.28)}

/* Verlauf */
.pk-verlauf{flex:1;overflow-y:auto;padding:1.1rem;display:flex;flex-direction:column;gap:.55rem;
background:var(--flaeche);overscroll-behavior:contain}
.pk-msg{display:flex;gap:.55rem;align-items:flex-end;max-width:88%;
animation:pkAuf .4s cubic-bezier(.16,.84,.44,1) both}
@keyframes pkAuf{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.pk-msg img{width:1.7rem;height:1.7rem;border-radius:50%;object-fit:cover;flex-shrink:0}
.pk-blase{background:#fff;border:1px solid var(--linie);border-radius:1.1rem 1.1rem 1.1rem .3rem;
padding:.65rem .9rem;font-size:.9rem;line-height:1.55;color:var(--tinte)}
.pk-msg-ich{align-self:flex-end;flex-direction:row-reverse}
.pk-msg-ich .pk-blase{background:var(--verlauf);background-size:200% auto;color:#fff;border:none;
border-radius:1.1rem 1.1rem .3rem 1.1rem}

/* Tipp-Indikator */
.pk-tippt .pk-blase{display:flex;gap:.28rem;padding:.8rem .95rem}
.pk-tippt i{width:.42rem;height:.42rem;border-radius:50%;background:#9db4c8;
animation:pkTipp 1.1s ease-in-out infinite}
.pk-tippt i:nth-child(2){animation-delay:.18s}
.pk-tippt i:nth-child(3){animation-delay:.36s}
@keyframes pkTipp{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* Schnellantworten */
.pk-chips{display:flex;flex-wrap:wrap;gap:.45rem;padding:.15rem 0 .1rem 2.25rem;
animation:pkAuf .4s .1s cubic-bezier(.16,.84,.44,1) both}
.pk-chip{border:1.5px solid var(--blau);color:var(--blau);background:#fff;border-radius:999px;
padding:.45rem .95rem;font-size:.83rem;font-weight:600;cursor:pointer;
transition:background .2s,color .2s,transform .2s;-webkit-tap-highlight-color:transparent}
.pk-chip:hover{background:var(--blau);color:#fff;transform:translateY(-1px)}
.pk-chip:active{transform:scale(.95)}
.pk-chip-cta{background:var(--verlauf);background-size:200% auto;color:#fff;border:none;
animation:verlaufWandern 7s ease infinite}
.pk-chip-cta:hover{background:var(--verlauf);background-size:200% auto;color:#fff;
box-shadow:0 10px 24px -10px rgba(216,48,120,.6)}

/* Lead-Formular */
.pk-form{background:#fff;border:1px solid var(--linie);border-radius:1.1rem;
padding:.9rem;margin-left:2.25rem;display:flex;flex-direction:column;gap:.55rem;
animation:pkAuf .4s cubic-bezier(.16,.84,.44,1) both}
.pk-form input{border:1.5px solid var(--linie);border-radius:.7rem;padding:.6rem .8rem;
font-size:.9rem;font-family:inherit;color:var(--tinte);outline:none;transition:border-color .25s}
.pk-form input:focus{border-color:var(--blau)}
.pk-form button{background:var(--verlauf);background-size:200% auto;color:#fff;border:none;
border-radius:.7rem;padding:.65rem;font-size:.9rem;font-weight:700;cursor:pointer;
font-family:inherit;transition:transform .2s,box-shadow .2s;animation:verlaufWandern 7s ease infinite}
.pk-form button:hover{transform:translateY(-1px);box-shadow:0 10px 24px -10px rgba(216,48,120,.55)}
.pk-form button:disabled{opacity:.6;cursor:wait;transform:none}
.pk-form small{font-size:.68rem;color:var(--grau);line-height:1.45}
.pk-falle{position:absolute;left:-5000px;opacity:0;height:0;overflow:hidden}

@media (prefers-reduced-motion:reduce){
  .pk-start,.pk-panel,.pk-msg,.pk-chips,.pk-form{animation:none;transition:none}
  .pk-start{transform:none;opacity:1}
  .pk-start-bild,.pk-chip-cta,.pk-form button{animation:none}
  .pk-start-punkt::after{animation:none}
}
