#bw-chatbot {
  position: fixed;
  bottom: 15px;
  right: 10px;
  width: 295px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  font-family: sans-serif;
  display: none;
  flex-direction: column;
  z-index: 9999;
}

#bw-chatbot.open {
  display: flex;
}

#bw-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  color: #fff;
  padding: 10px;
  font-weight: bold;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

#bw-chat-messages {
  padding: 10px;
  height: 430px;
  overflow-y: auto;
  background: #f9f9f9;
}

#bw-chat-input {
  border: none;
  padding: 10px;
  border-top: 1px solid #ccc;
  outline: none;
}

.bw-chat-msg {
  font-size: 14px; /* oder 12px, wenn es noch kleiner sein soll */
  margin: 6px 0;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 100%;
}

.bw-chat-msg.user {
  background: #d1e7dd;
  align-self: flex-end;
}

.bw-chat-msg.bot {
  background: #f0f0f0;
}
#bw-chat-open {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #222;
  color: #fff;
  font-size: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-align: center;
  line-height: 48px;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
#bw-chatbot {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

#bw-chatbot.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.bw-chat-buttons {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bw-chat-button {
  padding: 8px 12px;
  background: #e0e0e0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  text-align: left;
}

.bw-chat-button:hover {
  background: #ccc;
}


#bw-chat-footer {
  display: flex;
  border-top: 1px solid #ccc;
}

#bw-chat-input {
  flex: 1;
  border: none;
  padding: 10px;
  outline: none;
}

#bw-chat-reset {
  width: 40px;
  background: #f4f4f4;
  border: none;
  font-size: 18px;
  cursor: pointer;
  border-left: 1px solid #ccc;
}
#bw-chat-reset {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
}
#bw-chat-reset:hover {
  color: #ffcc00;
}
#bw-chatbot a {
  color: #007bff; /* klassisches Blau */
  text-decoration: underline;
}

#bw-chatbot a:hover {
  color: #cc0000; /* kräftiges Rot */
}
#bw-chatbot.minimized #bw-chat-messages,
#bw-chatbot.minimized #bw-chat-footer {
  display: none;
}

#bw-chatbot.minimized {
  display: none !important;
}
#bw-chat-min {
  border: 1px solid #888;
  border-radius: 4px;
  background-color: #444;
  padding: 2px 6px;
  font-size: 14px;
  color: #ccc;
  cursor: pointer;
}

#bw-chat-min:hover {
  background-color: #666;
  color: #fff;
  border-color: #aaa;
}
#bw-chat-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}

#bw-chat-footer input {
  flex: 1;
  padding: 6px 8px;
  font-size: 14px;
}

#bw-chat-footer button {
  padding: 6px 12px;
  background: #444;
  color: #fff;
  border: 1px solid #888;
  border-radius: 4px;
  cursor: pointer;
}

#bw-chat-footer button:hover {
  background: #666;
  border-color: #aaa;
}

/* Animierte Bubble für "Dein Chatbot" */
#bw-chat-bubble {
  position: fixed;
  bottom: 75px;
  right: 15px;
  background: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-family: sans-serif;
  white-space: nowrap;
  z-index: 9997;
  opacity: 0;
  transform: translateY(10px);
  animation: bubbleFloat 3s ease-in-out 3;
  animation-fill-mode: forwards;
  pointer-events: none;
}

#bw-chat-bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #333;
}

@keyframes bubbleFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(10px);
  }
  10%, 90% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Wackel-Animation für das Chat-Icon */
#bw-chat-open.wiggle {
  animation: wiggle 0.3s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  25% {
    transform: rotate(-8deg) scale(1.1);
    box-shadow: -2px 6px 12px rgba(0,0,0,0.3);
  }
  75% {
    transform: rotate(8deg) scale(1.1);
    box-shadow: 2px 6px 12px rgba(0,0,0,0.3);
  }
}

.bw-chat-header-buttons {
  display: flex;
  gap: 4px; /* Abstand zwischen den Buttons */
}

#bw-chat-header button {
  background: none;
  border: none;
  font-size: 14px;
  padding: 2px 6px;
  margin-left: 4px;
  cursor: pointer;
  color: #ccc;
}

#bw-chat-header button:hover {
  color: #fff;
}


