/* ===== CS CHATBOT WIDGET ===== */
.chatbot-widget {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 999;
  font-family: Arial, sans-serif;
}

/* ===== CHATBOT TOGGLE BUTTON ===== */
.chatbot-toggle {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ffff, #00ccff);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 8px 40px rgba(0, 255, 255, 0.8);
  }
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(0, 255, 255, 0.7);
}

.chatbot-toggle i {
  font-size: 28px;
  color: #000;
  transition: 0.3s;
}

.chatbot-toggle.active i.bi-chat-dots-fill {
  display: none;
}

.chatbot-toggle i.bi-x-lg {
  display: none;
}

.chatbot-toggle.active i.bi-x-lg {
  display: block;
}

.chatbot-toggle.active i.bi-chat-dots-fill {
  display: none;
}

/* Notification Badge on Toggle */
.chatbot-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  border: 2px solid #fff;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ===== CHATBOT WINDOW ===== */
.chatbot-window {
  position: absolute;
  bottom: 85px;
  left: 0;
  width: 380px;
  height: 550px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(0, 255, 255, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chatbot-window.active {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CHATBOT HEADER ===== */
.chatbot-header {
  background: linear-gradient(135deg, #00ffff, #00ccff);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.chatbot-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #00ffff;
  border: 2px solid #000;
  position: relative;
}

.chatbot-avatar::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #2ed573;
  border-radius: 50%;
  border: 2px solid #000;
}

.chatbot-info {
  flex: 1;
}

.chatbot-info h4 {
  font-size: 16px;
  font-weight: bold;
  color: #000;
  margin: 0;
  margin-bottom: 2px;
}

.chatbot-info p {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chatbot-info p i {
  color: #2ed573;
  font-size: 8px;
}

.chatbot-minimize {
  background: rgba(0, 0, 0, 0.1);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  color: #000;
}

.chatbot-minimize:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

/* ===== CHATBOT MESSAGES AREA ===== */
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.3);
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.5);
}

/* ===== MESSAGE BUBBLES ===== */
.chat-message {
  display: flex;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.bot {
  flex-direction: row;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ffff, #00ccff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #000;
  flex-shrink: 0;
  border: 2px solid rgba(0, 255, 255, 0.3);
}

.message-content {
  max-width: 70%;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message.bot .message-bubble {
  background: rgba(0, 255, 255, 0.15);
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.chat-message.user .message-bubble {
  background: linear-gradient(135deg, #00ffff, #00ccff);
  color: #000;
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 11px;
  color: #888;
  margin-top: 5px;
  padding: 0 5px;
}

.chat-message.bot .message-time {
  text-align: left;
}

.chat-message.user .message-time {
  text-align: right;
}

/* ===== QUICK REPLIES ===== */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  animation: fadeIn 0.5s ease;
}

.quick-reply-btn {
  padding: 8px 15px;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 20px;
  color: #00ffff;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
}

.quick-reply-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: #00ffff;
  transform: translateY(-2px);
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 255, 255, 0.15);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  max-width: fit-content;
}

.typing-indicator.active {
  display: flex;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #00ffff;
  border-radius: 50%;
  animation: typingAnimation 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* ===== CHATBOT INPUT AREA ===== */
.chatbot-input-area {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
}

.chatbot-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: 0.3s;
}

.chatbot-input:focus {
  border-color: #00ffff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.chatbot-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.chatbot-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00ffff, #00ccff);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  flex-shrink: 0;
}

.chatbot-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.5);
}

.chatbot-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatbot-send-btn i {
  font-size: 16px;
  color: #000;
}

/* ===== LOGIN PROMPT ===== */
.login-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  gap: 20px;
}

.login-prompt i {
  font-size: 60px;
  color: rgba(0, 255, 255, 0.3);
}

.login-prompt h3 {
  color: #fff;
  font-size: 20px;
  margin: 0;
}

.login-prompt p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.login-prompt-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #00ffff, #00ccff);
  border: none;
  border-radius: 25px;
  color: #000;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-prompt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 255, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .chatbot-widget {
    bottom: 20px;
    right: 20px;
  }

  .chatbot-toggle {
    width: 55px;
    height: 55px;
  }

  .chatbot-toggle i {
    font-size: 24px;
  }

  .chatbot-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 140px);
    max-height: 500px;
  }

  .message-content {
    max-width: 80%;
  }
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 20px);
    bottom: 75px;
    right: -10px;
  }

  .chatbot-header {
    padding: 15px;
  }

  .chatbot-avatar {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .chatbot-info h4 {
    font-size: 14px;
  }

  .chatbot-info p {
    font-size: 11px;
  }

  .chatbot-messages {
    padding: 15px;
  }
}