/* ============================================
   ImaraForge Marketing Chatbot - Pure Hype! 🚀
   High-Energy Design for Maximum Engagement
   ============================================ */

:root {
  --marketing-primary: #2563eb;
  --marketing-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --marketing-accent: #f59e0b;
  --marketing-success: #16a34a;
  --marketing-bg: #ffffff;
  --marketing-shadow: 0 20px 60px rgba(37, 99, 235, 0.3);
}

/* Floating Chat Toggle Button with Pulse Animation */
.marketing-chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--marketing-gradient);
  border: none;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  animation: bobbing 3s ease-in-out infinite;
}

@keyframes bobbing {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.marketing-chatbot-toggle:hover {
  transform: scale(1.1) translateY(0) !important;
  box-shadow: 0 15px 50px rgba(37, 99, 235, 0.6);
}

.marketing-chatbot-toggle:active {
  transform: scale(0.95) !important;
}

.marketing-chatbot-toggle.active .icon-chat {
  opacity: 0;
  transform: scale(0);
}

/* Pulse Rings for Attention */
.pulse-ring,
.pulse-ring-2 {
  position: absolute;
  border: 3px solid rgba(245, 158, 11, 0.8);
  border-radius: 50%;
  width: 100%;
  height: 100%;
  animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-ring-2 {
  animation-delay: 1s;
  border-color: rgba(124, 58, 237, 0.8);
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.marketing-chatbot-toggle svg {
  width: 36px;
  height: 36px;
  fill: white;
  position: relative;
  z-index: 2;
  transition: all 0.3s;
}

.marketing-chatbot-toggle .icon-chat {
  opacity: 1;
  transform: scale(1);
}

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--marketing-accent);
  color: white;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  animation: wiggle 1s ease-in-out infinite;
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-15deg);
  }
  75% {
    transform: rotate(15deg);
  }
}

/* Chat Window */
.marketing-chatbot-window {
  position: fixed;
  bottom: 110px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  height: 650px;
  max-height: calc(100vh - 140px);
  background: white;
  border-radius: 24px;
  box-shadow: var(--marketing-shadow);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9998;
  overflow: hidden;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.marketing-chatbot-window::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: var(--marketing-gradient);
  border-radius: 24px;
  z-index: -1;
  opacity: 0.5;
}

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

/* Header with Gradient */
.marketing-chatbot-header {
  background: var(--marketing-gradient);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 21px 21px 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.marketing-chatbot-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: rotate360 20s linear infinite;
}

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

.marketing-chatbot-header-text h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.marketing-chatbot-status {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.marketing-chatbot-minimize,
.marketing-chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: 8px;
}

.marketing-chatbot-minimize:hover,
.marketing-chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Messages Area */
.marketing-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.marketing-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.3);
  border-radius: 3px;
}

.marketing-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.5);
}

/* Message Bubbles */
.marketing-message {
  display: flex;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

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

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

.marketing-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: rgba(37, 99, 235, 0.1);
  border: 2px solid rgba(37, 99, 235, 0.2);
}

.marketing-message.user .marketing-message-avatar {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.marketing-message-content {
  flex: 1;
  max-width: 75%;
}

.marketing-message-bubble {
  background: white;
  padding: 14px 18px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.marketing-message.bot .marketing-message-bubble {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: rgba(37, 99, 235, 0.2);
  font-weight: 500;
}

.marketing-message.user .marketing-message-bubble {
  background: var(--marketing-gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.marketing-message-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  padding: 0 4px;
  font-weight: 600;
}

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

/* Typing Indicator */
.marketing-typing-indicator {
  display: flex;
  gap: 10px;
  align-items: center;
  animation: slideIn 0.3s ease-out;
}

.marketing-typing-dots {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 14px 20px;
  border-radius: 18px;
  display: flex;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.marketing-typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--marketing-primary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

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

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

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

/* Quick Actions */
.marketing-quick-actions {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: white;
  border-top: 1px solid #e2e8f0;
}

.marketing-quick-action {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid var(--marketing-primary);
  color: var(--marketing-primary);
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.marketing-quick-action:hover {
  background: var(--marketing-gradient);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* Input Area */
.marketing-chatbot-input {
  padding: 16px 20px;
  background: white;
  border-top: 2px solid #e2e8f0;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.marketing-chatbot-input-field {
  flex: 1;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 12px 18px;
  font-size: 15px;
  font-family: inherit;
  resize: none;
  transition: all 0.2s;
  max-height: 100px;
  min-height: 44px;
}

.marketing-chatbot-input-field:focus {
  outline: none;
  border-color: var(--marketing-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.marketing-chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--marketing-gradient);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.marketing-chatbot-send:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.marketing-chatbot-send:active:not(:disabled) {
  transform: scale(0.95);
}

.marketing-chatbot-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.marketing-chatbot-send svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Footer */
.marketing-chatbot-footer {
  padding: 10px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  text-align: center;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  border-top: 1px solid #e2e8f0;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .marketing-chatbot-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .marketing-chatbot-window::before {
    border-radius: 0;
  }

  .marketing-chatbot-header {
    border-radius: 0;
  }

  .marketing-chatbot-toggle {
    bottom: 20px;
    right: 20px;
  }

  .marketing-message-content {
    max-width: 85%;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .marketing-chatbot-toggle,
  .marketing-message,
  .marketing-typing-indicator {
    animation: none;
  }

  .pulse-ring,
  .pulse-ring-2 {
    display: none;
  }
}

/* Focus Visible for Keyboard Navigation */
.marketing-chatbot-toggle:focus-visible,
.marketing-chatbot-send:focus-visible,
.marketing-quick-action:focus-visible {
  outline: 3px solid var(--marketing-accent);
  outline-offset: 3px;
}
