/* ============================================
   VOID CHATBOT - Professional Modern Design
   ============================================ */

:root {
  --void-primary: #3b82f6;
  --void-secondary: #60a5fa;
  --void-dark: #1f2937;
  --void-darker: #111827;
  --void-light: #f9fafb;
  --void-border: #e5e7eb;
  --void-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --void-text: #111827;
  --void-text-secondary: #6b7280;
}

/* Chatbot Container */
#void-chatbot {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Toggle Button */
#void-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

#void-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

#void-toggle-btn:active {
  transform: scale(0.95);
}

#void-toggle-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Notification Badge */
.void-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 50%;
  border: 2px solid white;
  animation: voidNotificationPulse 2s ease-in-out infinite;
}

/* Chat Window */
#void-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: voidSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#void-chat-window.active {
  display: flex;
}

/* Header */
#void-chat-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  padding: 20px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.void-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.void-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  backdrop-filter: blur(10px);
}

.void-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.void-name {
  color: white;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.void-status {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.void-status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: voidBlink 2s ease-in-out infinite;
}

.void-header-actions {
  display: flex;
  gap: 8px;
}

.void-action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.void-action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Messages Container */
#void-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f9fafb;
}

#void-messages::-webkit-scrollbar {
  width: 6px;
}

#void-messages::-webkit-scrollbar-track {
  background: #f9fafb;
}

#void-messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

#void-messages::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Message Bubble */
.void-message {
  display: flex;
  gap: 10px;
  animation: voidFadeIn 0.3s ease-out;
}

.void-message.user {
  flex-direction: row-reverse;
}

.void-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.void-message.user .void-message-avatar {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.void-message-content {
  max-width: 75%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.void-message-bubble {
  background: white;
  padding: 12px 16px;
  border-radius: 16px;
  color: #111827;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  word-wrap: break-word;
}

.void-message.user .void-message-bubble {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.void-message-time {
  font-size: 11px;
  color: #9ca3af;
  padding: 0 8px;
}

.void-message.user .void-message-time {
  text-align: right;
}

/* Typing Indicator */
.void-typing {
  display: flex;
  gap: 5px;
  padding: 12px 16px;
  background: white;
  border-radius: 16px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.void-typing-dot {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: voidTyping 1.4s ease-in-out infinite;
}

.void-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.void-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Quick Replies */
.void-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.void-quick-reply {
  background: white;
  border: 1.5px solid #e5e7eb;
  color: #3b82f6;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.void-quick-reply:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Input Container */
#void-input-container {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 10px;
}

#void-input {
  flex: 1;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  color: #111827;
  padding: 12px 16px;
  border-radius: 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

#void-input::placeholder {
  color: #9ca3af;
}

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

#void-send-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#void-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

#void-send-btn:active {
  transform: scale(0.95);
}

/* Animations */
@keyframes voidNotificationPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

@keyframes voidSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes voidBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes voidFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes voidTyping {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-8px);
  }
}

/* Dark Mode Support */
body:not(.light-mode) #void-chat-window {
  background: #1f2937;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body:not(.light-mode) #void-messages {
  background: #111827;
}

body:not(.light-mode) .void-message-bubble {
  background: #1f2937;
  color: #f9fafb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body:not(.light-mode) .void-message.user .void-message-bubble {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

body:not(.light-mode) .void-typing {
  background: #1f2937;
}

body:not(.light-mode) .void-quick-reply {
  background: #1f2937;
  border-color: #374151;
  color: #60a5fa;
}

body:not(.light-mode) .void-quick-reply:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

body:not(.light-mode) #void-input {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

body:not(.light-mode) #void-input::placeholder {
  color: #6b7280;
}

body:not(.light-mode) #void-input:focus {
  border-color: #3b82f6;
  background: #1f2937;
}

body:not(.light-mode) #void-input-container {
  background: #1f2937;
  border-top-color: #374151;
}

body:not(.light-mode) .void-message-time {
  color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
  #void-chatbot {
    bottom: 20px;
    right: 20px;
  }

  #void-chat-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 140px);
    bottom: 90px;
    right: 20px;
  }

  #void-toggle-btn {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
}

/* Smooth Transitions */
#void-chat-window,
#void-messages,
.void-message-bubble,
.void-quick-reply,
#void-input {
  transition: all 0.2s ease;
}

/* Message Links */
.void-message-bubble a {
  color: #3b82f6;
  text-decoration: underline;
  font-weight: 500;
}

.void-message.user .void-message-bubble a {
  color: white;
  text-decoration: underline;
}

/* Strong & Em in messages */
.void-message-bubble strong {
  font-weight: 600;
  color: inherit;
}

.void-message-bubble em {
  font-style: italic;
}
