/* Support AI Chat Styles */

/* Chat Button Pulse Animation */
@keyframes chatPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(168, 85, 247, 0);
  }
}

#supportChatBtn {
  animation: chatPulse 2s infinite;
}

#supportChatBtn:hover {
  transform: scale(1.1);
  animation: none;
}

/* Chat Window Slide In Animation */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#supportChatWindow:not(.hidden) {
  animation: slideInUp 0.3s ease-out;
}

/* Chat Messages Scrollbar */
#chatMessages {
  scrollbar-width: thin;
  scrollbar-color: #a855f7 #f3f4f6;
}

#chatMessages::-webkit-scrollbar {
  width: 6px;
}

#chatMessages::-webkit-scrollbar-track {
  background: #f3f4f6;
}

#chatMessages::-webkit-scrollbar-thumb {
  background: #a855f7;
  border-radius: 3px;
}

#chatMessages::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

/* Chat Input Auto-resize */
#chatInput {
  transition: height 0.2s ease;
}

/* Message Fade In */
@keyframes messageFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#chatMessages > .flex {
  animation: messageFadeIn 0.3s ease-out;
}

/* Loading Indicator */
#chatLoading .animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Notification Badge Pulse */
#chatNotificationBadge:not(.hidden) {
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  #supportChatWindow {
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
  }

  #supportChatBtn {
    bottom: 1rem;
    right: 1rem;
    width: 3.5rem;
    height: 3.5rem;
  }

  #supportChatBtn .group-hover\:opacity-100 {
    display: none; /* Hide tooltip on mobile */
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  #supportChatWindow {
    background-color: #1f2937;
  }

  #chatMessages {
    background-color: #111827;
  }

  #chatMessages .bg-white {
    background-color: #374151;
  }

  #chatMessages .text-gray-700 {
    color: #d1d5db;
  }

  #chatInput {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
  }
}
