/* AI Chatbot Styles */
#ai-chatbot-container {
  position: fixed;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ai-chatbot-bottom-right {
  bottom: 20px;
  right: 20px;
}

.ai-chatbot-bottom-left {
  bottom: 20px;
  left: 20px;
}

.ai-chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ai-chatbot-toggle.ai-chatbot-active {
  background-color: #ef4444 !important;
}

.ai-chatbot-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 384px;
  height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 480px) {
  .ai-chatbot-window {
    width: calc(100vw - 40px);
    height: 70vh;
    right: -10px;
  }
}

.ai-chatbot-header {
  padding: 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chatbot-header-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.ai-chatbot-status {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.ai-chatbot-close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.ai-chatbot-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ai-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-chatbot-welcome {
  text-align: center;
  padding: 20px 0;
}

.ai-chatbot-bot-icon {
  width: 48px;
  height: 48px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: white;
}

.ai-chatbot-services {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.ai-chatbot-service-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.ai-chatbot-service-btn:hover {
  background: #f8fafc;
  border-color: #3b82f6;
}

.ai-chatbot-service-icon {
  font-size: 18px;
}

.ai-chatbot-service-name {
  font-weight: 600;
  font-size: 14px;
}

.ai-chatbot-service-desc {
  font-size: 12px;
  color: #6b7280;
}

.ai-chatbot-user-message {
  display: flex;
  justify-content: flex-end;
}

.ai-chatbot-user-message .ai-chatbot-message-content {
  background: #3b82f6;
  color: white;
  padding: 8px 12px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

.ai-chatbot-bot-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ai-chatbot-bot-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.ai-chatbot-bot-message .ai-chatbot-message-content {
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

.ai-chatbot-typing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chatbot-typing-dots {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 18px;
}

.ai-chatbot-typing-dots span {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: ai-chatbot-typing 1.4s infinite ease-in-out;
}

.ai-chatbot-typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.ai-chatbot-typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes ai-chatbot-typing {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.ai-chatbot-input-container {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
}

#ai-chatbot-form {
  display: flex;
  gap: 8px;
}

#ai-chatbot-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

#ai-chatbot-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#ai-chatbot-send {
  width: 36px;
  height: 36px;
  border: none;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

#ai-chatbot-send:hover:not(:disabled) {
  background: #2563eb;
}

#ai-chatbot-send:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Modal Styles */
.ai-chatbot-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ai-chatbot-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.ai-chatbot-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chatbot-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

#ai-chatbot-lead-form {
  padding: 20px;
}

.ai-chatbot-service-info {
  background: #dbeafe;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.ai-chatbot-contact-preference {
  margin-bottom: 16px;
}

.ai-chatbot-contact-preference label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.ai-chatbot-radio-group {
  display: flex;
  gap: 16px;
}

.ai-chatbot-radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  cursor: pointer;
}

.ai-chatbot-form-group {
  margin-bottom: 16px;
}

.ai-chatbot-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 14px;
}

.ai-chatbot-form-group input,
.ai-chatbot-form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

.ai-chatbot-form-group input:focus,
.ai-chatbot-form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ai-chatbot-submit-btn {
  width: 100%;
  padding: 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ai-chatbot-submit-btn:hover:not(:disabled) {
  background: #2563eb;
}

.ai-chatbot-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.ai-chatbot-form-footer {
  padding: 16px 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}
