:root{--widget-brand: #6c47ff;--widget-brand-contrast: #ffffff;--widget-surface: #ffffff;--widget-surface-sunken: #f4f4f5;--widget-text: #1a1a1a;--widget-text-muted: #6b7280;--widget-border: #e5e7eb;--widget-agent-bubble: #f1f1f4;--widget-danger: #dc2626;--widget-radius: 14px;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}body{margin:0;color:var(--widget-text);background:var(--widget-surface)}.widget-landing,.widget-error{max-width:640px;margin:64px auto;padding:0 24px;line-height:1.5}.widget-landing h1,.widget-error h1{font-size:22px}.cw-panel{display:flex;flex-direction:column;height:100dvh;background:var(--widget-surface);overflow:hidden}.cw-header{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;background:var(--widget-brand);color:var(--widget-brand-contrast)}.cw-header__titles{flex:1;min-width:0}.cw-header__title{margin:0;font-size:16px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cw-header__subtitle{display:flex;align-items:center;gap:6px;margin:4px 0 0;font-size:12px;opacity:.9}.cw-header__close{flex:none;width:28px;height:28px;border:0;border-radius:8px;background:#ffffff29;color:inherit;font-size:20px;line-height:1;cursor:pointer}.cw-header__close:hover{background:#ffffff47}.cw-conn{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.5}.cw-conn--connected{background:#34d399;opacity:1}.cw-conn--connecting{background:#fbbf24;opacity:1}.cw-conn--disconnected{background:#f87171;opacity:1}.cw-body{flex:1;min-height:0;display:flex;flex-direction:column}.cw-status-message{margin:auto;padding:24px;color:var(--widget-text-muted);font-size:14px;text-align:center}.cw-status-message--error{color:var(--widget-danger)}.cw-messages{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:6px}.cw-messages__greeting{align-self:flex-start;max-width:85%;margin-bottom:6px;padding:10px 14px;border-radius:var(--widget-radius);background:var(--widget-agent-bubble);color:var(--widget-text);font-size:14px;line-height:1.45}.cw-messages__empty{margin:auto;color:var(--widget-text-muted);font-size:14px;text-align:center}.cw-messages__group{display:flex;flex-direction:column;gap:2px}.cw-day-separator{display:flex;justify-content:center;margin:10px 0 6px}.cw-day-separator span{padding:2px 10px;border-radius:999px;background:var(--widget-surface-sunken);color:var(--widget-text-muted);font-size:11px;font-weight:500}.cw-msg{display:flex;align-items:flex-end;gap:8px}.cw-msg--visitor{justify-content:flex-end}.cw-msg--agent{justify-content:flex-start}.cw-msg__avatar,.cw-msg__avatar-spacer{flex:none;width:28px;height:28px;border-radius:50%}.cw-msg__avatar{object-fit:cover;background:var(--widget-brand);color:var(--widget-brand-contrast);display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600}.cw-msg__stack{display:flex;flex-direction:column;max-width:78%}.cw-msg--visitor .cw-msg__stack{align-items:flex-end}.cw-msg__author{margin:0 0 2px 2px;font-size:11px;font-weight:600;color:var(--widget-text-muted)}.cw-bubble{position:relative;padding:9px 13px;border-radius:var(--widget-radius);font-size:14px;line-height:1.4;word-break:break-word;white-space:pre-wrap;display:flex;flex-direction:column;gap:6px}.cw-bubble--visitor{background:var(--widget-brand);color:var(--widget-brand-contrast);border-bottom-right-radius:4px}.cw-bubble--agent{background:var(--widget-agent-bubble);color:var(--widget-text);border-bottom-left-radius:4px}.cw-bubble--pending{opacity:.7}.cw-bubble--failed{outline:1px solid var(--widget-danger)}.cw-bubble__quote{padding:4px 8px;border-left:3px solid currentColor;border-radius:4px;background:#0000000f;font-size:12px;opacity:.85}.cw-bubble__text{display:block}.cw-bubble__reply{align-self:flex-start;padding:0;border:0;background:transparent;color:inherit;font-size:11px;font-weight:600;opacity:0;cursor:pointer;transition:opacity .12s ease}.cw-msg:hover .cw-bubble__reply{opacity:.7}.cw-bubble__reply:hover{opacity:1;text-decoration:underline}.cw-msg__media-link{display:block}.cw-msg__image{display:block;max-width:100%;max-height:240px;border-radius:10px;object-fit:cover}.cw-msg__file{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border-radius:10px;background:#0000000f;color:inherit;font-size:13px;text-decoration:none}.cw-msg__file--pending{opacity:.6}.cw-msg__meta{margin:2px 2px 0;font-size:10px;color:var(--widget-text-muted)}.cw-msg__retry{padding:0;border:0;background:transparent;color:var(--widget-danger);font-size:10px;cursor:pointer}.cw-typing{display:inline-flex;gap:4px;padding:11px 14px;border-radius:var(--widget-radius);border-bottom-left-radius:4px;background:var(--widget-agent-bubble)}.cw-typing__dot{width:6px;height:6px;border-radius:50%;background:var(--widget-text-muted);animation:cw-typing-bounce 1.2s infinite ease-in-out}.cw-typing__dot:nth-child(2){animation-delay:.15s}.cw-typing__dot:nth-child(3){animation-delay:.3s}@keyframes cw-typing-bounce{0%,60%,to{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}.cw-banner{display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px;border-top:1px solid var(--widget-border);background:var(--widget-surface-sunken);color:var(--widget-text-muted);font-size:13px;text-align:center}.cw-banner__restart{padding:8px 16px;border:0;border-radius:10px;background:var(--widget-brand);color:var(--widget-brand-contrast);font-size:13px;font-weight:600;cursor:pointer}.cw-composer{border-top:1px solid var(--widget-border);background:var(--widget-surface)}.cw-composer__reply,.cw-composer__attachment{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--widget-border);font-size:12px;color:var(--widget-text-muted)}.cw-composer__reply-label{font-weight:600}.cw-composer__reply-text,.cw-composer__attachment-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.cw-composer__reply-cancel,.cw-composer__attachment-remove{flex:none;border:0;background:transparent;color:inherit;font-size:16px;line-height:1;cursor:pointer}.cw-composer__error{padding:6px 12px;color:var(--widget-danger);font-size:12px}.cw-composer__row{display:flex;align-items:flex-end;gap:8px;padding:10px 12px}.cw-composer__attach{flex:none;width:36px;height:36px;border:1px solid var(--widget-border);border-radius:10px;background:var(--widget-surface);color:var(--widget-text-muted);font-size:20px;line-height:1;cursor:pointer}.cw-composer__attach:disabled{opacity:.5;cursor:default}.cw-composer__file-input{display:none}.cw-composer__input{flex:1;min-width:0;max-height:120px;padding:9px 12px;border:1px solid var(--widget-border);border-radius:10px;font-size:14px;font-family:inherit;line-height:1.4;resize:none}.cw-composer__input:focus{outline:2px solid var(--widget-brand);outline-offset:-1px}.cw-composer__send{flex:none;height:36px;padding:0 16px;border:0;border-radius:10px;background:var(--widget-brand);color:var(--widget-brand-contrast);font-size:14px;font-weight:600;cursor:pointer}.cw-composer__send:disabled{opacity:.5;cursor:not-allowed}.cw-prechat{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:20px}.cw-prechat__title{margin:0;font-size:18px;font-weight:600}.cw-prechat__subtitle{margin:0;color:var(--widget-text-muted);font-size:14px;line-height:1.45}.cw-prechat__field{display:flex;flex-direction:column;gap:4px}.cw-prechat__label{font-size:12px;font-weight:600;color:var(--widget-text-muted)}.cw-prechat__input{padding:10px 12px;border:1px solid var(--widget-border);border-radius:10px;font-size:14px;font-family:inherit}.cw-prechat__input:focus{outline:2px solid var(--widget-brand);outline-offset:-1px}.cw-prechat__textarea{resize:vertical;min-height:72px}.cw-prechat__submit{margin-top:4px;padding:11px 16px;border:0;border-radius:10px;background:var(--widget-brand);color:var(--widget-brand-contrast);font-size:14px;font-weight:600;cursor:pointer}.cw-prechat__submit:disabled{opacity:.5;cursor:not-allowed}
