
/* === Floating Chat Button === */
.chatbot-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #111827;
  font-size: 1.6rem;
  padding: 1rem 1.1rem;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  z-index: 1000;
}

.chatbot-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

/* === Animations === */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Responsive === */
@media (max-width: 640px) {
  header h1 {
    font-size: 2.25rem;
  }

  section h2 {
    font-size: 1.75rem;
  }

  .cta-button {
    width: 100%;
    padding: 1rem;
  }
}

 /* === Chatbox Styles === */
#chatbox {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 340px;
  max-height: 500px;
  display: none;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  z-index: 1000;
  font-family: 'Inter', sans-serif;
}

#chatbox-header {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

#messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background-color: #f9fafb;
}

#messages::after {
  content: "Hinweis: Deine Chat-Eingaben werden anonymisiert gespeichert – ohne IP-Adresse oder persönliche Daten. Mehr unter Datenschutz";
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.msg {
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
}

.msg.user {
  background-color: #e0f2fe;
  align-self: flex-end;
  color: #0c4a6e;
  text-align: right;
  margin-left: auto;
}

.msg.bot {
  background-color: #e5e7eb;
  color: #1f2937;
  text-align: left;
  margin-right: auto;
}

#input-container {
  display: flex;
  border-top: 1px solid #e5e7eb;
  padding: 0.5rem;
  background: #ffffff;
}

#input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}

#send {
  margin-left: 0.5rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#send:hover {
  background: #1d4ed8;
}

.msg.bot.error {
  background-color: #fee2e2;
  color: #991b1b;
  font-style: italic;
}

#typing-indicator {
  font-style: italic;
  color: #6b7280;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

