/* ZiBumBaa Marketing - Professional Chatbot Widget */

:root {
  --chat-primary: #0050B0;
  --chat-primary-dark: #003d8a;
  --chat-accent: #E00050;
  --chat-bg: #FFFFFF;
  --chat-text: #111827;
  --chat-border: #E5E7EB;
  --chat-bot-msg: #F3F4F6;
  --chat-user-msg: #0050B0;
  --chat-shadow: 0 10px 40px rgba(0, 80, 176, 0.15);
  --chat-shadow-hover: 0 15px 50px rgba(0, 80, 176, 0.25);
}

/* Chatbot Container */
#zibumbaa-chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle Button */
.chat-toggle-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-primary-dark));
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: var(--chat-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.chat-toggle-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--chat-accent), #b3003e);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-toggle-btn:hover {
  transform: scale(1.12) rotate(5deg);
  box-shadow: var(--chat-shadow-hover);
}

.chat-toggle-btn:hover::before {
  opacity: 1;
}

.chat-toggle-btn .material-icons {
  font-size: 32px;
  position: relative;
  z-index: 1;
  animation: pulse 2s ease-in-out infinite;
}

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

.chat-toggle-btn:active {
  transform: scale(1.05);
}

/* Notification Badge */
.chat-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: var(--chat-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  border: 3px solid var(--chat-bg);
  animation: bounce 0.6s ease-in-out infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-4px);
  }
}

/* Chat Window */
.chat-window {
  position: absolute;
  bottom: 84px;
  right: 0;
  width: 360px;
  height: 500px;
  max-height: calc(100vh - 120px);
  background: var(--chat-bg);
  border-radius: 14px;
  box-shadow: var(--chat-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, var(--chat-primary) 0%, var(--chat-primary-dark) 100%);
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 80, 176, 0.2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.chat-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.chat-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-bot-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(224, 0, 80, 0.25), rgba(0, 80, 176, 0.25));
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(224, 0, 80, 0.3);
}

.chat-bot-avatar .material-icons {
  font-size: 20px;
  background: linear-gradient(135deg, #FFE4E6, #DBEAFE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5));
}

.chat-bot-info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #FFFFFF 0%, #E0E7FF 50%, #FFE4E6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  opacity: 0.95;
  margin-top: 2px;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.chat-close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.chat-close-btn .material-icons {
  font-size: 24px;
}

/* Messages Container */
.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--chat-border);
  border-radius: 3px;
  transition: background 0.2s;
}

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

/* Message */
.chat-message {
  display: flex;
  animation: messageSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.chat-message.bot {
  justify-content: flex-start;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message-content {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  word-wrap: break-word;
}

.chat-message.bot .chat-message-content {
  background: var(--chat-bot-msg);
  color: var(--chat-text);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-message.user .chat-message-content {
  background: linear-gradient(135deg, var(--chat-user-msg), var(--chat-primary-dark));
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 80, 176, 0.2);
}

.chat-message-content p {
  margin: 0;
}

.chat-message-time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 6px;
  text-align: right;
}

/* Typing Indicator */
.chat-typing {
  display: flex;
  gap: 6px;
  padding: 14px 18px;
  background: var(--chat-bot-msg);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  max-width: fit-content;
}

.chat-typing span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(1) {
  animation-delay: 0s;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Quick Replies */
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
}

.chat-quick-reply {
  padding: 10px 16px;
  background: white;
  border: 1.5px solid var(--chat-border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--chat-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-quick-reply:hover {
  background: var(--chat-primary);
  color: white;
  border-color: var(--chat-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 80, 176, 0.2);
}

.chat-quick-reply .material-icons {
  font-size: 16px;
}

/* Input Area */
.chat-input-area {
  padding: 20px 24px;
  background: white;
  border-top: 1px solid var(--chat-border);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input-wrapper {
  flex: 1;
  position: relative;
}

.chat-input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  border: 1.5px solid var(--chat-border);
  border-radius: 24px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  resize: none;
  max-height: 120px;
}

.chat-input:focus {
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 3px rgba(0, 80, 176, 0.1);
}

.chat-input::placeholder {
  color: #9ca3af;
}

.chat-attach-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.chat-attach-btn:hover {
  background: var(--chat-border);
  color: var(--chat-primary);
}

.chat-attach-btn .material-icons {
  font-size: 20px;
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-primary-dark));
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 80, 176, 0.3);
}

.chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 80, 176, 0.4);
}

