/* Algemene layout */
body {
  background-color: #0f172a; /* donkerblauw */
  font-family: system-ui, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  color: #f8fafc;
}

.chat {
  background: #1e293b; /* paneel */
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  overflow: hidden;
}

/* Header */
.chat__header {
  background: #0f172a;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  border-bottom: 1px solid #334155;
}

/* Berichtenlijst */
.messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
}

.bubble {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 75%;
  white-space: pre-wrap;
  line-height: 1.4;
}

.message--user .bubble {
  background: #2563eb; /* blauw */
  color: #fff;
  margin-left: auto;
}

.message--bot .bubble {
  background: #334155; /* donkergrijs-blauw */
  color: #f1f5f9;
}

/* Typing indicator (3 puntjes animatie) */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #334155;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #f1f5f9;
  border-radius: 50%;
  display: inline-block;
  animation: bounce 1.2s infinite;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Inputbalk */
.inputbar {
  background: #0f172a;
  padding: 8px;
  border-top: 1px solid #334155;
}

.inputbar__inner {
  display: flex;
  gap: 8px;
}

#input {
  flex: 1;
  min-height: 44px;
  resize: none;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 1rem;
  background: #1e293b;
  color: #f8fafc;
}

#input:focus {
  outline: 2px solid #2563eb;
}

.btn {
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.btn:hover {
  background: #1d4ed8;
}
