﻿/* chatbot.css */
.chatbot-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg,#7c3aed,#a855f7);
  border: none; color: #fff; font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(124,58,237,0.5);
  cursor: pointer; transition: 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.chatbot-fab:hover { transform: scale(1.1); }
.chatbot-fab .fab-badge {
  position: absolute; top: -4px; right: -4px;
  background: #10b981; color: #fff; font-size: 0.6rem;
  font-weight: 700; border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

.chatbot-window {
  position: fixed; bottom: 104px; right: 28px; z-index: 500;
  width: 360px; max-height: 520px;
  background: #111827; border: 1px solid #1e3a5f;
  border-radius: 20px; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: chatIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
.chatbot-window.hidden { display: none; }
@keyframes chatIn { from{transform:scale(0.8) translateY(20px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }
.chat-header {
  background: linear-gradient(135deg,#7c3aed,#9d4eda);
  padding: 16px 20px; display: flex; align-items: center; gap: 12px;
}
.chat-avatar { width: 38px; height: 38px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.chat-header-info h4 { font-size: 0.92rem; font-weight: 700; color: #fff; }
.chat-header-info p { font-size: 0.75rem; color: rgba(255,255,255,0.75); }
.chat-close { margin-left: auto; background: rgba(255,255,255,0.15); border: none; color: #fff; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.chat-close:hover { background: rgba(255,255,255,0.3); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 0.85rem; line-height: 1.5; }
.chat-msg.bot { background: #1a2235; border: 1px solid #1e3a5f; color: #e2e8f0; align-self: flex-start; border-radius: 4px 14px 14px 14px; }
.chat-msg.user { background: linear-gradient(135deg,#7c3aed,#a855f7); color: #fff; align-self: flex-end; border-radius: 14px 4px 14px 14px; }
.chat-products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.chat-product-card { background: #0f172a; border: 1px solid #1e3a5f; border-radius: 10px; padding: 10px; cursor: pointer; transition: 0.15s; }
.chat-product-card:hover { border-color: #7c3aed; }
.chat-product-card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 6px; background: #1a2235; }
.chat-product-card p { font-size: 0.72rem; color: #94a3b8; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-product-card span { font-size: 0.82rem; font-weight: 700; color: #a855f7; }
.chat-typing { display: flex; gap: 5px; align-items: center; padding: 12px 14px; background: #1a2235; border-radius: 14px; width: fit-content; }
.chat-typing span { width: 7px; height: 7px; background: #7c3aed; border-radius: 50%; animation: typingDot 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.chat-input-area { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #1e3a5f; }
.chat-input { flex: 1; background: #1a2235; border: 1px solid #1e3a5f; border-radius: 50px; padding: 10px 16px; color: #f1f5f9; font-size: 0.85rem; }
.chat-input:focus { outline: none; border-color: #7c3aed; }
.chat-send { background: #7c3aed; border: none; color: #fff; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.chat-send:hover { background: #9d6aea; }
