/* ==========================================================
   Xinia's Furniture - Chatbot styles
   Uses the site color variables from assets/css/xinias.css
   ========================================================== */
/* ---------- Chat widget ---------- */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-bubble { background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 22px; box-shadow: var(--shadow); font-size: 15px; position: relative; display: flex; align-items: center; gap: 10px; }
.chat-bubble .x { background: none; border: 0; color: #999; font-size: 14px; padding: 0 0 0 4px; cursor: pointer; }
.chat-row { display: flex; align-items: center; gap: 10px; }
.chat-open { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: var(--white); border: 0; border-radius: 30px; padding: 12px 22px; font-size: 16px; box-shadow: var(--shadow); cursor: pointer; }
.chat-open:hover { background: var(--gold); }
.chat-avatar { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg, #2F6FD6, #1A3E86); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 26px; border: 3px solid var(--white); box-shadow: var(--shadow); cursor: pointer; }
.chat-panel { width: min(340px, calc(100vw - 40px)); background: var(--white); border-radius: 14px; box-shadow: 0 18px 50px rgba(var(--navy-rgb), .28); overflow: hidden; display: none; }
.chat-panel.open { display: block; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat-panel .cp-head { background: var(--navy); color: var(--white); padding: 18px 20px; display: flex; gap: 12px; align-items: center; }
.chat-panel .cp-head b { display: block; font-weight: 500; }
.chat-panel .cp-head small { color: rgba(255,255,255,.7); }
.chat-panel .cp-head .x { margin-left: auto; background: none; border: 0; color: var(--white); font-size: 19.5px; cursor: pointer; }
.chat-panel .cp-body { padding: 16px; }
.chat-panel .cp-msg { background: var(--cream); border-radius: 12px 12px 12px 2px; padding: 12px 14px; font-size: 15px; margin-bottom: 14px; color: var(--ink); }
.chat-panel .cp-opt { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; color: var(--ink); font-size: 15.5px; }
.chat-panel .cp-opt i { color: var(--gold); width: 18px; text-align: center; }
.chat-panel .cp-opt:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-tint); }
.chat-panel .cp-foot { font-size: 13px; text-align: center; color: #8A827A; padding: 0 16px 14px; }

/* Chatbot conversation */
.chat-panel { width: min(370px, calc(100vw - 32px)); }
.chat-panel.open { display: flex; flex-direction: column; max-height: min(620px, calc(100vh - 120px)); }
.chat-panel .cp-head { flex: 0 0 auto; }
.chat-panel .cp-head small { display: flex; align-items: center; gap: 6px; }
.cb-online { width: 8px; height: 8px; border-radius: 50%; background: #3CCB6E; display: inline-block; box-shadow: 0 0 0 3px rgba(60,203,110,.25); }
.cb-lang { margin-left: auto; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); color: var(--white); border-radius: 20px; font-size: 13px; font-weight: 600; letter-spacing: .08em; padding: 4px 10px; cursor: pointer; }
.cb-lang:hover { background: var(--gold); border-color: var(--gold); }
.chat-panel .cp-head .cb-lang + .x { margin-left: 4px; }
.cb-messages { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px 6px; background: #FBF9F6; min-height: 220px; }
.cb-msg { display: flex; flex-direction: column; margin-bottom: 10px; }
.cb-msg.cb-user { align-items: flex-end; }
.cb-bubble { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.5; word-wrap: break-word; }
.cb-bot .cb-bubble { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cb-user .cb-bubble { background: var(--navy); color: var(--white); border-bottom-right-radius: 4px; }
.cb-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; max-width: 92%; }
.cb-links a { font-size: 13.5px; padding: 6px 11px; border-radius: 16px; background: var(--gold); color: var(--white); }
.cb-links a:hover { background: var(--gold-dark); color: var(--white); }
.cb-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.cb-typing span { width: 7px; height: 7px; border-radius: 50%; background: #B9AFA3; animation: cbDot 1s infinite ease-in-out; }
.cb-typing span:nth-child(2) { animation-delay: .15s; }
.cb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cbDot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.cb-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; background: #FBF9F6; flex: 0 0 auto; }
.cb-quick:empty { display: none; }
.cb-quick button { border: 1px solid var(--gold); background: var(--white); color: var(--gold-dark); border-radius: 16px; padding: 6px 12px; font-size: 14px; cursor: pointer; font-family: var(--font-body); }
.cb-quick button:hover { background: var(--gold); color: var(--white); }
.cb-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--white); flex: 0 0 auto; }
.cb-input input { flex: 1; min-width: 0; border: 1px solid #DDD3C6; border-radius: 22px; padding: 10px 14px; font-size: 15px; font-family: var(--font-body); outline: none; }
.cb-input input:focus { border-color: var(--gold); }
.cb-input button { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; border: 0; background: var(--gold); color: var(--white); cursor: pointer; }
.cb-input button:hover { background: var(--gold-dark); }
.chat-panel .cp-foot { padding: 8px 14px 10px; background: var(--white); }
.chat-panel .cp-foot a { color: var(--gold-dark); }
.cb-lead { background: var(--white); border: 1px solid var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 12px; padding: 12px; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 7px; }
.cb-lead b { color: var(--ink); font-size: 15px; font-weight: 500; }
.cb-lead input { border: 1px solid #DDD3C6; border-radius: 8px; padding: 8px 11px; font-size: 14.5px; font-family: var(--font-body); outline: none; }
.cb-lead input:focus { border-color: var(--gold); }
.cb-lead small { font-size: 13px; color: #8A827A; }
.cb-lead button { background: var(--navy); color: var(--white); border: 0; border-radius: 8px; padding: 9px; font-size: 15px; cursor: pointer; }
.cb-lead button:hover { background: var(--gold); }
.cb-hp { position: absolute !important; left: -9999px !important; }
.chat-bubble { cursor: pointer; }

@media (max-width: 767px) {
  .chat-bubble { display: none; }
  .chat-open span { display: none; }
  .chat-open { padding: 14px; border-radius: 50%; }
}
