/* css/chatbot.css */
#chatbot-root { position: fixed; bottom: 20px; right: 20px; z-index: 9998; font-family: system-ui, sans-serif; }

#cb-fab {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #ff69b4, #d6336c);
  color: #fff; font-size: 26px; border: none; cursor: pointer;
  box-shadow: 0 6px 20px rgba(214,51,108,.45);
  transition: transform .2s;
}
#cb-fab:hover { transform: scale(1.08); }

#cb-panel {
  position: absolute; bottom: 80px; right: 0;
  width: 370px; max-width: calc(100vw - 30px);
  height: 560px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 15px 50px rgba(0,0,0,.25);
  animation: cb-pop .25s ease-out;
}
#cb-panel.cb-hidden { display: none; }
@keyframes cb-pop { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

#cb-header {
  background: linear-gradient(135deg, #ff69b4, #d6336c);
  color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.cb-avatar { font-size: 22px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.cb-info { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.cb-info span { font-size: .75rem; opacity: .9; }
#cb-close { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
#cb-close:hover { background: rgba(255,255,255,.15); }

#cb-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f8f5f7; display: flex; flex-direction: column; gap: 10px; }
.cb-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.4; word-wrap: break-word; animation: cb-in .2s ease-out; }
@keyframes cb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.cb-msg.bot { background: #fff; color: #2c2c2c; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); align-self: flex-start; }
.cb-msg.user { background: #d6336c; color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.cb-msg.typing { display: flex; gap: 5px; padding: 14px; }
.cb-msg.typing span { width: 6px; height: 6px; background: #bbb; border-radius: 50%; animation: cb-dot 1.2s infinite; }
.cb-msg.typing span:nth-child(2) { animation-delay: .15s; }
.cb-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cb-dot { 0%,60%,100% { opacity: .4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.cb-product { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 10px; gap: 10px; margin-top: 6px; }
.cb-prod-info { display: flex; flex-direction: column; font-size: .82rem; gap: 2px; }
.cb-prod-info small { color: #888; font-size: .72rem; }
.cb-price { color: #d6336c; font-weight: 700; }
.cb-add { background: #d6336c; color: #fff; border: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.cb-add:hover { background: #b02a56; }

#cb-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: #fff; border-top: 1px solid #eee; max-height: 140px; overflow-y: auto; }
#cb-quick button { background: #fff; border: 1.5px solid #d6336c; color: #d6336c; padding: 7px 13px; border-radius: 20px; font-size: .78rem; cursor: pointer; transition: all .15s; font-weight: 500; }
#cb-quick button:hover { background: #d6336c; color: #fff; }

#cb-form { display: flex; padding: 10px 12px; background: #fff; border-top: 1px solid #eee; gap: 6px; }
#cb-input { flex: 1; border: 1px solid #eee; border-radius: 20px; padding: 9px 14px; font-size: .88rem; outline: none; }
#cb-input:focus { border-color: #d6336c; }
#cb-form button { background: #d6336c; color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; font-size: 15px; }

@media (max-width: 480px) {
  #cb-panel { width: calc(100vw - 20px); height: calc(100vh - 100px); bottom: 70px; right: -10px; }
}