/* assets/css/frontend.css */

/* Container: immer 100% Breite des umgebenden Elements */
#kb-chat-container {
  /* border: 1px solid #ddd; */  /* äußere Linie entfernt */
  padding: 10px;
  width: 100%;
  font-family: sans-serif;
}

/* Quicklinks */
#kb-quicklinks-container {
  margin-bottom: 10px;
}

.kb-quicklink-button {
  margin: 2px 4px 2px 0;
  padding: 4px 8px;
  border: 1px solid #ccc;
  background: #eee;
  cursor: pointer;
  font-size: 14px;
}

.kb-quicklink-button:hover {
  background: #ddd;
}

/* Chat-Log */
#kb-chat-log {
  height: 300px;
  overflow-y: auto;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  padding: 5px;
  background: #fafafa;
  position: relative;
}

/* Auf größeren Displays (ab 501px) 400px Höhe */
@media (min-width: 501px) {
  #kb-chat-log {
    height: 400px;
  }
}

/* Message Bubbles */
.kb-msg {
  display: inline-block;
  clear: both;
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

.kb-msg-user {
  float: right;
  background:#6e7e00;
  color: white;
  font-size: 18px;
}

.kb-msg-bot {
  float: left;
  background: #e5e5ea;
  color: #000;
  font-size: 18px;
}

/* Typing indicator ("Toni denkt...") */
#kb-typing {
  display: inline-block;
  clear: both;
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: 18px;
  background: #e5e5ea;
  color: #555;
  font-size: 18px;
  float: left;
}

/* Punkte-Animation: immer drei Punkte, die nacheinander hervorgehoben werden */
.typing-dots {
  display: inline-block;
}
.typing-dots .dot {
  opacity: 0.3;
  animation: blink 1s infinite;
}
.typing-dots .dot1 { animation-delay: 0s; }
.typing-dots .dot2 { animation-delay: 0.2s; }
.typing-dots .dot3 { animation-delay: 0.4s; }

@keyframes blink {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* Form */
#kb-chat-form {
  display: flex;
  align-items: center;
}

#kb-chat-input {
  flex: 1;
  height: 50px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  padding: 0 0 0 4px;
}

#kb-chat-form button {
  margin-left: 6px;
  height: 50px;
  padding: 6px 12px;
  font-size: 18px;
  background: #308ac9;   /* Primärbutton-Hintergrund angepasst */
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#kb-chat-form button:disabled {
  background: #999;
  cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 500px) {
  #kb-chat-container {
    width: 100%;
  }
  .kb-msg {
    max-width: 100%;
  }
  #kb-chat-input {
    height: 40px;
    font-size: 16px;
    padding: 0 0 0 4px;
  }
  #kb-chat-form button {
    height: 40px;
    font-size: 16px;
  }
  .kb-msg-user,
  .kb-msg-bot,
  #kb-typing {
    font-size: 16px;
  }
}
