#sales-chatbot * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#sales-chatbot body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
}

#sales-chatbot .chat-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 450px;
  height: 600px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

#sales-chatbot .chat-container.active {
  transform: translateY(0);
  opacity: 1;
}

#sales-chatbot .chat-header {
  background: #28023d;
  color: white;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

#sales-chatbot .chat-header h3 {
  font-size: 16px;
  font-weight: 600;
}

#sales-chatbot .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

#sales-chatbot .close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

#sales-chatbot .chat-messages {
  flex: 1 1 auto;
  padding: 20px;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  background: #f8fafc;
}

#sales-chatbot .message {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

#sales-chatbot .message-content {
  max-width: 85%;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

#sales-chatbot .bot-message {
  justify-content: flex-start;
}

#sales-chatbot .bot-message .message-content {
  background-color: #ffffff;
  color: black;
  border-bottom-left-radius: 4px;
  border: 1px solid #e5e7eb;
}

#sales-chatbot .user-message {
  justify-content: flex-end;
}

#sales-chatbot .user-message .message-content {
  background: #28023d;
  color: white;
  border-bottom-right-radius: 6px;
}

#sales-chatbot .quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
  width: 100%;
}

#sales-chatbot .quick-reply-btn {
  background: white;
  border: 2px solid #28023d;
  color: #28023d;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
}

#sales-chatbot .quick-reply-btn:hover {
  background: #28023d;
  color: white;
  transform: translateX(5px);
}

#sales-chatbot .quick-reply-btn:active {
  transform: translateX(3px);
}

#sales-chatbot .chat-input-container {
  padding: 20px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  background: white;
  position: relative;
  z-index: 10;
}

#sales-chatbot #messageInput {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, height 0.1s ease;
  min-height: 44px;
  max-height: 120px;
  height: 44px;
  resize: none;
  overflow-y: hidden;
  line-height: 1.4;
  font-family: inherit;
}

#sales-chatbot #messageInput:focus {
  /*border-color: #28023d;*/
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#sales-chatbot #sendBtn {
  background: #28023d;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sales-chatbot #sendBtn:hover {
  transform: translateY(-2px);
}

#sales-chatbot #sendBtn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

#sales-chatbot .chat-toggle:hover {
  transform: scale(1.1);
}

#sales-chatbot .typing-indicator {
  display: none;
  padding: 10px 20px;
}

#sales-chatbot .typing-dots {
  display: flex;
  gap: 4px;
}

#sales-chatbot .typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #28023d;
  animation: typing 1.4s infinite ease-in-out;
}

#sales-chatbot .typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
#sales-chatbot .typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Form Styles */
#sales-chatbot .form-group {
  margin-bottom: 15px;
}

#sales-chatbot .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

#sales-chatbot .form-group input,
#sales-chatbot .form-group select,
#sales-chatbot .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

#sales-chatbot .form-group input:focus,
#sales-chatbot .form-group select:focus,
#sales-chatbot .form-group textarea:focus {
  border-color: #28023d;
}

#sales-chatbot .submit-btn {
  background: #28023d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  transition: transform 0.2s;
}

#sales-chatbot .submit-btn:hover {
  transform: translateY(-2px);
}

#sales-chatbot .error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
}

#sales-chatbot .success-message {
  color: #28a745;
  background-color: #d4edda;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Modal Overlay */
#sales-chatbot .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

#sales-chatbot .modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Prevent body scroll when modal is open */
#sales-chatbot .chatbot-modal-open ~ body {
  overflow: hidden;
}

/* Modal Chatbot Container */
#sales-chatbot .chat-container.modal-active {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 650px;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 2001;
  opacity: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Update modal close button for better visibility */
#sales-chatbot .chat-container.modal-active .close-btn {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sales-chatbot .chat-container.modal-active .close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Adjust toggle button text for reopening */
#sales-chatbot .chat-toggle.minimized {
  background: #28a745;
}

#sales-chatbot .chat-toggle.minimized:hover {
  background: #218838;
}

/* Enhanced form styling for better modal appearance */
#sales-chatbot .chat-container.modal-active .form-group input,
#sales-chatbot .chat-container.modal-active .form-group select,
#sales-chatbot .chat-container.modal-active .form-group textarea {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  transition: all 0.2s ease;
}

