/* =====================================================
   VT Akademie Marl — KI-Chat-Widget
   Eigenständige Datei, bewusst getrennt von style.css/base.css
   (die "gesperrten" Design-Dateien bleiben unangetastet).
   Nutzt ausschließlich vorhandene Design-Tokens aus style.css
   (--brand, --surface, --bg-2, --line, --radius, --shadow-lg,
   --font-head/--font-body, --z-float) — keine neuen Hex-Farben.
   Wiederhergestellt 08.08.2026 aus dem alten chat-proxy.php-Widget.
   ===================================================== */

.chat-bubble{
  position:fixed;bottom:24px;right:24px;z-index:var(--z-float,90);
}
.chat-toggle{
  width:64px;height:64px;border-radius:50%;
  background:linear-gradient(135deg,var(--brand),var(--brand-deep));
  border:3px solid rgba(255,255,255,.15);cursor:pointer;
  font-size:32px;box-shadow:var(--shadow-lg);
  display:flex;align-items:center;justify-content:center;
  transition:transform .2s var(--ease),box-shadow .2s var(--ease);
}
.chat-toggle:hover{transform:scale(1.08)}
.chat-toggle.open{transform:rotate(20deg) scale(1.04)}
.chat-badge{
  position:absolute;top:-4px;right:-4px;
  background:var(--brand-deep);color:#fff;
  font-size:.6rem;font-weight:800;letter-spacing:.06em;
  padding:.2rem .45rem;border-radius:999px;border:2px solid var(--surface);
}
.chat-window{
  position:fixed;bottom:104px;right:24px;z-index:var(--z-float,90);
  width:360px;max-width:calc(100vw - 32px);max-height:520px;
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);display:none;flex-direction:column;
  box-shadow:var(--shadow-lg);overflow:hidden;
}
.chat-window.open{display:flex}
.chat-header{
  background:var(--text);padding:1rem 1.2rem;
  display:flex;align-items:center;gap:.8rem;flex-shrink:0;
}
.chat-avatar{
  width:38px;height:38px;border-radius:50%;
  background:var(--brand);display:flex;align-items:center;
  justify-content:center;font-size:1.2rem;flex-shrink:0;
}
.chat-info{display:flex;flex-direction:column;line-height:1.3}
.chat-info strong{font-family:var(--font-head);letter-spacing:.03em;font-size:.85rem;color:var(--surface);font-weight:700}
.chat-info span{font-size:.7rem;color:#4ade80}
.chat-close{
  margin-left:auto;background:none;border:none;color:rgba(255,255,255,.45);
  font-size:1.15rem;cursor:pointer;padding:.3rem;transition:color .2s;line-height:1;
}
.chat-close:hover{color:var(--surface)}
.chat-messages{
  flex:1;overflow-y:auto;padding:1.1rem;
  display:flex;flex-direction:column;gap:.85rem;background:var(--bg-2);
}
.chat-msg{max-width:88%;font-family:var(--font-body)}
.chat-msg.bot{align-self:flex-start}
.chat-msg.user{align-self:flex-end}
.chat-msg .bubble{
  padding:.65rem .95rem;border-radius:var(--radius-sm);
  font-size:.85rem;line-height:1.55;
}
.chat-msg.bot .bubble{
  background:var(--surface);color:var(--text);
  border:1px solid var(--line);border-bottom-left-radius:3px;
}
.chat-msg.user .bubble{
  background:var(--brand);color:#fff;
  border-bottom-right-radius:3px;
}
.chat-msg .time{font-size:.64rem;color:var(--dim);margin-top:.25rem}
.chat-msg.user .time{text-align:right}
.chat-quick{padding:.6rem 1rem .8rem;display:flex;flex-wrap:wrap;gap:.4rem;background:var(--bg-2);border-top:1px solid var(--line)}
.chat-quick-btn{
  background:var(--surface);border:1px solid var(--line);color:var(--muted);
  border-radius:999px;padding:.35rem .75rem;font-size:.74rem;
  cursor:pointer;font-family:var(--font-body);transition:all .2s var(--ease);
}
.chat-quick-btn:hover{border-color:var(--brand);color:var(--brand)}
.chat-input-row{
  padding:.75rem 1rem;border-top:1px solid var(--line);
  display:flex;gap:.6rem;background:var(--surface);flex-shrink:0;
}
.chat-input-row input{
  flex:1;background:var(--bg-2);border:1px solid var(--line);
  color:var(--text);border-radius:var(--radius-sm);padding:.6rem .85rem;
  font-size:.85rem;font-family:var(--font-body);outline:none;margin:0;
}
.chat-input-row input:focus{border-color:var(--brand)}
.chat-send{
  background:var(--brand);border:none;border-radius:var(--radius-sm);
  width:38px;height:38px;cursor:pointer;color:#fff;font-size:1rem;
  display:flex;align-items:center;justify-content:center;
  transition:background .2s var(--ease);flex-shrink:0;
}
.chat-send:hover{background:var(--brand-deep)}
.chat-typing{display:flex;gap:4px;align-items:center;padding:2px 0}
.chat-typing span{width:6px;height:6px;border-radius:50%;background:var(--dim);animation:chatTypAnim 1.2s infinite}
.chat-typing span:nth-child(2){animation-delay:.2s}
.chat-typing span:nth-child(3){animation-delay:.4s}
@keyframes chatTypAnim{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)}}

@media (max-width:480px){
  .chat-window{right:16px;bottom:96px;width:calc(100vw - 32px)}
  .chat-bubble{right:16px;bottom:16px}
}
