/* Ai Chatbot Widget */

.ai-chat-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  font-family: Inter, Arial, sans-serif;
}

#chatToggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #111827, #2563eb);
  color: white;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
  transition: 0.3s ease;
}

#chatToggle:hover {
  transform: translateY(-4px) scale(1.04);
}

.chat-box {
  display: none;
  width: 380px;
  height: 560px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: absolute;
  bottom: 85px;
  right: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.chat-header {
  padding: 20px;
  background: linear-gradient(135deg, #111827, #1d4ed8);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header strong {
  font-size: 16px;
}

.chat-header small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.8;
}

#closeChat {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

#closeChat:hover {
  background: rgba(255, 255, 255, 0.25);
}

.chat-messages {
  height: 390px;
  padding: 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 35%),
    #f8fafc;
}

.bot-message,
.user-message {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  max-width: 82%;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.25s ease;
}

.bot-message {
  background: white;
  color: #111827;
  border-bottom-left-radius: 4px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.user-message {
  background: linear-gradient(135deg, #111827, #2563eb);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  height: 70px;
  padding: 12px;
  display: flex;
  gap: 10px;
  background: white;
  border-top: 1px solid #e5e7eb;
}

#chatInput {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  background: #f9fafb;
}

#chatInput:focus {
  border-color: #2563eb;
  background: white;
}

#sendMessage {
  border: none;
  border-radius: 14px;
  padding: 0 18px;
  background: #111827;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: 0.25s;
}

#sendMessage:hover {
  background: #2563eb;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}