/* استایل‌های چت بات */

.chatbot-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.chatbot-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 20px;
}

.chatbot-header p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

.chatbot-clear {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  transition: 0.3s;
}

.chatbot-clear:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.chatbot-messages {
  height: 450px;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* پیام کاربر */
.chatbot-message.user {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.chatbot-message.user .message-bubble {
  max-width: 70%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 20px;
  border-top-left-radius: 5px;
  padding: 12px 18px;
  color: white;
}

.chatbot-message.user .user-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  flex-shrink: 0;
}

/* پیام ربات */
.chatbot-message.bot {
  display: flex;
  gap: 12px;
}

.chatbot-message.bot .message-bubble {
  max-width: 70%;
  background: white;
  border-radius: 20px;
  border-top-right-radius: 5px;
  padding: 12px 18px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chatbot-message.bot .bot-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.message-text {
  font-size: 14px;
  line-height: 1.5;
}

.message-translate {
  font-size: 11px;
  color: #666;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

/* ناحیه ورودی */
.chatbot-input-area {
  padding: 20px;
  background: white;
  border-top: 1px solid #eee;
  display: flex;
  gap: 12px;
}

.chatbot-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 14px;
  transition: 0.3s;
}

.chatbot-input:focus {
  outline: none;
  border-color: var(--primary);
}

.chatbot-send,
.chatbot-mic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.chatbot-send {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.chatbot-mic {
  background: var(--primary);
  color: white;
}

.chatbot-send:hover,
.chatbot-mic:hover {
  transform: scale(1.05);
}

/* پیشنهادات */
.chatbot-suggestions {
  padding: 15px 20px;
  background: #f8f9fa;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid #eee;
}

.suggestion-btn {
  background: white;
  border: 1px solid #e0e0e0;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.3s;
  font-family: "Vazirmatn", sans-serif;
}

.suggestion-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* وضعیت اتصال */
.chatbot-status {
  padding: 10px 20px;
  font-size: 11px;
  text-align: center;
  border-top: 1px solid #eee;
}

.chatbot-status.online {
  background: #e8f5e9;
  color: #2e7d32;
}

.chatbot-status.offline {
  background: #ffebee;
  color: #c62828;
}

/* انیمیشن تایپینگ */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.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 typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .chatbot-message.user .message-bubble,
  .chatbot-message.bot .message-bubble {
    max-width: 85%;
  }

  .chatbot-messages {
    height: 400px;
  }

  .suggestion-btn {
    font-size: 10px;
    padding: 6px 12px;
  }
}
