@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── FAB Button ── */
#bmc-fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #075E54 100%);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; z-index: 99999;
  box-shadow: 0 8px 28px rgba(37,211,102,0.55);
  transition: transform .2s, box-shadow .2s;
}
#bmc-fab:hover { transform: scale(1.12); box-shadow: 0 12px 36px rgba(37,211,102,0.7); }
#bmc-fab svg { width: 34px; height: 34px; fill: #fff; }
#bmc-badge {
  position: absolute; top: -3px; right: -3px;
  width: 22px; height: 22px; background: #FF3B30;
  border-radius: 50%; border: 2.5px solid #fff;
  font-size: 11px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif;
  animation: bmc-pop 2s ease-in-out infinite;
}
@keyframes bmc-pop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.25)} }
#bmc-ring {
  position: fixed; bottom: 24px; right: 24px;
  width: 72px; height: 72px; border-radius: 50%;
  border: 2.5px solid rgba(37,211,102,0.45);
  z-index: 99998; pointer-events: none;
  animation: bmc-ring 2.8s ease-in-out infinite;
}
@keyframes bmc-ring { 0%,100%{transform:scale(1);opacity:.5} 60%{transform:scale(1.4);opacity:0} }

/* ── Chat Window ── */
#bmc-win {
  position: fixed; bottom: 108px; right: 28px;
  width: 360px; height: 580px;
  border-radius: 20px; z-index: 99998;
  display: none; flex-direction: column; overflow: hidden;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.6);
}
#bmc-win.open { display: flex; animation: bmc-open .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes bmc-open { from{opacity:0;transform:scale(.88) translateY(18px)} to{opacity:1;transform:scale(1)} }

