/* Wappx live chat widget (public website + client dashboard) */
.cw, .cw * { box-sizing: border-box; }
.cw { font-family: inherit; line-height: 1.4; }
/* ===== Live chat widget ===== */
.cw { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 70; font-size: 14px; }
.cw.is-open { z-index: 200; }
.cw-launch { display: inline-flex; align-items: center; gap: 8px; height: 58px; padding: 0 22px 0 18px; border: 0; border-radius: 30px; cursor: pointer; color: #fff; font: inherit; font-weight: 700;
  background: linear-gradient(135deg, #0b3d91, #1e6bff); box-shadow: 0 14px 30px rgba(11,61,145,.42); position: relative; transition: transform .2s; }
.cw-launch:hover { transform: translateY(-2px); }
.cw-launch-ico { font-size: 22px; line-height: 1; }
.cw-unread { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 22px; height: 22px; border-radius: 11px; background: #ef4444; color: #fff; font-style: normal; font-size: 12px; display: grid; place-items: center; border: 2px solid #fff; }
.cw.is-open .cw-launch { display: none; }
.cw-panel { width: min(380px, calc(100vw - 24px)); height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fff; color: #0f172a; border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(15,23,42,.32); animation: cw-in .25s ease-out; }
.cw-panel[hidden] { display: none; }
@keyframes cw-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.cw-head { background: linear-gradient(135deg, #0b3d91, #1e6bff); color: #fff; padding: 16px 18px 12px; }
.cw-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cw-head strong { display: block; font-size: 16px; }
.cw-head small { display: block; opacity: .85; font-size: 12.5px; margin-top: 2px; }
.cw-head small.on::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34d399; margin-inline-end: 6px; box-shadow: 0 0 0 3px rgba(52,211,153,.3); }
.cw-x { background: rgba(255,255,255,.16); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.cw-team { display: flex; margin-top: 12px; }
.cw-av { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #dbe7ff; color: #0b3d91; border: 2px solid #fff; margin-inline-end: -8px; }
.cw-av i { position: absolute; bottom: -1px; inset-inline-end: -1px; width: 11px; height: 11px; border-radius: 50%; background: #94a3b8; border: 2px solid #fff; }
.cw-av.on i { background: #22c55e; }
.cw-hours { margin: 10px 0 0; font-size: 11.5px; opacity: .8; }
.cw-body { flex: 1; overflow-y: auto; padding: 16px; background: #f4f7fc; display: flex; flex-direction: column; gap: 10px; }
.cw-msg { max-width: 86%; display: flex; flex-direction: column; gap: 3px; }
.cw-msg time { font-size: 10.5px; color: #94a3b8; }
.cw-who { font-size: 11.5px; color: #64748b; font-weight: 600; }
.cw-bubble { padding: 10px 13px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.cw-bot .cw-bubble, .cw-agent .cw-bubble { background: #fff; border: 1px solid #e2e8f0; border-start-start-radius: 4px; }
.cw-agent .cw-bubble { border-color: #bfd3ff; background: #eef4ff; }
.cw-visitor { align-self: flex-end; align-items: flex-end; }
.cw-visitor .cw-bubble { background: #1e6bff; color: #fff; border-start-end-radius: 4px; }
.cw-sys { align-self: center; text-align: center; font-size: 12px; color: #475569; background: #e8eef9; padding: 6px 12px; border-radius: 12px; max-width: 92%; }
.cw-more { font-size: 12.5px; color: #1e6bff; font-weight: 600; text-decoration: none; }
.cw-handoff, .cw-expert-btn { align-self: flex-start; border: 1px solid #1e6bff; color: #1e6bff; background: #fff; border-radius: 18px; padding: 7px 14px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.cw-handoff:hover, .cw-expert-btn:hover { background: #1e6bff; color: #fff; }
.cw-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; }
.cw-typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: cw-dot 1s infinite; }
.cw-typing i:nth-child(2) { animation-delay: .15s; } .cw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cw-dot { 50% { transform: translateY(-4px); opacity: .5; } }
.cw-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; background: #f4f7fc; }
.cw-chips:not(:empty) { padding-bottom: 10px; }
.cw-chip { border: 1px solid #c7d6f5; background: #fff; color: #0b3d91; border-radius: 16px; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.cw-chip:hover { background: #eef4ff; }
.cw-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e2e8f0; align-items: flex-end; }
.cw-input[hidden], .cw-expert[hidden] { display: none; }
.cw-input textarea { flex: 1; resize: none; border: 1px solid #cbd5e1; border-radius: 14px; padding: 10px 12px; font: inherit; max-height: 110px; outline: none; }
.cw-input textarea:focus { border-color: #1e6bff; box-shadow: 0 0 0 3px rgba(30,107,255,.15); }
.cw-input button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #1e6bff; color: #fff; font-size: 16px; cursor: pointer; flex: none; }
.cw-expert { padding: 14px 16px; border-top: 1px solid #e2e8f0; display: grid; gap: 8px; }
.cw-expert label { display: grid; gap: 3px; font-size: 12.5px; color: #475569; }
.cw-expert input { border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 11px; font: inherit; }
.cw-hint { margin: 0; font-size: 11.5px; color: #64748b; }
.cw-err { margin: 0; color: #dc2626; font-size: 12.5px; }
.cw-row { display: flex; gap: 10px; align-items: center; }
.cw-btn { background: #1e6bff; color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.cw-link { background: none; border: 0; color: #64748b; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.cw-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 12px; gap: 8px; }
.cw-foot .cw-expert-btn { padding: 6px 12px; font-size: 12.5px; }
@media (max-width: 640px) {
  .cw { inset-inline-end: 12px; bottom: 12px; }
  .cw-launch { height: 52px; padding: 0 16px; }
  .cw-launch-txt { display: none; }
  .cw.is-open { inset: 0; }
  .cw-panel { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
}

.cw-unread[hidden] { display: none; }
/* inside the client dashboard: opened from the top bar */
.cw-inapp .cw-launch { display: none; }

/* Bot answer being written out */
.cw-bubble.cw-writing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-inline-start: 2px; vertical-align: -2px; background: currentColor; opacity: .6; animation: cw-caret .8s steps(2) infinite; }
@keyframes cw-caret { 50% { opacity: 0; } }
.cw-msg [hidden] { display: none !important; }