.chat-send-btn:active {
  transform: scale(0.98);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-send-btn .material-icons {
  font-size: 22px;
}

/* Powered By */
.chat-powered-by {
  padding: 12px 24px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  background: #f9fafb;
  border-top: 1px solid var(--chat-border);
}

.chat-powered-by a {
  color: var(--chat-primary);
  text-decoration: none;
  font-weight: 600;
}

.chat-powered-by a:hover {
  color: var(--chat-accent);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  #zibumbaa-chatbot {
    bottom: 16px;
    right: 16px;
  }

  .chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 120px);
    bottom: 84px;
  }

  .chat-toggle-btn {
    width: 56px;
    height: 56px;
  }

  .chat-toggle-btn .material-icons {
    font-size: 28px;
  }
}

/* Animation for welcome message */
@keyframes welcomeBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.welcome-message {
  animation: welcomeBounce 1s ease-in-out 3;
}

/* Social Media Post Cards */
.social-post-card {
  background: white;
  border: 1px solid var(--chat-border);
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  max-width: 85%;
}

.social-post-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.social-post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--chat-border);
}

.social-post-header .material-icons {
  font-size: 20px;
}

.social-post-platform {
  font-weight: 600;
  font-size: 14px;
  color: var(--chat-text);
  flex: 1;
}

.social-post-time {
  font-size: 12px;
  color: #9ca3af;
}

.social-post-content {
  margin-bottom: 12px;
}

.social-post-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--chat-text);
  word-wrap: break-word;
}

.social-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--chat-border);
}

.social-post-engagement {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.social-post-engagement .material-icons {
  font-size: 16px;
  color: #e91e63;
}

.social-post-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--chat-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.social-post-link:hover {
  background: rgba(0, 80, 176, 0.1);
  color: var(--chat-primary-dark);
}

.social-post-link .material-icons {
  font-size: 16px;
}

/* Notification Message */
.chat-notification-message {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  max-width: 85%;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: notificationSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes notificationSlide {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-notification-message .material-icons {
  font-size: 20px;
  color: white;
}

.chat-notification-message span:last-child {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

/* Mobile Adjustments for Social Posts */
@media (max-width: 480px) {
  .social-post-card {
    max-width: 95%;
  }

  .social-post-footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .chat-notification-message {
    max-width: 95%;
  }
}

/* ===== Advanced Chatbot Features ===== */

/* Message Reactions */
.message-reactions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message-bot:hover .message-reactions {
  opacity: 1;
}

.reaction-btn {
  background: transparent;
  border: 1px solid var(--chat-border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.reaction-btn .material-icons {
  font-size: 16px;
  color: #6B7280;
}

.reaction-btn:hover {
  background-color: #F3F4F6;
  border-color: var(--chat-primary);
  transform: scale(1.1);
}

.reaction-btn:hover .material-icons {
  color: var(--chat-primary);
}

.reaction-btn.reacted {
  background-color: var(--chat-primary);
  border-color: var(--chat-primary);
}

.reaction-btn.reacted .material-icons {
  color: white;
}

/* Download Transcript Button */
.download-transcript-btn,
.search-toggle-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.download-transcript-btn:hover,
.search-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.download-transcript-btn .material-icons,
.search-toggle-btn .material-icons {
  font-size: 20px;
}

/* Message Search */
.message-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--chat-border);
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--chat-border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--chat-primary);
}

.search-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #6B7280;
  display: flex;
  align-items: center;
}

.search-close-btn:hover .material-icons {
  color: var(--chat-primary);
}

.message.search-highlight {
  background-color: rgba(0, 80, 176, 0.1);
  animation: highlight-pulse 1s ease;
}

@keyframes highlight-pulse {
  0%, 100% {
    background-color: rgba(0, 80, 176, 0.1);
  }
  50% {
    background-color: rgba(0, 80, 176, 0.2);
  }
}

/* Session Timer */
.session-timer {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

/* Enhanced Typing Indicator */
.typing-indicator-enhanced {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-items: center;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #6B7280;
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}

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

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

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-8px);
    background-color: var(--chat-primary);
  }
}

/* Context-aware suggestions badge */
.context-badge {
  display: inline-block;
  background-color: var(--chat-accent);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 600;
}

/* Message timestamps improvement */
.message-time {
  font-size: 0.7rem;
  color: #9CA3AF;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message:hover .message-time {
  opacity: 1;
}

