/* ==========================================================================
   RETAILBOSS (retailboss.in) - BOSSAI CHATBOT STYLES
   ========================================================================== */

.rb-chatbot-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  font-family: var(--font-body);
}

.rb-chat-toggle {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
  transition: all var(--transition-fast);
  position: relative;
}

.rb-chat-toggle:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
}

.chat-badge-pulse {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10B981;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chat-label {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
}

.rb-chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 1px solid var(--rb-border-light);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all var(--transition-fast);
}

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

.chat-header {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.bot-avatar {
  width: 38px;
  height: 38px;
  background: #2563EB;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chat-header h4 {
  color: #FFFFFF;
  font-size: 15px;
  margin-bottom: 2px;
}

.chat-header p {
  font-size: 11px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.chat-quick-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #F8FAFC;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid var(--rb-border-light);
}

.chat-quick-chips .chip {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chat-quick-chips .chip:hover {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #2563EB;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F8FAFC;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

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

.msg-user .msg-bubble {
  background: #2563EB;
  color: #FFFFFF;
  border-radius: 16px 16px 2px 16px;
  padding: 10px 14px;
  font-size: 13px;
}

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

.msg-bot .msg-bubble {
  background: #FFFFFF;
  color: #1E293B;
  border: 1px solid var(--rb-border-light);
  border-radius: 16px 16px 16px 2px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.msg-action-bar {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.msg-typing .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #94A3B8;
  border-radius: 50%;
  margin-right: 4px;
  animation: wave 1.3s linear infinite;
}

.msg-typing .dot:nth-child(2) { animation-delay: -1.1s; }
.msg-typing .dot:nth-child(3) { animation-delay: -0.9s; }

@keyframes wave {
  0%, 60%, 100% { transform: initial; }
  30% { transform: translateY(-7px); }
}

.chat-input-area {
  padding: 12px;
  background: #FFFFFF;
  border-top: 1px solid var(--rb-border-light);
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--rb-border-light);
  border-radius: var(--radius-full);
  font-size: 13px;
  outline: none;
}

.chat-input-area input:focus {
  border-color: #2563EB;
}

.btn-chat-send {
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .rb-chatbot-root { bottom: 70px; right: 14px; }
  .chat-label { display: none; }
  .rb-chat-toggle { padding: 12px; border-radius: 50%; }
}
