/* ===== AI Chat Widget — reusable across all client sites ===== */
/* Push the site's own floating WhatsApp button up, above our AI chat button */
.float-actions--right{ bottom:100px !important; }

#aiChatBtn{
  position:fixed; right:24px; bottom:24px; z-index:9999;
  height:52px; padding:0 18px 0 16px; border-radius:30px;
  background:#1f8a4d; color:#fff; border:none; cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
  display:flex; align-items:center; gap:8px;
  font-size:14.5px; font-weight:600;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  transition:transform .2s ease;
}
#aiChatBtn:hover{ transform:scale(1.04); }
#aiChatBtn .icon{ font-size:20px; line-height:1; }
#aiChatBtn .dot{
  position:absolute; top:-3px; right:-3px; width:12px; height:12px;
  background:#ff5b5b; border-radius:50%; border:2px solid #fff;
}
@media (max-width:480px){
  #aiChatBtn .label{ display:none; } /* icon-only pill on very small screens to save space */
  #aiChatBtn{ padding:0; width:52px; height:52px; border-radius:50%; justify-content:center; }
}

#aiChatWindow{
  position:fixed; right:24px; bottom:86px; z-index:9999;
  width:340px; max-width:92vw; height:460px; max-height:75vh;
  background:#fff; border-radius:16px; overflow:hidden;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  display:none; flex-direction:column;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
#aiChatWindow.open{ display:flex; }

#aiChatHead{
  background:#1f8a4d; color:#fff; padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between;
}
#aiChatHead .title{ font-size:15px; font-weight:600; }
#aiChatHead .sub{ font-size:11.5px; opacity:.85; }
#aiChatClose{ background:none; border:none; color:#fff; font-size:20px; cursor:pointer; line-height:1; }

#aiChatBody{
  flex:1; overflow-y:auto; padding:14px; background:#f6f4ef;
  display:flex; flex-direction:column; gap:10px;
}
.aiMsg{ max-width:82%; padding:9px 12px; border-radius:12px; font-size:13.5px; line-height:1.45; }
.aiMsg.bot{ align-self:flex-start; background:#fff; border:1px solid #e4e0d6; color:#2a2a2a; border-bottom-left-radius:3px; }
.aiMsg.user{ align-self:flex-end; background:#1f8a4d; color:#fff; border-bottom-right-radius:3px; }
.aiMsg.typing{ align-self:flex-start; background:#fff; border:1px solid #e4e0d6; color:#999; font-style:italic; }

.aiMsg a.wa-btn{
  display:inline-block; margin-top:6px; background:#25D366; color:#fff !important;
  padding:7px 12px; border-radius:8px; font-size:12.5px; text-decoration:none; font-weight:600;
}

#aiChatInputRow{
  display:flex; gap:8px; padding:10px; border-top:1px solid #eee; background:#fff;
}
#aiChatInput{
  flex:1; border:1px solid #ddd; border-radius:20px; padding:9px 14px;
  font-size:13.5px; outline:none;
}
#aiChatInput:focus{ border-color:#1f8a4d; }
#aiChatSend{
  background:#1f8a4d; color:#fff; border:none; border-radius:50%;
  width:38px; height:38px; cursor:pointer; font-size:16px; flex-shrink:0;
}
#aiChatSend:disabled{ opacity:.5; cursor:default; }

@media (max-width:480px){
  #aiChatWindow{ right:10px; left:10px; width:auto; bottom:78px; }
}
