:root{
  --primary:#2c5cf0;
  --primary-dark:#1a2b4c;
  --accent:#ffb340;
  --accent-light:#fff4e2;
  --border:#e6e9f2;
  --bg:#f5f7fb;
}
*{box-sizing:border-box;}
body{
  margin:0; font-family:'Hind Siliguri',sans-serif; background:var(--bg);
  height:100vh; display:flex; flex-direction:column;
}

/* ---------- Header ---------- */
.cb-header{
  background:var(--primary); color:#fff; padding:14px 16px;
  display:flex; align-items:center; gap:10px; flex-shrink:0;
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
}
.cb-header-avatar{
  width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,0.18);
  display:flex; align-items:center; justify-content:center; font-size:19px; flex-shrink:0;
  overflow:hidden;
}
.cb-header-avatar img{width:100%; height:100%; object-fit:cover; border-radius:50%;}
.cb-header-title{font-weight:700; font-size:15.5px;}
.cb-header-sub{font-size:11.5px; opacity:0.85; margin-top:1px;}
.cb-header-status{margin-left:auto; font-size:11px; display:flex; align-items:center; gap:5px; opacity:0.9;}
.cb-dot{width:7px; height:7px; border-radius:50%; background:#3ddc84;}

/* ---------- Messages ---------- */
.cb-messages{
  flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px;
}
.cb-msg{
  max-width:84%; padding:10px 14px; border-radius:15px; font-size:14px; line-height:1.55;
  white-space:pre-line; animation:cbIn .18s ease;
}
@keyframes cbIn{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);}}
.cb-msg.bot{background:#fff; border:1px solid var(--border); align-self:flex-start; border-bottom-left-radius:4px; color:#222;}
.cb-msg.user{background:var(--primary); color:#fff; align-self:flex-end; border-bottom-right-radius:4px;}
.cb-typing{align-self:flex-start; background:#fff; border:1px solid var(--border); border-radius:15px; border-bottom-left-radius:4px; padding:10px 14px; display:flex; gap:4px;}
.cb-typing span{width:6px; height:6px; border-radius:50%; background:#b7bfd6; animation:cbBounce 1.1s infinite;}
.cb-typing span:nth-child(2){animation-delay:.15s;} .cb-typing span:nth-child(3){animation-delay:.3s;}
@keyframes cbBounce{0%,60%,100%{transform:translateY(0);} 30%{transform:translateY(-5px);}}

/* Product card inside chat */
.cb-product-card{
  background:#fff; border:1px solid var(--border); border-radius:14px; overflow:hidden;
  max-width:220px; align-self:flex-start; box-shadow:0 2px 6px rgba(0,0,0,0.04);
}
.cb-product-card img{width:100%; height:130px; object-fit:cover; display:block; background:#f0f1f5;}
.cb-product-card-body{padding:10px 12px;}
.cb-product-card-name{font-weight:700; font-size:13.5px; color:var(--primary-dark); margin-bottom:4px;}
.cb-product-card-price{font-weight:800; color:var(--primary); font-size:14px;}
.cb-product-card-stock{font-size:11.5px; margin-top:3px;}
.cb-product-card-stock.in{color:#1a9e5c;} .cb-product-card-stock.out{color:#e0433c;}

/* Quick replies */
.cb-quick-replies{display:flex; flex-wrap:wrap; gap:7px; padding:0 16px 12px;}
.cb-quick-btn{
  background:#fff; border:1.4px solid var(--primary); color:var(--primary);
  font-size:12.5px; font-weight:600; padding:7px 14px; border-radius:20px; cursor:pointer;
}
.cb-quick-btn:active{background:var(--primary); color:#fff;}

/* Input */
.cb-input-row{display:flex; gap:8px; padding:10px 12px; border-top:1px solid var(--border); background:#fff; flex-shrink:0;}
.cb-input{flex:1; border:1px solid var(--border); border-radius:22px; padding:11px 16px; font-size:14px; font-family:inherit; outline:none;}
.cb-input:focus{border-color:var(--primary);}
.cb-send{background:var(--primary); color:#fff; border:none; width:42px; height:42px; border-radius:50%; font-size:17px; cursor:pointer; flex-shrink:0;}
.cb-send:active{opacity:0.85;}
.cb-send:disabled{opacity:0.4;}
