/* ==========================================================================
   Chat-Teaser: KI-Coach mit Gesicht erscheint nach 10 s ueber dem Chat-Button
   (EASYFITNESS-CI: Hellgruen #AFCA0B, Anthrazit #272726, Violett #501E70)
   ========================================================================== */
.ct {
  position: fixed;
  right: 24px;
  bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  z-index: 2147482000; /* unter dem Consent-Banner (2147483000) */
  width: min(340px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 16px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(39, 39, 38, 0.96);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(175, 202, 11, 0.18);
  color: #FFFFFF;
  font-family: 'Poppins', Arial, sans-serif;
  opacity: 0;
  transform: translateY(16px) scale(.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .45s cubic-bezier(.2,.7,.2,1), transform .45s cubic-bezier(.2,.7,.2,1);
}
.ct.is-visible { opacity: 1; transform: none; pointer-events: auto; }
/* Sprechblasen-Spitze Richtung Chat-Button */
.ct::after {
  content: ""; position: absolute; right: 21px; bottom: -7px; width: 14px; height: 14px;
  background: rgba(39, 39, 38, 0.96); border-right: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12);
  transform: rotate(45deg);
}
.ct-avatar { position: relative; width: 64px; height: 64px; cursor: pointer; }
.ct-avatar svg { display: block; width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(175, 202, 11, .7), 0 10px 24px -8px rgba(0, 0, 0, .6); }
.ct.is-visible .ct-avatar svg .ct-hand { animation: ct-wave 1.6s ease-in-out .5s 2; transform-origin: 70% 90%; }
@keyframes ct-wave { 0%,100% { transform: rotate(0); } 20%,60% { transform: rotate(16deg); } 40%,80% { transform: rotate(-8deg); } }
/* klare KI-Kennzeichnung am Avatar (EU AI Act Art. 50) */
.ct-ai-badge {
  position: absolute; right: -4px; bottom: -2px; padding: 2px 6px; border-radius: 999px;
  background: #FFFFFF; color: #501E70; font-size: .62rem; font-weight: 800; letter-spacing: .06em; line-height: 1.3;
  box-shadow: 0 0 0 3px #272726;
}
.ct-name { margin: 2px 0 2px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #AFCA0B; }
.ct-ai { margin: 0 0 8px; font-size: .7rem; line-height: 1.4; color: rgba(255,255,255,.62); }
.ct-text { margin: 0; font-size: .95rem; line-height: 1.45; color: #FFFFFF; }
.ct-text b { font-weight: 800; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ct-btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 800; letter-spacing: .02em;
  min-height: 40px; padding: 0 16px; border-radius: 999px; transition: transform .2s, filter .2s, background .2s;
}
.ct-btn--primary { background: #AFCA0B; color: #272726; box-shadow: 0 8px 22px -10px rgba(175, 202, 11, .9); }
.ct-btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ct-btn--ghost { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
.ct-btn--ghost:hover { background: rgba(255,255,255,.14); }
.ct-btn:focus-visible, .ct-close:focus-visible { outline: 3px solid #AFCA0B; outline-offset: 2px; }
.ct-close {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.55); cursor: pointer;
}
.ct-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.ct-close svg { width: 14px; height: 14px; }
.ct-note { margin: 10px 0 0; font-size: .68rem; line-height: 1.45; color: rgba(255,255,255,.52); }
.ct-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ct-typing { display: inline-flex; gap: 4px; padding: 4px 0 2px; }
.ct-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); animation: ct-dot 1s infinite ease-in-out; }
.ct-typing i:nth-child(2) { animation-delay: .15s; } .ct-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ct-dot { 0%,80%,100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 760px) {
  .ct { right: 12px; left: 12px; width: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .ct::after { right: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct { transition: opacity .2s; transform: none; }
  .ct.is-visible .ct-avatar svg .ct-hand, .ct-typing i { animation: none; }
}
