/* /public/assets/css/chatbot.css */

body .chat-full-wrapper {
  display: flex !important;
  flex-direction: column !important;
  /* This matches your header's exact width */
  width: calc(100% - 32px) !important; 
  max-width: 1180px !important; 
  margin: 2px auto 0 auto !important; /* Centers the box and adds space below the header */
  
  /* Keep the rest of these as they were */
  height: calc(100vh - 180px) !important; 
  background: #ffffff !important;
  border: 1px solid #A3A3A3 !important; 
  border-radius: 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body .chat-header {
  padding: 16px 24px !important;
  border-bottom: 1px solid #A3A3A3 !important; /* Visible horizontal line */
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: #f9fafb !important;
  flex-shrink: 0 !important;
}

body .chat-header h3 {
  margin: 0 !important;
  font-size: 16px !important;
  color: #111827 !important;
  font-weight: 600 !important;
}

body .model-badge {
  font-size: 11px !important;
  padding: 4px 10px !important;
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #000 !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

/* THE SINGLE SCROLLING AREA */
body .chat-scroll {
  flex: 1 1 auto !important;
  overflow-y: auto !important; /* Only inside box scrolls */
  padding: 24px !important;
  background: #ffffff !important;
}

body .chat-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* Message Bubbles */
body .msg {
  display: flex !important;
  gap: 12px !important;
  max-width: 85% !important;
}

body .msg.user {
  align-self: flex-end !important;
  flex-direction: row-reverse !important;
}

body .msg.ai {
  align-self: flex-start !important;
}

body .avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  font-size: 13px !important;
  flex-shrink: 0 !important;
  border: 1px solid #000 !important;
}

body .avatar.user { background: #111827 !important; color: #fff !important; }
body .avatar.ai { background: #3b82f6 !important; color: #fff !important; }

body .bubble-wrap {
  display: flex !important;
  flex-direction: column !important;
}

body .msg.user .bubble-wrap { align-items: flex-end !important; }

body .bubble-name {
  font-size: 12px !important;
  color: #6b7280 !important;
  margin-bottom: 4px !important;
  font-weight: 500 !important;
}

body .bubble {
  padding: 12px 16px !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #111827 !important;
  word-wrap: break-word !important;
  white-space: pre-wrap !important;
  border: 1px solid #000 !important;
}

body .msg.user .bubble { background: #f3f4f6 !important; }
body .msg.ai .bubble { background: #ffffff !important; }

/* Typing Indicator */
body .typing { display: inline-flex !important; gap: 4px !important; padding: 4px 0 !important; }
body .typing span { width: 6px !important; height: 6px !important; border-radius: 50% !important; background: #9ca3af !important; animation: blink 1.4s infinite both !important; }
body .typing span:nth-child(2) { animation-delay: 0.2s !important; }
body .typing span:nth-child(3) { animation-delay: 0.4s !important; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* Input Area */
body .composer-wrap {
  padding: 16px 24px !important;
  border-top: 1px solid #A3A3A3 !important; /* Visible horizontal line */
  background: #ffffff !important;
  flex-shrink: 0 !important;
}

body .composer {
  display: flex !important;
  align-items: flex-end !important;
  gap: 12px !important;
  background: #ffffff !important;
  border: 1px solid #A3A3A3 !important;
  border-radius: 8px !important;
  padding: 8px 8px 8px 16px !important;
}

body .composer textarea {
  flex: 1 !important;
  resize: none !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  color: #111827 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  max-height: 150px !important;
  padding: 8px 0 !important;
  box-shadow: none !important; /* Removes Bootstrap focus glow */
}

body .send-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 6px !important;
  border: 1px solid #000 !important;
  background: #3b82f6 !important;
  color: white !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body .send-btn:disabled {
  background: #9ca3af !important;
  cursor: not-allowed !important;
}

/* Empty State */
body .empty-state {
  text-align: center !important;
  margin-top: 60px !important;
  color: #6b7280 !important;
}

body .empty-state h2 {
  font-size: 22px !important;
  color: #111827 !important;
  margin-bottom: 8px !important;
}