/* ── Header ── */
.bmc-hd {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 14px 16px; display: flex; align-items: center; gap: 11px; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.bmc-hd::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='20' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: .5;
}
.bmc-av {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; position: relative;
  border: 2px solid rgba(255,255,255,0.25); z-index: 1;
}
.bmc-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 11px; height: 11px; background: #4ade80;
  border-radius: 50%; border: 2px solid #16213e;
  animation: bmc-pulse 2s ease-in-out infinite;
}
@keyframes bmc-pulse { 0%,100%{opacity:1} 50%{opacity:.6} }
.bmc-hn { color: #fff; font-size: 14px; font-weight: 700; line-height: 1.3; z-index: 1; }
.bmc-hs { color: rgba(255,255,255,0.65); font-size: 11px; margin-top: 2px; z-index: 1; display: flex; align-items: center; gap: 4px; }
.bmc-hs::before { content: '●'; color: #4ade80; font-size: 8px; }
.bmc-hx {
  margin-left: auto; cursor: pointer; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; border: none; flex-shrink: 0;
  font-weight: 600; z-index: 1; transition: background .15s;
}
.bmc-hx:hover { background: rgba(255,255,255,0.22); }

/* ── Trust bar ── */
.bmc-trust {
  background: linear-gradient(90deg, #f0fdf4, #ecfdf5);
  border-bottom: 1px solid #d1fae5;
  padding: 6px 14px; display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.bmc-trust-item { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: #065f46; }

/* ── Messages ── */
.bmc-msgs {
  flex: 1; overflow-y: auto; padding: 12px 10px;
  display: flex; flex-direction: column; gap: 6px;
  background: #f8fafc;
  background-image: radial-gradient(circle at 20% 50%, rgba(99,102,241,0.03) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(16,185,129,0.03) 0%, transparent 50%);
}
.bmc-msgs::-webkit-scrollbar { width: 3px; }
.bmc-msgs::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }

.bmc-mw { display: flex; flex-direction: column; }
.bmc-mw.bot { align-items: flex-start; }
.bmc-mw.usr { align-items: flex-end; }

.bmc-bbl {
  max-width: 82%; padding: 10px 14px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.6; word-wrap: break-word;
  animation: bmc-msg .2s ease;
}
@keyframes bmc-msg { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.bmc-bbl.bot {
  background: #fff; color: #1e293b;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
}
.bmc-bbl.usr {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}
.bmc-bbl strong { font-weight: 700; }
.bmc-mt { font-size: 10px; color: #94a3b8; margin-top: 3px; padding: 0 4px; }

/* ── Typing dots ── */
.bmc-typ {
  background: #fff; border-radius: 16px; border-bottom-left-radius: 4px;
  padding: 12px 16px; display: inline-flex; gap: 5px; align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08); animation: bmc-msg .2s ease;
}
.bmc-typ span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6366f1; animation: bmc-dots 1.4s infinite;
}
.bmc-typ span:nth-child(2){animation-delay:.18s}
.bmc-typ span:nth-child(3){animation-delay:.36s}
@keyframes bmc-dots { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-5px);opacity:1} }

/* ── Lead Capture Form ── */
#bmc-cap {
  background: #fff; flex-shrink: 0; display: none;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b) 1;
}
.bmc-cap-inner {
  padding: 14px 14px 10px;
  background: linear-gradient(135deg, #faf5ff 0%, #fdf2f8 50%, #fff7ed 100%);
}
.bmc-cap-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.bmc-cap-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.bmc-cap-t { font-size: 13px; font-weight: 700; color: #1e293b; }
.bmc-cap-sub { font-size: 11px; color: #64748b; margin-bottom: 10px; padding-left: 40px; }

.bmc-cap-fields { display: flex; flex-direction: column; gap: 7px; }
.bmc-cap-field {
  display: flex; align-items: center; gap: 0;
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 10px; overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.bmc-cap-field:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.bmc-cap-field .bmc-ficon {
  padding: 0 10px; font-size: 15px; color: #94a3b8; flex-shrink: 0;
}
.bmc-cap-field input {
  flex: 1; border: none; outline: none; padding: 9px 8px 9px 0;
  font-size: 13px; font-family: 'Inter', sans-serif;
  background: transparent; color: #1e293b;
}
.bmc-cap-field input::placeholder { color: #94a3b8; }

.bmc-cap-actions { display: flex; gap: 7px; margin-top: 8px; }
.bmc-cap-btn {
  flex: 1; background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff; border: none; border-radius: 10px;
  padding: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: opacity .15s, transform .15s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.bmc-cap-btn:hover { opacity: .9; transform: translateY(-1px); }
.bmc-cap-skip {
  padding: 10px 12px; border-radius: 10px; background: #f1f5f9;
  color: #64748b; font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; font-family: 'Inter', sans-serif;
  transition: background .15s; white-space: nowrap;
}
.bmc-cap-skip:hover { background: #e2e8f0; color: #475569; }

/* ── Quick Replies ── */
.bmc-qrs {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 6px 10px;
}
.bmc-qr {
  background: #fff; border: 1.5px solid #e0e7ff;
  color: #4f46e5; padding: 6px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .15s; white-space: nowrap;
}
.bmc-qr:hover { background: #eef2ff; border-color: #6366f1; transform: translateY(-1px); }

/* ── WhatsApp CTA button ── */
.bmc-wa-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff; padding: 11px 16px; border-radius: 12px;
  text-decoration: none; font-weight: 700; font-size: 13px;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 14px rgba(37,211,102,0.4);
  animation: bmc-msg .2s ease; margin-top: 4px;
  transition: opacity .15s, transform .15s;
}
.bmc-wa-btn:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.bmc-wa-btn svg { width: 18px; height: 18px; fill: #fff; flex-shrink: 0; }

/* ── Company Card ── */
.bmc-card {
  background: #fff; border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  max-width: 88%; animation: bmc-msg .2s ease; overflow: hidden;
}
.bmc-card-top {
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.bmc-card-lo {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 800; flex-shrink: 0;
}
.bmc-card-n { color: #fff; font-size: 14px; font-weight: 700; }
.bmc-card-s { color: rgba(255,255,255,0.65); font-size: 11px; margin-top: 2px; }
.bmc-card-body { padding: 12px 14px; }
.bmc-card-stat {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; margin-bottom: 10px;
}
.bmc-stat-item {
  background: #f8fafc; border-radius: 8px; padding: 8px 10px;
  text-align: center;
}
.bmc-stat-n { font-size: 15px; font-weight: 800; color: #4f46e5; }
.bmc-stat-l { font-size: 10px; color: #64748b; margin-top: 1px; }
.bmc-svcs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.bmc-svc {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5; padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.bmc-cbtn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  text-decoration: none; margin-bottom: 6px; width: 100%;
  border: none; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: opacity .15s, transform .15s; color: #fff;
}
.bmc-cbtn:last-child { margin-bottom: 0; }
.bmc-cbtn:hover { opacity: .88; transform: translateY(-1px); color: #fff; }
.bmc-cbtn-wa { background: linear-gradient(135deg, #25D366, #128C7E); }
.bmc-cbtn-dark { background: linear-gradient(135deg, #1e293b, #0f172a); }

/* ── Input Bar ── */
.bmc-inp {
  background: #fff; padding: 10px 10px;
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid #f1f5f9; flex-shrink: 0;
}
.bmc-inp input {
  flex: 1; border: 1.5px solid #e2e8f0; border-radius: 22px;
  padding: 10px 15px; font-size: 13px; font-family: 'Inter', sans-serif;
  outline: none; background: #f8fafc; color: #1e293b;
  transition: border-color .15s;
}
.bmc-inp input:focus { border-color: #6366f1; background: #fff; }
.bmc-inp input::placeholder { color: #94a3b8; }
.bmc-snd {
  width: 42px; height: 42px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
  transition: transform .15s, box-shadow .15s;
}
.bmc-snd:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(99,102,241,0.55); }
.bmc-snd svg { width: 17px; height: 17px; fill: #fff; }

@media(max-width:400px){
  #bmc-win{width:calc(100vw - 20px);right:10px;bottom:94px;height:72vh}
}