/* Keyboard shortcut hint */
.keyboard-hint {
  position: absolute;
  bottom: -24px;
  right: 0;
  font-size: 0.75rem;
  color: #6B7280;
  background-color: white;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chat-toggle-btn:hover + .keyboard-hint {
  opacity: 1;
}

/* Responsive adjustments for advanced features */
@media (max-width: 768px) {
  .message-search {
    padding: 6px 12px;
  }
  
  .download-transcript-btn,
  .search-toggle-btn {
    width: 32px;
    height: 32px;
  }
  
  .download-transcript-btn .material-icons,
  .search-toggle-btn .material-icons {
    font-size: 18px;
  }
  
  .reaction-btn {
    width: 24px;
    height: 24px;
  }
  
  .reaction-btn .material-icons {
    font-size: 14px;
  }
}

/* ===== CHATBOT TABS ===== */
.chat-tabs {
  display: flex;
  background: #F3F4F6;
  border-bottom: 1px solid #E5E7EB;
  padding: 0 6px;
  gap: 4px;
  flex-shrink: 0;
}

.chat-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: #6B7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 10px 10px 0 0;
}

.chat-tab .material-icons {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.chat-tab:hover {
  color: var(--chat-primary);
  background: rgba(0, 80, 176, 0.05);
}

.chat-tab.active {
  color: var(--chat-primary);
  background: #FFFFFF;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.chat-tab.active .material-icons {
  transform: scale(1.1);
}

/* Tab Content Areas */
.chat-tab-content {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-tab-content.active {
  display: flex;
}

/* ===== ANALYTICS DASHBOARD IN CHATBOT ===== */
.chat-analytics-dashboard {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: #F9FAFB;
}

.chat-analytics-header {
  margin-bottom: 10px;
}

.chat-analytics-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 700;
  color: var(--chat-text);
  margin: 0 0 5px 0;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chat-analytics-title .material-icons {
  font-size: 18px;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chat-analytics-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6B7280;
}

.chat-analytics-updated .material-icons {
  font-size: 14px;
  color: #10B981;
}

/* Analytics Stats Grid */
.chat-analytics-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.chat-stat-card {
  background: white;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 8px;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 80, 176, 0.08);
}

.chat-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 80, 176, 0.12);
  border-color: rgba(0, 80, 176, 0.15);
}

.chat-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--chat-primary), #0066CC);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 80, 176, 0.2);
}

.chat-stat-icon .material-icons {
  font-size: 16px;
  color: white;
}

.chat-stat-info {
  flex: 1;
  min-width: 0;
}

.chat-stat-label {
  font-size: 9px;
  color: #6B7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.chat-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--chat-text);
  line-height: 1;
  margin-bottom: 2px;
}

.chat-stat-change {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  display: inline-block;
}

.chat-stat-change.positive {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.chat-stat-change.negative {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Chart Section */
.chat-analytics-chart {
  background: white;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 80, 176, 0.08);
}

.chat-chart-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--chat-text);
  margin: 0 0 8px 0;
}

.chat-chart-title .material-icons {
  font-size: 15px;
  color: var(--chat-primary);
}

#chat-analytics-chart {
  width: 100%;
  height: 110px;
  display: block;
}

/* Top Pages */
.chat-analytics-pages {
  background: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 80, 176, 0.08);
}

.chat-page-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border-radius: 5px;
  transition: background 0.2s ease;
  margin-bottom: 4px;
}

.chat-page-item:last-child {
  margin-bottom: 0;
}

.chat-page-item:hover {
  background: rgba(0, 80, 176, 0.04);
}

.chat-page-rank {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--chat-primary), #0066CC);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
}

.chat-page-info {
  flex: 1;
  min-width: 0;
}

.chat-page-path {
  font-size: 11px;
  font-weight: 600;
  color: var(--chat-text);
  margin-bottom: 2px;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-page-views {
  font-size: 10px;
  color: #6B7280;
}

/* Mobile Responsive for Chatbot */
@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 140px);
    max-height: 600px;
  }
  
  .chat-tabs {
    padding: 0 4px;
    gap: 2px;
  }
  
  .chat-tab {
    padding: 12px 10px;
    font-size: 13px;
  }
  
  .chat-tab .material-icons {
    font-size: 18px;
  }
  
  .chat-analytics-dashboard {
    padding: 12px;
  }
  
  .chat-analytics-stats {
    gap: 10px;
  }
  
  .chat-stat-card {
    padding: 12px;
  }
  
  .chat-stat-icon {
    width: 36px;
    height: 36px;
  }
  
  .chat-stat-icon .material-icons {
    font-size: 18px;
  }
  
  .chat-stat-value {
    font-size: 18px;
  }
}
