/* Container des Chatfensters */
#kisa-chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
}

/* Moderner rechteckiger Support Button */
#kisa-support-icon {
  background: linear-gradient(45deg, #0073aa, #00a0d2);
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  font-size: 16px;
  text-align: center;
}

/* Chatfenster (Gesamtgröße: 342x496px) */
#kisa-chat-window {
  width: 342px;
  height: 496px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  overflow: hidden;
  margin-top: 10px;
  animation: fadeIn 0.5s;
  display: flex;
  flex-direction: column;
}

/* Oberer Balken (Header Top, 342x44px) */
#kisa-chat-header-top {
  width: 100%;
  height: 44px;
  background: #083557;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
#kisa-chat-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 44px;
  text-align: center;
}
#kisa-minimize-chat {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* Hauptbereich des Chats (Restfläche: 342x452px) */
#kisa-chat-main {
  width: 100%;
  height: 452px;
  display: flex;
  flex-direction: column;
}

/* Nachrichtenbereich */
#kisa-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: #f4f4f4;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Sprechblase: User-Nachricht */
.kisa-user-message {
  align-self: flex-end;
  background: #e1ffc7;
  padding: 10px 15px;
  border-radius: 15px 15px 0 15px;
  max-width: 80%;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Sprechblase: KI-Nachricht */
.kisa-bot-message {
  align-self: flex-start;
  background: #c7dfff;
  padding: 10px 15px;
  border-radius: 15px 15px 15px 0;
  max-width: 80%;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* NEU: Systemmeldungen in eigener Farbe */
.kisa-system-message {
  align-self: flex-start;
  background: #ffe9c2; /* leichtes Orange */
  padding: 10px 15px;
  border-radius: 15px 15px 15px 0;
  max-width: 80%;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Begrüßungsnachricht, falls nötig */
.kisa-welcome-message {
  font-size: 16px;
  margin-bottom: 10px;
  text-align: center;
  color: #333;
}

/* Chat Eingabebereich */
#kisa-chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
  background: #fff;
}
#kisa-chat-input input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
#kisa-chat-input button {
  margin-left: 5px;
  padding: 8px 12px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Chat beenden Button */
#kisa-end-chat {
  width: 100%;
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tipp-Animation */
.kisa-typing-indicator {
  display: block;
  align-self: flex-start;
  margin: 6px 0;
}
.kisa-typing-bubble {
  background-color: #d5e7ff;
  padding: 8px 12px;
  border-radius: 15px 15px 15px 0; 
  display: inline-flex;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.kisa-typing-bubble .dot {
  width: 6px;
  height: 6px;
  background-color: #333;
  border-radius: 50%;
  animation: kisa-dot 0.8s infinite ease-in-out;
  opacity: 0.7;
}
.dot2 { animation-delay: 0.2s; }
.dot3 { animation-delay: 0.4s; }
@keyframes kisa-dot {
  0%,100% { transform: scale(1); opacity: 0.7; }
  50%     { transform: scale(1.5); opacity: 1; }
}

/* NEU: Moderne Buttons (Auswahlbuttons) */
.kisa-option-btn {
  background: linear-gradient(45deg, #0073aa, #00a0d2);
  color: #fff;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  margin: 5px;
  font-size: 14px;
}
.kisa-option-btn:hover {
  opacity: 0.9;
}

/* Falls Du .kisa-selection-buttons benötigst */
.kisa-selection-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

/* NEU: "Neue Anfrage" Button */
.kisa-new-request-btn {
  width: 100%;
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
  margin-top: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Benachrichtigungs-Bubble auf dem Support Icon */
#kisa-support-icon {
  position: relative;
}
#kisa-support-icon .kisa-notification-bubble {
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
}

/* NEU: Feedback-Buttons im Chatende-Bereich */
.feedback-btn {
  background: linear-gradient(45deg, #0073aa, #00a0d2);
  color: #fff;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  margin-right: 5px;
  font-size: 14px;
  transition: background 0.3s, opacity 0.3s;
}
.feedback-btn:hover {
  opacity: 0.9;
}
.feedback-btn.selected {
  background: #00a0d2;
  cursor: default;
}
.feedback-btn.not-selected {
  background: #cccccc;
  cursor: default;
  opacity: 0.7;
}