:root {
  --ikea-blue: #0058a3;
  --ikea-blue-dark: #00427a;
  --ikea-yellow: #ffda1a;
  --bg-main: #f4f4f4;
  --bg-chat: #ffffff;
  --bubble-user: #fff7cc;
  --bubble-bot: #f0f4f8;
  --border-soft: #e0e0e0;
  --text-main: #222222;
  --text-muted: #666666;
}

body {
  font-weight:400;
  font-family: var(--ikea-font);
  margin: 0;
  padding: 0;
  background: var(--bg-main);
  display: flex;
  justify-content: center;
}

.chat-container {
  width: 100%;
  max-width: 650px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 16px;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-chat);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.message {
  margin-bottom: 12px;
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.4;
  color: var(--text-main);
}
.message.user {
  background: var(--bubble-user);
  align-self: flex-end;
  margin-left: auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.message.bot {
  background: var(--bubble-bot);
  align-self: flex-start;
  margin-right: auto;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.message .role {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.message .text {
  font-size: 14px;
  white-space: pre-wrap;
}
.message .text a {
  color: var(--ikea-blue);
  text-decoration: underline;
}
.message .text ul {
  margin: 4px 0 4px 0;
  padding-left: 1.2em;
  list-style-type: disc;
}
.message .text li {
  margin-bottom: 2px;
}

/* Typing indicator */
.dots {
  display: inline-flex;
  align-items: center;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-left: 3px;
  animation: dotBlink 1.3s infinite ease-in-out;
}
.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlink {
  0%, 20% { opacity: 0.2; transform: translateY(0); }
  40%     { opacity: 1;   transform: translateY(-1px); }
  100%    { opacity: 0.2; transform: translateY(0); }
}

/* Feedback */
.feedback-buttons {
  margin-top: 6px;
  font-size: 13px;
}
.feedback-buttons button {
  margin-right: 4px;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  padding: 2px 8px;
  font-size: 13px;
}
.feedback-buttons button:hover {
  background: #f3f3f3;
}
.feedback-status {
  font-size: 12px;
  color: #2e7d32;
  margin-top: 2px;
}

/* Input area */
.chat-input-area {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}
.chat-input-area textarea {
  flex: 1;
  resize: none;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.chat-input-area textarea:focus {
  outline: 2px solid var(--ikea-blue);
  outline-offset: 1px;
}
.chat-input-area button {
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  border: none;
  background: var(--ikea-blue);
  color: #ffffff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.chat-input-area button:hover {
  background: var(--ikea-blue-dark);
}
.chat-input-area button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}
.send-icon {
  display: inline-block;
  transform: translateY(1px);
}
