/* WMA Assistent — Widget. Keine Endpunkte, keine Zugangsdaten in dieser Datei.
   Palette aus der Seite selbst: die Grüntöne der connect-section. */
:root {
  --wma-ai-bg: #123c29;
  --wma-ai-surface: rgba(255, 255, 255, .09);
  --wma-ai-border: rgba(255, 255, 255, .22);
  --wma-ai-text: #fff;
  --wma-ai-muted: rgba(255, 255, 255, .78);
  --wma-ai-accent: #5aad79;
}

.wma-ai-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  padding: .7rem 1.05rem;
  color: var(--wma-ai-text);
  background: linear-gradient(135deg, #1b5b3b 0%, #24744b 100%);
  border: 1px solid rgba(144, 231, 170, .38);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(14, 59, 38, .34);
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.wma-ai-launcher-short { display: none; }

.wma-ai-launcher:hover,
.wma-ai-launcher:focus-visible { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(14, 59, 38, .42); }
.wma-ai-launcher:focus-visible,
.wma-ai-close:focus-visible,
.wma-ai-send:focus-visible,
.wma-ai-feedback a:focus-visible,
.wma-ai-privacy:focus-visible { outline: 3px solid #90e7aa; outline-offset: 3px; }

.wma-ai-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  z-index: 131;
  width: min(390px, calc(100vw - 2rem));
  overflow: hidden;
  color: var(--wma-ai-text);
  background: linear-gradient(135deg, #123c29 0%, #1b5b3b 62%, #24744b 100%);
  border: 1px solid var(--wma-ai-border);
  border-radius: 22px;
  box-shadow: 0 28px 72px rgba(14, 59, 38, .5);
}

.wma-ai-panel[hidden] { display: none; }
.wma-ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1rem .75rem; border-bottom: 1px solid var(--wma-ai-border); }
.wma-ai-head h2 { margin: 0; font-size: 1rem; line-height: 1.3; }
.wma-ai-head p { margin: .25rem 0 0; color: var(--wma-ai-muted); font-size: .82rem; line-height: 1.4; }
.wma-ai-close { flex: 0 0 auto; width: 34px; height: 34px; color: var(--wma-ai-text); background: transparent; border: 1px solid var(--wma-ai-border); border-radius: 50%; cursor: pointer; font: inherit; }
.wma-ai-body { padding: 1rem; }
.wma-ai-transcript { display: grid; gap: .5rem; min-height: 92px; max-height: 240px; overflow-y: auto; margin: 0 0 .8rem; }
.wma-ai-message { margin: 0; padding: .75rem; color: var(--wma-ai-text); background: var(--wma-ai-surface); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; font-size: .9rem; line-height: 1.5; white-space: pre-wrap; }
.wma-ai-message--assistant { margin-right: 1rem; }
.wma-ai-message--visitor { margin-left: 1rem; background: rgba(255, 255, 255, .2); }
.wma-ai-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; min-width: 0; }
.wma-ai-input { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 76px; resize: vertical; padding: .7rem; color: var(--wma-ai-text); background: rgba(0, 0, 0, .18); border: 1px solid var(--wma-ai-border); border-radius: 12px; font: inherit; line-height: 1.45; }
.wma-ai-input::placeholder { color: rgba(255, 255, 255, .6); }
.wma-ai-send { justify-self: end; padding: .6rem 1rem; color: #123c29; background: #cdeeda; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; }
.wma-ai-send:disabled, .wma-ai-input:disabled { cursor: wait; opacity: .7; }

/* Einmal pro Gespräch, nach der ersten echten Antwort. */
.wma-ai-feedback { margin: .2rem 0 .8rem; padding: .65rem .75rem; color: var(--wma-ai-muted); background: rgba(0, 0, 0, .16); border: 1px dashed var(--wma-ai-border); border-radius: 12px; font-size: .8rem; line-height: 1.45; }
.wma-ai-feedback a { color: #cdeeda; }
.wma-ai-feedback button { margin-left: .5rem; padding: 0 .35rem; color: var(--wma-ai-muted); background: transparent; border: 0; cursor: pointer; font: inherit; }

.wma-ai-note { margin: .8rem 0 0; color: var(--wma-ai-muted); font-size: .76rem; line-height: 1.45; }
.wma-ai-privacy { color: #cdeeda; }

@media (max-width: 720px) {
  .wma-ai-launcher { right: 1rem; bottom: 1rem; padding: .7rem .95rem; }
  .wma-ai-launcher-label { display: none; }
  .wma-ai-launcher-short { display: inline; }
  .wma-ai-panel { top: auto; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); left: 1rem; width: auto; max-height: calc(100dvh - 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  .wma-ai-launcher { transition: none; }
  .wma-ai-launcher:hover, .wma-ai-launcher:focus-visible { transform: none; }
}
