/* Chat-Widget "Was willst du in der Welt bewegen?" — nutzt die CSS-Variablen der Landing Page.
   Fallbacks sind gesetzt, damit das Widget auch standalone (z. B. im TYPO3-Embed) funktioniert. */
.wbw-chat-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: "Codec Pro", "Outfit", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: #fff;
  background: var(--accent, #EC6A64);
  box-shadow: 0 8px 24px rgba(236, 106, 100, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wbw-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(236, 106, 100, 0.55); }
.wbw-chat-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
@media (max-width: 767px) {
  .wbw-chat-btn { bottom: 76px; } /* über der Sticky-CTA-Leiste der Landing Page */
}

.wbw-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 95;
  width: min(400px, calc(100vw - 40px));
  height: min(600px, calc(100vh - 80px));
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border, #dde3ea);
  box-shadow: 0 12px 60px rgba(0, 40, 80, 0.28);
  overflow: hidden;
  font-family: "Century Gothic", CenturyGothic, "Outfit", system-ui, sans-serif;
}
.wbw-panel.open { display: flex; }
@media (max-width: 767px) {
  .wbw-panel { right: 0; bottom: 0; width: 100vw; height: 88vh; border-radius: 18px 18px 0 0; }
}

.wbw-head {
  background: linear-gradient(150deg, var(--primary-dark, #00376e), var(--primary, #004F9F));
  color: #fff;
  padding: 16px 18px 12px;
  flex-shrink: 0;
}
.wbw-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wbw-head h3 { margin: 0; font-family: "Codec Pro", "Outfit", system-ui, sans-serif; font-size: 1.05rem; line-height: 1.25; }
.wbw-close {
  border: 0; background: rgba(255, 255, 255, 0.15); color: #fff;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; line-height: 1; flex-shrink: 0;
}
.wbw-close:hover { background: rgba(255, 255, 255, 0.3); }
.wbw-note { margin: 8px 0 0; font-size: 0.72rem; line-height: 1.45; color: rgba(255, 255, 255, 0.75); }

.wbw-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-subtle, #EFF2F4);
}
.wbw-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.wbw-msg.user {
  align-self: flex-end;
  background: var(--primary, #004F9F);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.wbw-msg.bot {
  align-self: flex-start;
  background: #fff;
  color: var(--text, #1a1a1a);
  border: 1px solid var(--border, #dde3ea);
  border-bottom-left-radius: 4px;
}
.wbw-msg.bot.typing::after { content: "▍"; color: var(--accent, #EC6A64); animation: wbw-blink 1s steps(1) infinite; }
@keyframes wbw-blink { 50% { opacity: 0; } }
.wbw-msg.error { background: #fde6e4; border-color: #f3c8c5; color: #7a2f2b; }

.wbw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wbw-chip {
  border: 1.5px solid var(--primary, #004F9F);
  background: #fff;
  color: var(--primary, #004F9F);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-family: "Codec Pro", "Outfit", system-ui, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.wbw-chip:hover { background: var(--primary, #004F9F); color: #fff; }

.wbw-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border, #dde3ea);
  background: #fff;
  flex-shrink: 0;
}
.wbw-input-row textarea {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--border-strong, #bdc6cf);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.93rem;
  line-height: 1.4;
  max-height: 110px;
}
.wbw-input-row textarea:focus { outline: 2px solid var(--primary, #004F9F); border-color: var(--primary, #004F9F); }
.wbw-send {
  border: 0;
  background: var(--accent, #EC6A64);
  color: #fff;
  border-radius: 12px;
  width: 46px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.wbw-send:disabled { opacity: 0.5; cursor: default; }
.wbw-send svg { width: 20px; height: 20px; }
