/* ---------- chatbot (same system as refined preview) ---------- */
.cb-fab { position: fixed; right: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px); z-index: 1600; display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--dq-fg,#f3eefc); color: var(--dq-bg,#0a0614); font-weight: 700; font-size: .82rem; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .55); transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .3s; }
.cb-fab:hover { transform: translateY(-2px); }
.cb-fab i { width: 22px; height: 22px; border-radius: 50%; background: var(--dq-accent,#7c3aed); display: grid; place-items: center; } .cb-fab i::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #c6f432; }
body.cb-open .cb-fab { opacity: 0; pointer-events: none; }
.cb { position: fixed; right: clamp(10px, 2vw, 28px); bottom: clamp(10px, 2vw, 28px); z-index: 1700; width: min(390px, calc(100vw - 20px)); height: min(600px, calc(100svh - 24px)); display: flex; flex-direction: column; border-radius: 20px; background: #130c26; color: #f5f0ff; border: 1px solid rgba(196, 181, 253, .2); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .7); overflow: hidden; transform: translateY(24px) scale(.97); opacity: 0; visibility: hidden; transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .35s, visibility 0s .5s; font-size: .88rem; }
body.cb-open .cb { transform: none; opacity: 1; visibility: visible; transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .35s; }
.cb-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(196, 181, 253, .14); } .cb-h img { width: 28px; height: auto; } .cb-h div { flex: 1; line-height: 1.25; } .cb-h b { display: block; font-size: .92rem; } .cb-h small { color: #a39cc0; font-size: .72rem; }
.cb-h button { color: #c4b5fd; font-size: .74rem; font-weight: 700; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(196, 181, 253, .3); } .cb-h button:hover { background: rgba(196, 181, 253, .14); }
.cb-x { width: 30px; height: 30px; padding: 0 !important; display: grid; place-items: center; font-size: 1rem !important; }
.cb-m { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.cb-b { max-width: 86%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; animation: fadeUp .4s cubic-bezier(.22,1,.36,1); white-space: pre-wrap; }
.cb-b.bot { background: rgba(196, 181, 253, .1); border-bottom-left-radius: 5px; align-self: flex-start; } .cb-b.me { background: #7c3aed; color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.cb-q { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; } .cb-q button { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(196, 181, 253, .35); color: #ddd0ff; font-size: .76rem; font-weight: 600; } .cb-q button:hover { background: rgba(196, 181, 253, .16); }
.cb-f { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(196, 181, 253, .14); }
.cb-f input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .06); border: 1px solid rgba(196, 181, 253, .2); border-radius: 999px; padding: 10px 16px; outline: none; font-size: .86rem; } .cb-f input:focus { border-color: #c4b5fd; }
.cb-f button { width: 40px; height: 40px; border-radius: 50%; background: #c4b5fd; color: #1a0b3a; display: grid; place-items: center; } .cb-f button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cb-consent { padding: 8px 16px 12px; font-size: .68rem; color: #a39cc0; line-height: 1.45; } .cb-consent label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; } .cb-consent input { margin-top: 2px; accent-color: #7c3aed; }
.cb-demo { padding: 6px 16px; font-size: .64rem; text-align: center; background: rgba(198, 244, 50, .1); color: #d8f78a; }
@media (max-width: 520px) { .cb { right: 0; bottom: 0; width: 100vw; height: 100svh; border-radius: 0; } }


@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}}
.dqai.cb-left .cb-fab { right: auto; left: clamp(14px, 2vw, 28px); } .dqai.cb-left .cb { right: auto; left: clamp(10px, 2vw, 28px); }
.cb[hidden] { display: none; }
body.cb-open .cb[hidden] { display: flex; }
.cb-endbox { padding: 14px 16px; display: grid; gap: 8px; border-top: 1px solid rgba(196,181,253,.14); font-size: .8rem; color: #cfc5ee; }
.cb-endbox p { margin: 0 0 2px; }
.cb-endbox input { background: rgba(255,255,255,.06); border: 1px solid rgba(196,181,253,.2); border-radius: 10px; padding: 9px 12px; color: inherit; outline: none; font: inherit; }
.cb-endbox input:focus { border-color: #c4b5fd; }
.cb-endbox div { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-endbox button { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(196,181,253,.4); color: #f3eefc; font-weight: 600; font-size: .78rem; cursor: pointer; background: none; }
.cb-endbox .y { background: #c4b5fd; color: #1a0b3a; border-color: #c4b5fd; }
.cb-typing { display: inline-flex; gap: 4px; align-items: center; } .cb-typing i { width: 6px; height: 6px; border-radius: 50%; background: #c4b5fd; animation: cbT 1s ease-in-out infinite; } .cb-typing i:nth-child(2) { animation-delay: .15s; } .cb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cbT { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.cb-f input:disabled { opacity: .5; } .cb-f button:disabled { opacity: .4; cursor: not-allowed; }
.cb-consent a { color: #c4b5fd; text-decoration: underline; }
.cb-b.err { background: rgba(251,113,133,.14); color: #fecdd3; }
@media (prefers-reduced-motion: reduce) { .cb-typing i { animation: none; } }
.cb-consent.nudge { outline: 1px solid #c6f432; border-radius: 8px; }
.cb-note { margin-top: 6px; opacity: .8; }
.cb-q.cb-ind button { font-size: .72rem; }
.cb-q { max-height: 140px; overflow-y: auto; }
