/* Naike Factory AI Consultant & WhatsApp Floating Channels */
:root {
  --naike-navy: #0f1f38;
  --naike-navy-light: #1a3258;
  --naike-blue: #0056b3;
  --naike-accent: #0066cc;
  --naike-green: #25d366;
  --naike-green-dark: #128c7e;
  --naike-ping: #10b981;
}

/* Floating Action Container */
.naike-float-channels {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Floating WhatsApp Button */
.naike-whatsapp-btn {
  position: relative;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.naike-whatsapp-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.naike-whatsapp-btn svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

.naike-whatsapp-tooltip {
  position: absolute;
  right: 68px;
  background: #1e293b;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.naike-whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid #1e293b;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.naike-whatsapp-btn:hover .naike-whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Floating AI Consultant Button */
.naike-ai-btn-wrap {
  position: relative;
}

.naike-ai-bubble-hint {
  position: absolute;
  bottom: 68px;
  right: 0;
  background: #0f1f38;
  color: #ffffff;
  padding: 10px 14px 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 250px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  animation: naikeSlideUp 0.35s ease-out;
  cursor: pointer;
  z-index: 10;
}

.naike-ai-bubble-hint::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: #0f1f38;
  transform: rotate(45deg);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.naike-ai-bubble-hint .close-hint {
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
}

.naike-ai-bubble-hint .close-hint:hover {
  color: #fff;
}

.naike-ai-btn {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #0b1a30 0%, #1e3a66 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(11, 26, 48, 0.45);
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.naike-ai-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(11, 26, 48, 0.55);
}

.naike-ai-btn svg {
  width: 32px;
  height: 32px;
}

/* Green Online Pulse Ping */
.naike-online-ping {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: var(--naike-ping);
  border: 2.5px solid #0b1a30;
  border-radius: 50%;
}

.naike-online-ping::before {
  content: '';
  position: absolute;
  top: -2.5px;
  left: -2.5px;
  width: 14px;
  height: 14px;
  background-color: var(--naike-ping);
  border-radius: 50%;
  animation: naikePulse 1.8s infinite;
  opacity: 0.75;
}

@keyframes naikePulse {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

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

/* AI Chat Modal Dialog */
.naike-ai-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.naike-ai-chat-window.hidden {
  display: none !important;
}

/* Header */
.naike-chat-header {
  background: linear-gradient(135deg, #0f1f38 0%, #1e3a66 100%);
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.naike-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.naike-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.naike-chat-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.naike-chat-subtitle {
  font-size: 12px;
  color: #6ee7b7;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.naike-online-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

.naike-chat-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s;
}

.naike-chat-close-btn:hover {
  color: #fff;
}

/* Chat Messages Area */
.naike-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.naike-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: naikeMsgFade 0.25s ease;
}

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

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

.naike-msg.user {
  align-self: flex-end;
}

.naike-msg-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.naike-msg.bot .naike-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border-bottom-left-radius: 4px;
}

.naike-msg.user .naike-msg-bubble {
  background: #0056b3;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.naike-msg-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  padding: 0 4px;
}

.naike-msg.user .naike-msg-time {
  text-align: right;
}

/* Quick Questions Chips */
.naike-quick-questions {
  padding: 8px 14px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.naike-chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 5px 10px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.naike-chip-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Smart RFQ Trigger CTA inside messages */
.naike-rfq-trigger-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.naike-rfq-trigger-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.45);
}

/* Input Area */
.naike-chat-input-area {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.naike-chat-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s;
}

.naike-chat-input:focus {
  border-color: #0056b3;
}

.naike-chat-send-btn {
  width: 36px;
  height: 36px;
  background: #0056b3;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.naike-chat-send-btn:hover {
  background: #004494;
}

.naike-chat-send-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Typing Indicator */
.naike-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: fit-content;
}

.naike-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: naikeDotBounce 1.2s infinite ease-in-out;
}

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

@keyframes naikeDotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .naike-float-channels {
    bottom: 16px;
    right: 16px;
  }
  .naike-ai-chat-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 84px;
    height: 520px;
  }
}