#sales-chatbot .chat-container.modal-active .form-group input:focus,
#sales-chatbot .chat-container.modal-active .form-group select:focus,
#sales-chatbot .chat-container.modal-active .form-group textarea:focus {
  border-color: #28023d;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#sales-chatbot .chat-container.modal-active .submit-btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#sales-chatbot .chat-container.modal-active .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Progress Bar Styles */
#sales-chatbot .progress-container {
  background: #f0f0f0;
  border-radius: 10px;
  padding: 3px;
  margin: 10px 0;
}

#sales-chatbot .progress-bar {
  background: #28023d;
  height: 8px;
  border-radius: 8px;
  width: 0%;
  transition: width 0.3s ease;
}

#sales-chatbot .processing-message {
  background: linear-gradient(135deg, #e8f4f8 0%, #f0f8ff 100%);
  border-left: 4px solid #28023d;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
}

#sales-chatbot .processing-message .spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#sales-chatbot .status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

#sales-chatbot .status-processing {
  background: #ffc107;
  animation: pulse 1.5s infinite;
}

#sales-chatbot .status-complete {
  background: #28a745;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

#sales-chatbot .message-content h1,
#sales-chatbot .message-content h2,
#sales-chatbot .message-content h3 {
  font-weight: bold;
  margin: 0.5em 0 0.2em 0;
}

/* ADD THIS: */
#sales-chatbot .message-content strong,
#sales-chatbot .message-content b {
  font-weight: bold;
}

#sales-chatbot .message-content ul,
#sales-chatbot .message-content ol {
  padding-left: 2em;
  margin: 0.5em 0;
}
#sales-chatbot .message-content code {
  background: #f7f7fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95em;
}
#sales-chatbot .message-content pre {
  background: #222;
  color: #eee;
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
}

#sales-chatbot #chatContainer {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-height: 90dvh;
  height: 90vh;
  height: 90dvh;
  overflow: hidden;
}

#sales-chatbot .inline-chatbot-btn {
  display: inline-block;
  margin-top: 18px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 0.8rem 1.7rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.12);
  transition: background 0.18s;
}
#sales-chatbot .inline-chatbot-btn:hover,
#sales-chatbot .inline-chatbot-btn:focus {
  background: #5a67d8;
  outline: none;
}

/* ===== MOBILE STYLES - CENTERED MODAL LIKE WELCOME MODAL ===== */
@media (max-width: 768px) {
  /* Keep body from scrolling */
  #sales-chatbot .chatbot-modal-open ~ body {
    overflow: hidden;
  }

  /* Modal Overlay */
  #sales-chatbot .modal-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  /* CENTERED MODAL - Like the welcome modal */
  #sales-chatbot .chat-container.modal-active {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 95% !important;
    max-width: 420px !important;
    height: auto !important;
    max-height: 85vh !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    z-index: 2001;
  }

  #sales-chatbot #chatContainer {
    display: flex;
    flex-direction: column;
    height: 800px !important;
    max-height: 85vh !important;
    border-radius: 15px !important;
  }

  /* Header stays at top */
  #sales-chatbot .chat-header {
    flex-shrink: 0;
    border-radius: 15px 15px 0 0;
  }

  /* Messages area scrollable */
  #sales-chatbot #chatMessages {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px;
    min-height: 200px;
    max-height: calc(85vh - 180px);
    overscroll-behavior: contain;
  }

  /* Input stays at bottom */
  #sales-chatbot .chat-input-container {
    flex: 0 0 auto;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 20;
    display: flex;
    gap: 8px;
    align-items: center;
    border-radius: 0 0 15px 15px;
  }

  #sales-chatbot #messageInput {
    flex: 1 1 auto;
    min-height: 44px;
    max-height: 100px;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 16px !important;
    border: 1px solid #d1d5db;
    resize: none;
    overflow-y: auto;
  }

  #sales-chatbot #sendBtn {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    border-radius: 10px;
    background: #28023d;
    color: white;
    border: none;
    padding: 0 16px;
  }

  /* Form styling on mobile */
  #sales-chatbot .form-group input,
  #sales-chatbot .form-group select {
    font-size: 16px !important;
    padding: 12px;
  }

  #sales-chatbot .submit-btn {
    font-size: 16px;
    padding: 14px;
    min-height: 48px;
  }

  /* Quick reply buttons */
  #sales-chatbot .quick-reply-btn {
    padding: 12px 16px;
    font-size: 15px;
    min-height: 44px;
  }
}

/* Remove the @media (max-width: 600px) section completely */
