/* ========================
   Floating Chatbot Button
======================== */
.chatbot-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: linear-gradient(135deg, #3c65bf, #2f54a3, #223c7a);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 9999;
  animation: pulseBtn 1.8s infinite;
}
.chatbot-toggle:hover {
  transform: scale(1.15) rotate(8deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Floating button pulse effect */
@keyframes pulseBtn {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 84, 163, 0.6);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(47, 84, 163, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 84, 163, 0);
  }
}

/* ========================
   Chatbot Container
======================== */
.chatbot-container {
  position: fixed;
  bottom: 90px;
  left: 20px;
  width: 330px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 16000161;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.35s ease;
}
.chatbot-container.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ========================
   Chatbot Header
======================== */
.chatbot-header {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: #fff;
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-header span {
  font-size: 15px;
  letter-spacing: 0.5px;
}
.chatbot-header button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 6px;
  transition: background 0.2s;
}
.chatbot-header button:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ========================
   Messages Area
======================== */
.chatbot-messages {
  max-height: 500px;
  overflow-y: auto;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
  background: #f9fafb;
  scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}
.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* ========================
   Messages
======================== */
.msg {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 80%;
  animation: fadeInUp 0.35s ease both;
}
.msg.user {
  background: #4f46e5;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.msg.bot {
  background: #e5e7eb;
  color: #111;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

/* ========================
   Input Box & Send Button
======================== */
.chatbot-input {
  display: flex;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.chatbot-input input {
  flex: 1;
  padding: 12px;
  border: none;
  outline: none;
  font-size: 14px;
}
.chatbot-input button {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: #fff;
  border: none;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}
.chatbot-input button:hover {
  background: linear-gradient(135deg, #4338ca, #2563eb);
  transform: scale(1.05);
}

/* ========================
   Typing Dots
======================== */
.typing {
  display: inline-flex;
  align-items: center;
}
.typing span {
  height: 6px;
  width: 6px;
  margin: 0 2px;
  background: #4f46e5;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ========================
   Animations
======================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================
   Option Buttons (SoftX / AI)
======================== */
.chatbot-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.chatbot-options button {
  background: #8e44ad; /* highlight purple */
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s ease;
}
.chatbot-options button:hover {
  background: #9b59b6;
  transform: scale(1.05);
}

/* ========================
   Footer Branding
======================== */
#chatbot-footer {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}
#chatbot-footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}
#chatbot-footer a:hover {
  text-decoration: underline;
}

/* ========================
   Responsive
======================== */
@media (max-width: 420px) {
  .chatbot-container {
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }
}
