/* ===== Eko Chat Widget ===== */
.eko-chat-widget {
  border: 1px solid #E8E4DC;
  border-radius: 12px;
  overflow: hidden;
  background: #FAF7F2;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Messages area */
.eko-messages {
  height: 400px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual message */
.eko-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 85%;
  animation: ekoMsgIn 0.25s ease-out;
}

.eko-msg-user {
  align-self: flex-end;
}

.eko-msg-bot {
  align-self: flex-start;
}

.eko-msg-sender {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9898A3;
}

.eko-msg-content {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}

.eko-msg-user .eko-msg-content {
  background: #685FFF;
  color: white;
  border-bottom-right-radius: 4px;
}

.eko-msg-bot .eko-msg-content {
  background: white;
  color: #1C1C1E;
  border: 1px solid #E8E4DC;
  border-bottom-left-radius: 4px;
}

.eko-msg-bot.error .eko-msg-content {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}

/* Input area */
.eko-input-area {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid #E8E4DC;
  background: white;
}

.eko-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #E8E4DC;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.eko-input:focus {
  border-color: #685FFF;
}

.eko-input:disabled {
  background: #F5F5F5;
}

.eko-send-btn {
  padding: 10px 14px;
  background: #685FFF;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eko-send-btn:hover {
  background: #5A4FE6;
  transform: translateY(-1px);
}

.eko-send-btn:active {
  transform: translateY(0);
}

/* Typing indicator */
.eko-typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: white;
  border: 1px solid #E8E4DC;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.eko-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #685FFF;
  animation: ekoTypingDot 1.4s infinite ease-in-out;
}

.eko-typing-dots span:nth-child(1) { animation-delay: 0s; }
.eko-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.eko-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ekoTypingDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

@keyframes ekoMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
.eko-messages::-webkit-scrollbar {
  width: 6px;
}

.eko-messages::-webkit-scrollbar-track {
  background: transparent;
}

.eko-messages::-webkit-scrollbar-thumb {
  background: #D1D1D6;
  border-radius: 3px;
}

.eko-messages::-webkit-scrollbar-thumb:hover {
  background: #A1A1A6;
}
