/* ==============================================
   styles.css — Minimal styles for Darfi chatbot
   ============================================== */

/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background: #2c6e49;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

header h1 {
  font-size: 1.4rem;
}

header p {
  font-size: 0.9rem;
  margin-top: 0.25rem;
  opacity: 0.85;
}

/* Main layout */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

/* Darfi avatar placeholder */
.darfi-avatar {
  width: 120px;
  height: 120px;
  background: #ddd;
  border-radius: 50%;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #999;
  transition: transform 0.3s ease;
}

/* Animation class — added/removed via JS when Darfi "speaks" */
.darfi-avatar.speaking {
  transform: scale(1.1);
}

/* Chat container */
.chat-container {
  width: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  min-height: 300px;
  max-height: 450px;
}

/* Individual messages */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  max-width: 85%;
  word-wrap: break-word;
}

.message.user {
  background: #d4edda;
  align-self: flex-end;
}

.message.darfi {
  background: #e8e8e8;
  align-self: flex-start;
}

/* Input area */
.input-area {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

#user-input {
  flex: 1;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#btn-send,
#btn-voice {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#btn-send {
  background: #2c6e49;
  color: #fff;
}

#btn-voice {
  background: #e0a800;
  color: #fff;
}

#btn-voice.listening {
  background: #c0392b;
}

/* Footer */
footer {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #777;
  border-top: 1px solid #ddd;
}
