:root{--tc-brand-color: #0077b6;--tc-accent-color: rgb(40, 137, 198);--tc-error-color: #e63946;--tc-success-color: #2ecc71;--tc-warning-color: #f39c12;--tc-text-primary: #222;--tc-text-secondary: #555;--tc-text-muted: #888;--tc-border-color: #e0e0e0;--tc-bg-light: #f8f9fa;--tc-font-family: "Segoe UI", Arial, sans-serif}#tc-chat-launcher{position:fixed;bottom:24px;right:24px;width:60px;height:60px;border-radius:50%;background:linear-gradient(135deg,var(--tc-brand-color),var(--tc-accent-color));box-shadow:0 4px 20px #00000040;cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;z-index:2147483647;transition:transform .2s,box-shadow .2s;font-family:var(--tc-font-family)}#tc-chat-launcher:hover{transform:scale(1.08);box-shadow:0 6px 28px #00000052}#tc-chat-launcher svg{width:28px;height:28px;fill:#fff}#tc-unread-badge{position:absolute;top:-2px;right:-2px;background:var(--tc-error-color);color:#fff;font-size:11px;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:none;align-items:center;justify-content:center;padding:0 4px;font-family:var(--tc-font-family)}#tc-chat-window{position:fixed;bottom:24px;right:24px;width:360px;max-height:min(600px,calc(100vh - 48px));max-height:min(600px,calc(100dvh - 48px));background:#fff;border-radius:16px;box-shadow:0 12px 48px #0000002e;display:none;flex-direction:column;overflow:hidden;z-index:2147483646;animation:tc-slide-up .25s ease;font-family:var(--tc-font-family);box-sizing:border-box}#tc-chat-window.open{display:flex}@keyframes tc-slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}#tc-header{background:linear-gradient(135deg,var(--tc-brand-color),var(--tc-accent-color));padding:14px 16px;display:flex;align-items:center;gap:10px;flex-shrink:0}#tc-header-avatar{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;flex-shrink:0}#tc-header-avatar svg{width:22px;height:22px;fill:#fff}#tc-header-info{flex:1}#tc-header-title{color:#fff;font-size:15px;font-weight:700;line-height:1.2}#tc-header-subtitle{color:#ffffffd1;font-size:12px;margin-top:1px}#tc-close-btn{background:none;border:none;cursor:pointer;color:#ffffffd9;font-size:20px;line-height:1;padding:2px 6px;border-radius:6px;transition:background .15s}#tc-close-btn:hover{background:rgba(255,255,255,.15);color:#fff}#tc-prechat{padding:20px 18px;overflow-y:auto;flex:1}#tc-prechat p{font-size:13px;color:var(--tc-text-secondary);margin-bottom:16px;line-height:1.5}.tc-field{margin-bottom:13px}.tc-field label{display:block;font-size:12px;font-weight:600;color:#444;margin-bottom:5px}.tc-field input,.tc-field textarea{width:100%;padding:9px 12px;border:1.5px solid var(--tc-border-color);border-radius:8px;font-size:13px;color:var(--tc-text-primary);outline:none;transition:border-color .2s;font-family:inherit;background:#fff;box-sizing:border-box}.tc-field input:focus,.tc-field textarea:focus{border-color:var(--tc-accent-color)}.tc-field textarea{resize:none;height:72px}.tc-required{color:var(--tc-error-color)}#tc-start-btn{width:100%;padding:11px;background:linear-gradient(135deg,var(--tc-brand-color),var(--tc-accent-color));color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;margin-top:4px;transition:opacity .2s;letter-spacing:.3px;font-family:inherit}#tc-start-btn:hover{opacity:.88}#tc-start-btn:disabled{opacity:.55;cursor:not-allowed}#tc-error{background:#ffe4e4;color:#c0392b;font-size:12px;padding:8px 12px;border-radius:6px;margin-top:8px;display:none}#tc-chatview{display:none;flex-direction:column;flex:1;overflow:hidden}#tc-status-bar{padding:6px 16px;background:var(--tc-bg-light);font-size:11px;color:var(--tc-text-muted);border-bottom:1px solid #f0f0f0;flex-shrink:0}#tc-status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#aaa;margin-right:5px;vertical-align:middle}#tc-status-dot.connected{background:var(--tc-success-color)}#tc-status-dot.waiting{background:var(--tc-warning-color)}#tc-status-dot.closed{background:var(--tc-error-color)}#tc-reconnect-banner{display:none;background:#d4edda;color:#155724;font-size:12px;text-align:center;padding:10px 12px;border-bottom:1px solid #c3e6cb}#tc-reconnect-banner button{background:#28a745;color:#fff;border:none;padding:5px 12px;border-radius:4px;cursor:pointer;font-size:11px;margin-left:8px;font-family:inherit}#tc-messages{flex:1;overflow-y:auto;padding:14px 14px 8px;display:flex;flex-direction:column;gap:8px;scroll-behavior:smooth}.tc-msg{max-width:82%;padding:9px 13px;border-radius:14px;font-size:13.5px;line-height:1.45;word-break:break-word}.tc-msg-time{font-size:10px;color:#aaa;margin-top:2px}.tc-msg-wrap{display:flex;flex-direction:column}.tc-msg-wrap.visitor{align-items:flex-end}.tc-msg-wrap.visitor .tc-msg-time{text-align:right}.tc-msg-wrap.agent{align-items:flex-start}.tc-msg.visitor-msg{background:linear-gradient(135deg,var(--tc-brand-color),var(--tc-accent-color));color:#fff;border-bottom-right-radius:4px}.tc-msg.agent-msg{background:#f0f4f8;color:var(--tc-text-primary);border-bottom-left-radius:4px}.tc-msg-wrap.system{align-items:center}.tc-msg.system-msg{background:var(--tc-bg-light);color:#6c757d;font-size:11px;padding:6px 12px;border-radius:12px;border:1px dashed #dee2e6}#tc-typing{display:none;align-items:center;gap:4px;padding:0 14px 8px}#tc-typing span{font-size:11px;color:#999}.tc-dot{width:6px;height:6px;border-radius:50%;background:#bbb;animation:tc-bounce 1.2s infinite}.tc-dot:nth-child(2){animation-delay:.2s}.tc-dot:nth-child(3){animation-delay:.4s}@keyframes tc-bounce{0%,80%,to{transform:translateY(0)}40%{transform:translateY(-5px)}}#tc-closed-banner{display:none;background:#fff3cd;color:#856404;font-size:12px;text-align:center;padding:8px 12px;border-top:1px solid #ffe69c}#tc-closed-banner a{color:#856404;font-weight:600;margin-left:6px}#tc-composer{border-top:1px solid #f0f0f0!important;padding:8px 10px!important;display:flex!important;gap:4px!important;align-items:flex-end!important;flex-shrink:0!important;box-sizing:border-box!important;background:#fff!important}#tc-input{flex:1!important;border:1.5px solid var(--tc-border-color)!important;border-radius:10px!important;padding:9px 12px!important;font-size:13px!important;resize:none!important;outline:none!important;max-height:80px!important;min-height:36px!important;height:36px;line-height:1.4!important;transition:border-color .2s!important;font-family:inherit!important;box-sizing:border-box!important;width:auto!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;background:#fff!important;color:#333!important;margin:0!important;display:block!important;float:none!important;position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;opacity:1!important;visibility:visible!important;overflow-x:hidden!important;overflow-y:hidden;scrollbar-width:thin!important;text-align:left!important;vertical-align:baseline!important;letter-spacing:normal!important;word-spacing:normal!important;text-transform:none!important;text-indent:0!important;text-shadow:none!important;box-shadow:none!important;border-top:1.5px solid var(--tc-border-color)!important;border-bottom:1.5px solid var(--tc-border-color)!important;border-left:1.5px solid var(--tc-border-color)!important;border-right:1.5px solid var(--tc-border-color)!important}#tc-input:focus{border-color:var(--tc-accent-color)!important;border-top-color:var(--tc-accent-color)!important;border-bottom-color:var(--tc-accent-color)!important;border-left-color:var(--tc-accent-color)!important;border-right-color:var(--tc-accent-color)!important}#tc-input::-webkit-scrollbar{width:6px!important}#tc-input::-webkit-scrollbar-track{background:#f1f1f1!important;border-radius:3px!important}#tc-input::-webkit-scrollbar-thumb{background:#ccc!important;border-radius:3px!important}#tc-input::-webkit-scrollbar-thumb:hover{background:#aaa!important}#tc-send-btn{width:34px!important;height:34px!important;min-width:34px!important;border-radius:8px!important;background:linear-gradient(135deg,var(--tc-brand-color),var(--tc-accent-color))!important;border:none!important;cursor:pointer!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-shrink:0!important;transition:opacity .2s!important;padding:0!important;margin:0!important}#tc-send-btn:hover{opacity:.85}#tc-send-btn:disabled{opacity:.4;cursor:not-allowed}#tc-send-btn svg{width:15px!important;height:15px!important;fill:#fff!important}#tc-session-expired{display:none;padding:20px 18px;text-align:center;flex:1}#tc-session-expired p{font-size:13px;color:var(--tc-text-secondary);margin-bottom:16px}#tc-session-expired button{padding:10px 20px;background:linear-gradient(135deg,var(--tc-brand-color),var(--tc-accent-color));color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:13px;font-weight:600;font-family:inherit}#tc-footer{padding:6px 14px;background:#fafafa;border-top:1px solid #f0f0f0;text-align:center;font-size:10px;color:#bbb;flex-shrink:0}#tc-footer a{color:var(--tc-accent-color);text-decoration:none}#tc-header-actions{display:flex;gap:4px;align-items:center}.tc-header-btn{background:none;border:none;cursor:pointer;color:#ffffffd9;font-size:16px;line-height:1;padding:6px;border-radius:6px;transition:background .15s}.tc-header-btn:hover{background:rgba(255,255,255,.15);color:#fff}.tc-header-btn.muted{opacity:.5}#tc-close-btn{font-size:18px}.tc-composer-btn{width:28px!important;height:28px!important;min-width:28px!important;border:none!important;background:transparent!important;cursor:pointer!important;font-size:16px!important;border-radius:6px!important;transition:background .15s!important;flex-shrink:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;margin:0!important}.tc-composer-btn:hover{background:var(--tc-bg-light)}.tc-composer-btn:disabled{opacity:.4;cursor:not-allowed}#tc-emoji-picker{position:fixed;width:280px;max-height:320px;background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000002e;z-index:2147483647;overflow:hidden;font-family:var(--tc-font-family)}.tc-emoji-tabs{display:flex;border-bottom:1px solid #f0f0f0;padding:4px;gap:2px;background:var(--tc-bg-light)}.tc-emoji-tab{flex:1;padding:6px;border:none;background:transparent;cursor:pointer;font-size:16px;border-radius:6px;transition:background .15s}.tc-emoji-tab:hover{background:rgba(0,0,0,.05)}.tc-emoji-tab.active{background:#fff;box-shadow:0 1px 3px #0000001a}.tc-emoji-content{max-height:250px;overflow-y:auto}.tc-emoji-grid{display:none;flex-wrap:wrap;padding:8px;gap:2px}.tc-emoji-grid.active{display:flex}.tc-emoji-btn{width:32px;height:32px;border:none;background:transparent;cursor:pointer;font-size:20px;border-radius:6px;transition:background .15s,transform .1s}.tc-emoji-btn:hover{background:var(--tc-bg-light);transform:scale(1.15)}#tc-attachment-preview{display:none;flex-direction:column;gap:6px;padding:10px 12px;border-top:1px solid #f0f0f0;background:#fff;min-height:100px;overflow-y:auto}.tc-attachment-item{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--tc-bg-light);border-radius:6px;border:1px solid var(--tc-border-color)}.tc-attachment-item.uploading{opacity:.7}.tc-attachment-item.error{border-color:var(--tc-error-color);background:#fff5f5}.tc-attachment-icon{font-size:18px;flex-shrink:0;color:var(--tc-text-muted)}.tc-attachment-info{flex:1;min-width:0;overflow:hidden}.tc-attachment-name{display:block;font-size:13px;color:var(--tc-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tc-attachment-size{display:none}.tc-attachment-remove{width:20px;height:20px;border:none;background:transparent;color:var(--tc-text-muted);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px;transition:color .15s,background .15s}.tc-attachment-remove:hover{color:var(--tc-error-color);background:rgba(231,76,60,.1)}.tc-attachment-progress{position:absolute;bottom:0;left:0;height:2px;background:var(--tc-brand-color);transition:width .2s}.tc-attachment-img{display:none}.tc-msg-attachments{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.tc-msg-attachment-img{display:block;max-width:200px;border-radius:8px;overflow:hidden}.tc-msg-attachment-img img{display:block;max-width:100%;height:auto;border-radius:8px}.tc-msg-attachment-file{display:flex;align-items:center;gap:6px;padding:8px 10px;background:rgba(255,255,255,.2);border-radius:6px;text-decoration:none;color:inherit;font-size:12px;transition:background .15s}.tc-msg.agent-msg .tc-msg-attachment-file{background:rgba(0,0,0,.05)}.tc-msg-attachment-file:hover{background:rgba(255,255,255,.3)}.tc-msg.agent-msg .tc-msg-attachment-file:hover{background:rgba(0,0,0,.08)}.tc-file-icon{font-size:16px}.tc-file-name{flex:1;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tc-file-size{font-size:10px;opacity:.7}@media (max-width: 420px){#tc-chat-window{width:calc(100vw - 24px);right:12px;bottom:12px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}#tc-emoji-picker{width:calc(100vw - 48px);right:24px!important}}#tc-chat-window *{box-sizing:border-box}@media (max-height: 500px){#tc-chat-window{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);bottom:12px}#tc-chat-launcher{bottom:12px;width:50px;height:50px}}
