:root {
  --black:#0f0f0f;
  --white:#fff;
  --gray:#f5f5f5;
}

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== ROOT ===== */
#chat-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483647;
  pointer-events: auto;
}

/* ===== AVATAR BUTTON ===== */
.chat-toggle {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.chat-toggle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ===== HINT ===== */
.chat-hint {
  position: absolute;
  right: 0;
  bottom: 72px;
  background: #000;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

/* ===== CHAT BUBBLE ===== */
.chat-bubble {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 360px;
  height: 520px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
}

.chat-bubble.is-hidden {
  display: none;
}

/* ===== HEADER ===== */
.chat-header {
  background: #000;
  color: #fff;
  padding: 12px;
  text-align: center;
  position: relative;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.chat-header button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.chat-reset { left: 12px; }
.chat-close { right: 12px; }

.chat-title {
  font-weight: 600;
  font-size: 14px;
}

/* ===== MESSAGES ===== */
.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-line; /* 👈 EINZIGE ÄNDERUNG */
}

.message.bot {
  background: #f5f5f5;
  align-self: flex-start;
}

.message.user {
  background: #000;
  color: #fff;
  align-self: flex-end;
}

/* ===== INPUT ===== */
.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
}

.chat-text {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 13px;
  outline: none;
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
}

.chat-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 18px;
  padding: 6px 12px;
  margin: 4px 6px 0 0;
  cursor: pointer;
  font-size: 14px;
}

.chat-button:hover {
  background: #e5e7eb;
}
