/* ============================================================
   ELHASSANE STUDIO - AI Construction Manager
   الملف: public/css/nlp-chat.css - أنماط المساعد الذكي
   ============================================================ */

/* حاوية الدردشة */
.nlp-container {
  max-width: 900px;
  margin: 0 auto;
  height: calc(100vh - 180px);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* رأس الدردشة */
.nlp-header {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nlp-avatar {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* منطقة الرسائل */
.nlp-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* فقاعة الرسالة */
.nlp-msg {
  max-width: 80%;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  line-height: 1.7;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.nlp-msg.user {
  align-self: flex-end;
  background: #1d4ed8;
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.nlp-msg.bot {
  align-self: flex-start;
  background: white;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 0.25rem;
}

/* مؤشر الكتابة */
.nlp-typing {
  display: inline-flex;
  gap: 4px;
  padding: 0.4rem 0;
}

.nlp-typing span {
  width: 8px;
  height: 8px;
  background: #64748b;
  border-radius: 50%;
  animation: nlp-bounce 1.2s infinite ease-in-out;
}

.nlp-typing span:nth-child(2) { animation-delay: 0.2s; }
.nlp-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes nlp-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* شريط الاقتراحات */
.nlp-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.nlp-quick-actions button {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nlp-quick-actions button:hover {
  background: #1d4ed8;
  color: white;
}

/* إدخال الرسالة */
.nlp-input-area {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.nlp-input-area textarea {
  flex: 1;
  resize: none;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  min-height: 48px;
  max-height: 120px;
  outline: none;
  transition: border-color 0.2s;
}

.nlp-input-area textarea:focus {
  border-color: #1d4ed8;
}

.nlp-input-area button {
  background: #1d4ed8;
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0 1.25rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.nlp-input-area button:hover {
  background: #1e40af;
}

/* الوضع الليلي */
.dark .nlp-container {
  background: #1f2937;
}

.dark .nlp-messages {
  background: #111827;
}

.dark .nlp-msg.bot {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}

.dark .nlp-quick-actions {
  background: #1f2937;
  border-color: #374151;
}

.dark .nlp-quick-actions button {
  background: #1e3a8a;
  border-color: #2563eb;
}

.dark .nlp-input-area {
  background: #1f2937;
  border-color: #374151;
}

.dark .nlp-input-area textarea {
  background: #111827;
  border-color: #374151;
  color: #e5e7eb;
}
