/* arian KI-Assistent — Chat-Widget. Alle Klassen mit .ampc- praefixiert (Kollisionsschutz).
   Fonts via System-Stack (CSP font-src 'self'); Akzent aus --orange der Seite mit Fallback. */

.ampc-btn {
  position: fixed; right: 20px; bottom: 24px; z-index: 999900;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--orange, #E8621A); color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  display: grid; place-items: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ampc-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.ampc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ampc-btn svg { width: 28px; height: 28px; display: block; }
.ampc-btn[hidden] { display: none; }
@media (max-width: 640px) { .ampc-btn { bottom: 84px; right: 16px; } } /* ueber der Mobile-AppBar */

.ampc-panel {
  position: fixed; right: 20px; bottom: 24px; z-index: 999901;
  width: 370px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 48px);
  background: #FAF6EF; border: 1px solid rgba(0,0,0,.08); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  display: flex; flex-direction: column; overflow: hidden;
  font-family: 'Manrope','Inter',-apple-system,system-ui,'Segoe UI',sans-serif;
  color: #1c1a17;
}
.ampc-panel[hidden] { display: none; }
@media (max-width: 640px) {
  .ampc-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

.ampc-head { background: var(--orange, #E8621A); color: #fff; padding: 13px 16px; display: flex; align-items: center; gap: 10px; }
.ampc-head .ampc-h { display: flex; flex-direction: column; gap: 1px; }
.ampc-head .ampc-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.ampc-head .ampc-badge { font-size: 10.5px; opacity: .92; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.ampc-head .ampc-close { margin-left: auto; background: transparent; border: none; color: #fff; cursor: pointer; font-size: 24px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.ampc-head .ampc-close:hover { background: rgba(255,255,255,.18); }
.ampc-head .ampc-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.ampc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ampc-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ampc-msg.ampc-bot { align-self: flex-start; background: #fff; color: #1c1a17; border: 1px solid rgba(0,0,0,.06); border-bottom-left-radius: 4px; }
.ampc-msg.ampc-user { align-self: flex-end; background: var(--orange, #E8621A); color: #fff; border-bottom-right-radius: 4px; }
.ampc-note { align-self: stretch; font-size: 11.5px; color: #6b6459; text-align: center; padding: 2px 6px; line-height: 1.4; }

.ampc-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 14px; border-bottom-left-radius: 4px; }
.ampc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #c8bfb0; animation: ampc-bounce 1.2s infinite; }
.ampc-typing span:nth-child(2) { animation-delay: .15s; }
.ampc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ampc-bounce { 0%,60%,100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-5px); opacity: 1; } }

.ampc-foot { border-top: 1px solid rgba(0,0,0,.08); }
.ampc-inrow { display: flex; gap: 8px; padding: 10px; align-items: flex-end; }
.ampc-in { flex: 1; resize: none; border: 1px solid rgba(0,0,0,.16); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14.5px; line-height: 1.4; max-height: 110px; background: #fff; color: #1c1a17; }
.ampc-in:focus-visible { outline: 2px solid var(--orange, #E8621A); outline-offset: 0; border-color: transparent; }
.ampc-send { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: none; background: var(--orange, #E8621A); color: #fff; cursor: pointer; display: grid; place-items: center; }
.ampc-send svg { width: 20px; height: 20px; display: block; }
.ampc-send:disabled { opacity: .5; cursor: default; }
.ampc-send:focus-visible { outline: 2px solid #1c1a17; outline-offset: 1px; }
.ampc-cta { display: flex; gap: 8px; padding: 0 10px 10px; }
.ampc-cta a { flex: 1; text-align: center; font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 6px; border-radius: 10px; }
.ampc-cta .ampc-call { background: #fff; color: var(--orange-text, #B5490D); border: 1px solid rgba(0,0,0,.14); }
.ampc-cta .ampc-book { background: var(--orange, #E8621A); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .ampc-btn { transition: none; }
  .ampc-typing span { animation: none; }
}
