:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.chat-widget-wrapper{position:fixed;bottom:24px;right:24px;z-index:9999;display:flex;flex-direction:column;align-items:flex-end}.chat-window{position:absolute;bottom:72px;right:0;width:400px;height:640px;background:#fff;border-radius:24px;box-shadow:0 20px 60px #00000026,0 0 0 1px #00000008;display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(20px) scale(.95);visibility:hidden;transition:all .3s cubic-bezier(.175,.885,.32,1.275);transform-origin:bottom right;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,sans-serif}.opened .chat-window{opacity:1;transform:translateY(0) scale(1);visibility:visible}.chat-header{background:linear-gradient(135deg,#1e3a5f,#1e40af);padding:15px;display:flex;align-items:center;justify-content:space-between;gap:15px;flex-shrink:0;box-shadow:0 4px 12px #0000001a;z-index:10}.header-left{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.header-avatar{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#3b82f6,#2563eb);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 2px 8px #3b82f64d}.header-avatar svg{width:22px;height:22px;stroke:#fff;fill:none;stroke-width:2}.header-info{display:flex;flex-direction:column;gap:3px;min-width:0}.header-info strong{color:#fff;font-size:16px;font-weight:600}.header-status{color:#ffffffbf;font-size:12px;display:flex;align-items:center;gap:6px}.status-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.status-dot.online{background:#34d399;box-shadow:0 0 0 2px #34d3994d}.status-dot.offline{background:#9ca3af}.header-close-btn{background:#fff3;border:none;border-radius:50%;width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#fff;transition:all .2s;flex-shrink:0}.header-close-btn:hover{background:#ffffff1a}.header-close-btn:hover{background:#fff3;color:#fff}.messages-area{background:#fff;flex:1;overflow-y:auto;padding:32px 4px;display:flex;flex-direction:column;gap:34px}.messages-area::-webkit-scrollbar{width:4px}.messages-area::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:2px}.msg-bubble{display:flex;align-items:flex-end;gap:10px;max-width:95%;margin:0!important;animation:messageSlide .2s ease-out}.msg-bubble .msg-content{margin-bottom:2px}@keyframes messageSlide{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.msg-bubble.customer{align-self:flex-end;justify-content:flex-end;gap:0}.msg-bubble.customer .msg-content{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;border-radius:18px 4px 18px 18px;padding:14px 22px;box-shadow:0 4px 12px #2563eb40;text-align:right;max-width:100%}.msg-bubble.customer .msg-text,.msg-bubble.customer .markdown-bubble,.msg-bubble.customer .markdown-bubble p{text-align:right}.msg-bubble.customer .msg-text,.msg-bubble.customer .markdown-bubble,.msg-bubble.customer .markdown-bubble p{text-align:right!important}.msg-bubble.customer .msg-content:has(.attachment:not(.has-text)){padding:0;background:none;box-shadow:none;border-radius:0}.msg-bubble.agent,.msg-bubble.staff,.msg-bubble.bot,.msg-bubble.assistant{align-self:flex-start;justify-content:flex-start}.msg-bubble.agent .msg-content,.msg-bubble.staff .msg-content,.msg-bubble.bot .msg-content,.msg-bubble.assistant .msg-content{background:#f1f5f9;color:#0f172a;border-radius:4px 18px 18px;padding:14px 22px;text-align:left;max-width:100%;box-shadow:0 2px 8px #0000000d}.msg-bubble.system{align-self:center;max-width:90%;justify-content:center;margin:10px 0;gap:0}.msg-bubble.system .msg-content{background:transparent;color:#64748b;font-size:13px;font-style:italic;text-align:center;padding:0;box-shadow:none}.msg-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#3b82f6,#2563eb);box-shadow:0 4px 10px #2563eb40;transition:all .2s}.msg-avatar.bot-avatar{background:linear-gradient(135deg,#64748b,#334155);box-shadow:0 4px 10px #33415533}.msg-avatar.agent-avatar{background:linear-gradient(135deg,#3b82f6,#2563eb)}.msg-avatar svg{width:14px;height:14px;fill:#fff}.msg-text{font-size:15px;line-height:1.6;word-wrap:break-word}.msg-bubble.customer .markdown-bubble,.msg-bubble.customer .markdown-bubble *{color:#fff}.msg-bubble.agent .markdown-bubble,.msg-bubble.agent .markdown-bubble *,.msg-bubble.staff .markdown-bubble,.msg-bubble.staff .markdown-bubble *{color:inherit}.attachment{margin-top:0}.attachment.has-text{margin-top:6px}.msg-img{max-width:180px;max-height:200px;border-radius:10px;display:block;object-fit:contain;box-shadow:0 4px 12px #0000001f}.msg-img.right{margin-left:auto}.msg-img.left{margin-right:auto}.msg-file{color:inherit;display:inline-flex;align-items:center;gap:4px;font-size:13px;padding:6px 10px;background:#0000000d;border-radius:6px;text-decoration:none}.msg-bubble.customer .msg-file{background:#fff3}.quick-shortcuts-bar{display:flex;gap:6px;padding:10px 16px;overflow-x:auto;background:#fff;border-top:1px solid #f3f4f6;flex-shrink:0;margin-bottom:2px}.quick-shortcuts-bar::-webkit-scrollbar{height:0}.shortcut-pill{flex-shrink:0;padding:6px 14px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:20px;font-size:12px;color:#4b5563;cursor:pointer;font-weight:500;white-space:nowrap}.shortcut-pill:hover{background:#f3f4f6}.input-area{background:#fff;padding:10px 12px;flex-shrink:0}.input-wrapper{display:flex;align-items:center;gap:8px;background:#f1f5f9;border:1px solid #cbd5e1;border-radius:20px;padding:6px 8px;transition:all .2s}.input-wrapper:focus-within{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb14;background:#fff}.message-input{flex:1;border:none;background:transparent;font-size:15px;line-height:1.4;resize:none;max-height:120px;padding:8px 0;color:#0f172a;font-family:inherit;display:flex;align-items:center}.message-input::placeholder{color:#9ca3af}.message-input:focus{outline:none}.input-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;padding-right:4px}.icon-btn{width:36px;height:36px;border:none;background:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#475569;transition:all .2s}.icon-btn:hover:not(.disabled){background:#f1f5f9}.icon-btn.active{color:#2563eb}.icon-btn.disabled{opacity:.4;cursor:not-allowed}.icon-label{cursor:inherit;display:flex;align-items:center;justify-content:center}.send-btn{width:36px;height:36px;border:none;background:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#2563eb;transition:all .2s}.send-btn:hover:not(.disabled){background:#2563eb14}.send-btn.disabled{opacity:.35;cursor:not-allowed;color:#9ca3af}.send-btn svg,.icon-btn svg{width:22px;height:22px;display:block}.spinner{width:16px;height:16px;border:2px solid rgba(37,99,235,.3);border-top-color:#2563eb;border-radius:50%;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.powered-by{text-align:center;font-size:11px;color:#9ca3af;padding:6px 0 0}.powered-by strong{color:#6b7280;font-weight:500}.upload-error{display:flex;justify-content:space-between;padding:8px 12px;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;font-size:12px;color:#dc2626;margin-top:8px}.upload-error button{background:none;border:none;cursor:pointer;color:#dc2626}.chat-bubble{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#3b82f6,#2563eb);border:none;color:#fff;font-size:24px;cursor:pointer;box-shadow:0 4px 16px #2563eb66;position:relative}.chat-bubble:hover{transform:scale(1.1)}.markdown-content{display:inline}.markdown-bubble{display:inline-block;max-width:100%}.markdown-p-bubble{margin:0}.markdown-p-bubble+.markdown-p-bubble{margin-top:8px}.markdown-strong-bubble{font-weight:600}.markdown-code-inline-bubble{background:#00000014;padding:2px 4px;border-radius:4px;font-family:monospace;font-size:.85em}.msg-bubble.customer .markdown-code-inline-bubble{background:#fff3}.msg-bubble.agent .markdown-link-bubble,.msg-bubble.staff .markdown-link-bubble{color:#2563eb}.typing-indicator{display:flex;align-items:center;gap:8px;padding:8px 16px;font-size:12px;color:#6b7280}.typing-dots{display:flex;gap:4px}.typing-dots span{width:6px;height:6px;border-radius:50%;background:#6b7280;animation:typingBounce 1.4s infinite ease-in-out}.typing-dots span:nth-child(1){animation-delay:-.32s}.typing-dots span:nth-child(2){animation-delay:-.16s}@keyframes typingBounce{0%,80%,to{transform:scale(.6);opacity:.4}40%{transform:scale(1);opacity:1}}.trigger-message{padding:16px;border-bottom:1px solid #f3f4f6}.trigger-message .quick-reply-btn{display:inline-block;padding:6px 14px;margin:4px 4px 4px 0;background:#f9fafb;border:1px solid #e5e7eb;border-radius:20px;font-size:12px;color:#4b5563;cursor:pointer;font-weight:500}@media(max-width:480px){.chat-window{width:100vw;height:100vh;bottom:0;right:0;border-radius:0}.msg-bubble{max-width:90%}}
