/* ===== META AI STYLE FLOATING CHATBOT ===== */
.meta-chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;

}

/* Floating Launcher Button */
.meta-chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  outline: none;
}

.meta-chatbot-toggle:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: none;
}

.meta-chatbot-toggle .meta-gradient-ring {
  display: none;
}

@keyframes metaRingSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.meta-chatbot-toggle .close-icon {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000000;
  font-size: 1.25rem;
  z-index: 10;
  font-weight: 900;
}

.meta-chatbot-widget.active .meta-chatbot-toggle .bot-icon {
  display: block;
}

.meta-chatbot-widget.active .meta-chatbot-toggle .close-icon {
  display: block;
}

/* Chat Window Modal */
.meta-chatbot-window {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--bg-secondary, rgba(16, 13, 30, 0.95));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.meta-chatbot-widget.active .meta-chatbot-window {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.meta-chat-header {
  padding: 16px 20px;
  background: rgba(99, 102, 241, 0.12);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.meta-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e90ff, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.meta-chat-title-group h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #f8f9fa);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-chat-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(90deg, #1e90ff, #8b5cf6);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.meta-chat-status {
  font-size: 11px;
  color: #6366f1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.meta-chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 6px #6366f1;
}

.meta-chat-header-actions button {
  background: none;
  border: none;
  color: var(--text-secondary, #b8b8b8);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.meta-chat-header-actions button:hover {
  color: var(--text-primary, #ffffff);
  background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages Container */
.meta-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Quick Suggestion Chips */
.meta-chat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
}

.meta-chat-chips::-webkit-scrollbar {
  display: none;
}

.meta-chip {
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #e0e0e0);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

[data-theme="light"] .meta-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.meta-chip:hover {
  background: linear-gradient(90deg, rgba(79, 172, 254, 0.2), rgba(107, 17, 255, 0.2));
  border-color: rgba(79, 172, 254, 0.4);
  color: #ffffff;
}

/* Chat Bubbles */
.meta-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: metaMsgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes metaMsgIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.meta-msg.user-msg {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.meta-msg.bot-msg {
  align-self: flex-start;
}

.meta-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e90ff, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
  flex-shrink: 0;
}

.meta-msg.user-msg .meta-msg-avatar {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.meta-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.meta-msg.bot-msg .meta-msg-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f0f0f0);
  border-top-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .meta-msg.bot-msg .meta-msg-bubble {
  background: #f0f2f5;
  color: #1c1e21;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.meta-msg.user-msg .meta-msg-bubble {
  background: var(--chat-gradient, linear-gradient(135deg, #1e90ff 0%, #6366f1 100%));
  color: #ffffff;
  font-weight: 500;
  border-top-right-radius: 4px;
}

.meta-msg-bubble ul,
.meta-msg-bubble ol {
  margin-top: 6px;
  margin-bottom: 6px;
  padding-left: 18px;
}

.meta-msg-bubble li {
  margin-bottom: 4px;
}

/* Typing Indicator */
.meta-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  border-top-left-radius: 4px;
  width: fit-content;
}

.meta-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: metaTypingBounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes metaTypingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* Chat Input Bar */
.meta-chat-input-area {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="light"] .meta-chat-input-area {
  background: rgba(240, 242, 245, 0.8);
  border-top-color: rgba(0, 0, 0, 0.06);
}

.meta-chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text-primary, #ffffff);
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
}

[data-theme="light"] .meta-chat-input-area input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
}

.meta-chat-input-area input:focus {
  border-color: #00ff88;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.meta-chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--chat-gradient, linear-gradient(135deg, #00ff88, #00b300));
  color: #0b130a;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.meta-chat-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
}

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

/* Footer note in Chat */
.meta-chat-footer-note {
  font-size: 10px;
  color: var(--text-secondary, #888888);
  text-align: center;
  padding: 4px 12px 8px;
}

/* Bot image rotation styles */
.meta-chatbot-toggle img.bot-icon {
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
  transform: rotate(0deg);
  border-radius: 50%;
}

/* Continuous 360 degree rotation while chat is active */
.meta-chatbot-widget.active .meta-chatbot-toggle img.bot-icon {
  animation: continuousRotate 5s linear infinite;
}

/* Reverse spin 360 degrees and stop when closed */
.meta-chatbot-toggle img.bot-icon.closing-spin {
  animation: reverseRotate 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes continuousRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes reverseRotate {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

/* Explicit overrides to remove any green background, gradient ring, or glow behind the PNG flower */
.meta-chatbot-toggle,
.meta-chatbot-toggle img.bot-icon,
.meta-gradient-ring,
.meta-chatbot-toggle .meta-gradient-ring {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  display: none !important; /* Hide gradient ring if it exists */
}
.meta-chatbot-toggle img.bot-icon {
  display: block !important;
}
.meta-chatbot-toggle {
  display: flex !important;
}