*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden}
body{background:transparent;color:#252536;font-family:Inter,'DM Sans',Arial,sans-serif}
.widget{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #e9e8ef;border-radius:17px;box-shadow:0 14px 45px #20203325}
.widget>header{flex:none;min-height:76px;padding:15px 17px;background:#7564df;color:white;display:flex;justify-content:space-between;align-items:center}
.widget-brand{display:flex;align-items:center;gap:11px;min-width:0}
.widget-mark{width:36px;height:36px;flex:none;border-radius:50%;display:grid;place-items:center;background:#ffffff2b;font-size:19px}
.widget-logo{width:24px;height:24px;object-fit:contain;border-radius:4px}
.widget-brand strong,.widget-brand small{display:block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.widget-brand strong{font-size:13px}
.widget-brand small{font-size:9px;opacity:.82;margin-top:4px}
.widget-header-actions{display:flex;align-items:center;gap:10px;margin-left:10px}
.widget-header-actions button{width:34px;height:34px;flex:none;display:grid;place-items:center;border:1px solid #ffffff35;border-radius:50%;background:#ffffff20;color:white;outline:none;cursor:pointer;transition:background .18s ease,transform .18s ease,box-shadow .18s ease}
.widget-header-actions button:hover{background:#ffffff3a;transform:translateX(-1px)}
.widget-header-actions button:active{transform:scale(.96)}
.widget-header-actions button:focus-visible{box-shadow:0 0 0 3px #ffffff55}
.widget-header-actions button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.online-indicator{width:8px;height:8px;flex:none;background:#57ce93;border-radius:50%;box-shadow:0 0 0 3px #ffffff25}
.welcome{min-height:0;flex:1;overflow:auto;padding:20px 18px}
.welcome h1{font-size:17px;line-height:1.35;margin:2px 0 6px}
.welcome>p{font-size:11px;color:#88889a;line-height:1.5;margin:0 0 17px}
.welcome label{display:block;font-size:10px;color:#77778a;margin:12px 0}
.welcome input,.welcome textarea{display:block;margin-top:6px;width:100%;border:1px solid #e8e7ee;border-radius:8px;padding:10px;background:#fff;color:#343443;font:12px Arial,sans-serif;outline-color:#a79ce9}
.welcome textarea{height:78px;resize:vertical}
.welcome form>button{width:100%;min-height:40px;padding:10px 12px;border:0;border-radius:8px;background:#7564df;color:#fff;font-weight:600;font-size:11px;cursor:pointer}
.welcome form>button:disabled{opacity:.55;cursor:not-allowed}
.welcome form>button span{float:right}
.attach-controls{display:flex;align-items:center;gap:8px;min-height:32px;margin:4px 0 9px}
.attach-file{border:0;background:transparent;color:#7160d8;font:600 10px 'DM Sans';cursor:pointer;padding:6px 3px}
.attachment-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#898898;font-size:9px}
.reply-attachment{padding:0 14px 6px}
.upload-preview{display:flex;align-items:center;gap:9px;min-height:40px;padding:6px 12px;border-top:1px solid #f1f0f5;background:#fff;color:#656576;font-size:9px}
.upload-preview img{width:36px;height:30px;object-fit:cover;border-radius:5px}
.upload-preview span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upload-preview button{width:23px;height:23px;border:0;border-radius:6px;background:#f2f1f6;color:#696878;font-size:15px;cursor:pointer}
.conversation{min-height:0;flex:1;display:flex;flex-direction:column}
.messages{min-height:0;flex:1;overflow:auto;overflow-anchor:none;padding:14px;display:flex;flex-direction:column;gap:10px}
.chat-error{align-self:center;margin:auto 0;color:#a33c3c;font-size:12px;line-height:1.5;text-align:center}
.bubble{max-width:85%;align-self:flex-start;padding:9px 11px;background:#f2f2f6;color:#515164;border-radius:4px 12px 12px 12px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.bubble.mine{align-self:flex-end;background:#7564df;color:#fff;border-radius:12px 4px 12px 12px}
.bubble small{display:block;margin-top:4px;font-size:10px;opacity:.7}
.translation-warning{display:block;margin-top:4px;color:#a33c3c;font-size:9px}
.message-attachment{display:flex;flex-direction:column;gap:5px;margin-top:7px;color:inherit;font-size:9px;text-decoration:none;overflow-wrap:anywhere}
.message-attachment span{padding:5px 7px;border-radius:6px;background:#ffffff35}
.bubble:not(.mine) .message-attachment span{background:#fff}
.message-image{display:block;max-width:220px;max-height:160px;object-fit:contain;border-radius:7px;background:#fff}
.typing{padding:0 15px 9px;color:#999;font-size:9px}
.reply{flex:none;margin:8px 12px 12px;border:1px solid #e7e6ee;border-radius:10px;padding:5px;display:flex;gap:5px;background:#fff}
.reply input{min-width:0;flex:1;border:0;outline:0;padding:7px;font-size:16px}
.reply button{width:30px;height:30px;flex:none;border:0;border-radius:7px;background:#7564df;color:#fff;font-size:17px;cursor:pointer}
.reply .attach-file{width:30px;height:30px;background:transparent;color:#7160d8;font-size:18px}
.rating{flex:none;padding:8px 14px;color:#777;font-size:10px;display:flex;justify-content:space-between;align-items:center}
.rating button{border:0;background:transparent;color:#e1a745;font-size:17px;cursor:pointer}
.widget>footer{flex:none;min-height:35px;display:flex;align-items:center;gap:7px;padding:8px 15px;border-top:1px solid #f0eff4;background:#fff;color:#90909e;font-size:9px}
.hidden{display:none!important}
@media(max-width:500px){.widget{border:0;border-radius:0;height:100dvh}.widget>header{border-radius:0}.welcome{padding:18px}}
