/* Bubble */
#cp-chat{ position:fixed; right:18px; bottom:18px; z-index:1050; font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial; }
#cp-chat-toggle{
  width:56px; height:56px; border-radius:50%; border:none; cursor:pointer;
  color:#1E5FDB; background:#fff; box-shadow:0 10px 30px rgba(31,78,255,.35);
  display:grid; place-items:center; transition:.2s transform, .2s box-shadow;
}
#cp-chat-toggle:hover{ transform:translateY(-2px); box-shadow:0 12px 36px rgba(31,78,255,.45); }

/* Panel */
#cp-chat-box{
  position:fixed; right:18px; bottom:84px; width:min(420px,calc(100vw - 28px));
  background:#fff; border-radius:16px; box-shadow:0 18px 60px rgba(0,0,0,.22);
  border:1px solid rgba(15,27,45,.08); overflow:hidden; display:flex; flex-direction:column;
}
#cp-chat-box.hidden{ display:none; }
.cp-header{
  background:linear-gradient(90deg,#6D28D9 0%,#2F7BFF 100%); color:#fff; padding:10px 12px;
  display:flex; align-items:center; justify-content:space-between;
}
.cp-title{ display:flex; align-items:center; gap:.5rem; }
#cp-chat-close{ background:transparent; border:none; color:#fff; font-size:20px; cursor:pointer; opacity:.9; }
#cp-chat-close:hover{ opacity:1; }

/* Messages */
#cp-chat-messages{ padding:14px; max-height:60vh; overflow:auto; background:#f7f9fc; }
.cp-msg{ padding:10px 12px; border-radius:12px; margin:8px 0; line-height:1.45; font-size:15px; }
.cp-bot{ background:#fff; border:1px solid rgba(15,27,45,.08); }
.cp-user{ background:#2F7BFF; color:#fff; margin-left:auto; max-width:85%; }
.cp-thinking{ opacity:.7; font-style:italic; }

/* Input */
#cp-chat-form{ display:flex; gap:8px; padding:10px; border-top:1px solid rgba(15,27,45,.08); background:#fff; }
#cp-chat-input{
  flex:1; border:1px solid rgba(15,27,45,.15); border-radius:999px; padding:.7rem 1rem; outline:none;
}
#cp-chat-input:focus{ border-color:#2F7BFF; box-shadow:0 0 0 3px rgba(47,123,255,.15); }
#cp-chat-send{ border:none; background:#2F7BFF; color:#fff; border-radius:999px; padding:.7rem 1rem; cursor:pointer; }
#cp-chat-send:hover{ filter:brightness(.94); }
