/* ============================================================
   ELHASSANE STUDIO - AI Construction Manager
   الملف: public/css/chat.css - أنماط المحادثات
   ============================================================ */

.chat-app {
  height: calc(100vh - 120px);
}

.chat-sidebar {
  min-width: 280px;
  max-width: 320px;
  background: #ffffff;
}

.dark .chat-sidebar {
  background: #1a1a2e;
}

.room-item {
  transition: all 0.2s ease;
}

.room-item:hover {
  background: #f1f5f9;
}

.dark .room-item:hover {
  background: #2d2d5a;
}

.room-item.active {
  background: #dbeafe;
}

.dark .room-item.active {
  background: #1e3a5f;
}

.chat-main {
  background: #f8fafc;
}

.dark .chat-main {
  background: #111827;
}

.message-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.message-group.mine {
  align-items: flex-end;
}

.message-group.theirs {
  align-items: flex-start;
}

.message {
  max-width: 70%;
  padding: 8px 14px;
  border-radius: 12px;
  word-wrap: break-word;
}

.message.mine {
  background: #3b82f6;
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

.message.theirs {
  background: #e5e7eb;
  color: #1a202c;
  border-bottom-right-radius: 4px;
}

.dark .message.theirs {
  background: #374151;
  color: #e2e8f0;
}

.message .message-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  margin-bottom: 2px;
}

.message.mine .message-header {
  color: rgba(255, 255, 255, 0.8);
}

.message.theirs .message-header {
  color: #6b7280;
}

.dark .message.theirs .message-header {
  color: #9ca3af;
}

.message .message-sender {
  font-weight: 600;
}

.message .message-time {
  opacity: 0.7;
}

.message .message-text {
  font-size: 14px;
  line-height: 1.6;
}

.message .message-file {
  margin-top: 4px;
}

.message .message-mentions {
  margin-top: 4px;
  font-size: 11px;
}

.message-actions {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.message-group:hover .message-actions {
  opacity: 1;
}

.message-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}

#typingIndicator {
  height: 20px;
  color: #6b7280;
  font-size: 12px;
}

.dark #typingIndicator {
  color: #9ca3af;
}
