/* bondwerk — Chat-Widget · Brand Guide v1.0
 * Farben über bondwerk-Tokens (var(--c-*)) mit Hex-Fallback für Standalone-Einsatz.
 * Heritage #b5331f (Akzent hell), Bright #e14328 (Akzent dunkel), Paper #f4f1ea, Ink #0a0a0a.
 * Buttons: Senden = Ink → Hover Heritage (§11). FAB = Heritage → Hover Bright (wie Header-CTA).
 * Motion: var(--dur-cta,180ms) var(--ease-standard) — konsistent mit dem Seiten-Button-System.
 */

.ab-chat-fab {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 64px;
  height: 64px;
  background: var(--c-accent, #b5331f);
  color: var(--c-paper, #f4f1ea);
  border-radius: 0;
  border: 1px solid var(--c-ink, #0a0a0a);
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 11px;
  cursor: pointer;
  z-index: 1000;
  transition: background var(--dur-cta, 180ms) var(--ease-standard, cubic-bezier(.2, .8, .2, 1)),
              color var(--dur-cta, 180ms) var(--ease-standard, cubic-bezier(.2, .8, .2, 1)),
              border-color var(--dur-cta, 180ms) var(--ease-standard, cubic-bezier(.2, .8, .2, 1));
}
.ab-chat-fab:hover {
  background: var(--c-accent-hi, #e14328);
  color: var(--c-paper, #f4f1ea);
  border-color: var(--c-paper, #f4f1ea);
}
@media (max-width: 1024px) { .ab-chat-fab { bottom: 80px; right: 16px; } }

.ab-chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 48px);
  background: var(--c-paper, #f4f1ea);
  border: 1px solid var(--c-ink, #0a0a0a);
  display: none;
  flex-direction: column;
  z-index: 1001;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
.ab-chat-panel.open { display: flex; }
.ab-chat-header {
  background: var(--c-ink, #0a0a0a);
  color: var(--c-paper, #f4f1ea);
  padding: 14px 16px;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ab-chat-close { background: none; border: none; color: var(--c-paper, #f4f1ea); font-size: 18px; cursor: pointer; }
.ab-chat-disclaimer {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 8px 16px;
  background: var(--c-accent, #b5331f);
  color: var(--c-paper, #f4f1ea);
}
.ab-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.55; }
.ab-msg { padding: 10px 12px; max-width: 85%; word-wrap: break-word; }
.ab-msg-user { background: var(--c-ink, #0a0a0a); color: var(--c-paper, #f4f1ea); align-self: flex-end; }
.ab-msg-assistant { background: var(--c-pure, #ffffff); border: 1px solid var(--c-edge, #e0ddd4); align-self: flex-start; color: var(--c-ink, #0a0a0a); }
.ab-msg a { color: var(--c-accent, #b5331f); text-decoration: underline; }
.ab-msg-user a { color: inherit; }
.ab-chat-input { display: flex; border-top: 1px solid var(--c-ink, #0a0a0a); }
.ab-chat-input input { flex: 1; padding: 12px; border: none; background: var(--c-pure, #ffffff); font: inherit; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; color: var(--c-ink, #0a0a0a); }
.ab-chat-input input:focus { outline: 2px solid var(--c-accent, #b5331f); outline-offset: -2px; }
.ab-chat-input button {
  background: var(--c-ink, #0a0a0a);
  color: var(--c-paper, #f4f1ea);
  border: none;
  padding: 0 18px;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-cta, 180ms) var(--ease-standard, cubic-bezier(.2, .8, .2, 1));
}
.ab-chat-input button:hover:not(:disabled) { background: var(--c-accent, #b5331f); }
.ab-chat-input button:disabled { opacity: 0.4; cursor: not-allowed; }
.ab-msg-error { background: var(--c-accent, #b5331f); color: var(--c-paper, #f4f1ea); padding: 8px; font-size: 12px; font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.04em; }
.ab-typing { font-style: italic; opacity: 0.6; }
