#ai-chat-widget{position:fixed;bottom:20px;right:20px;z-index:9999;font-family:'Microsoft JhengHei',Arial,sans-serif;color:#18344c;text-align:left;line-height:1.6}#ai-chat-widget *{box-sizing:border-box}#ai-chat-widget [hidden]{display:none!important}#chat-toggle-btn{border:0;background:#075aa3;color:#fff;padding:13px 22px;border-radius:32px;box-shadow:0 6px 24px #163c5e40;display:flex;align-items:center;gap:10px;font-size:15px;font-weight:600;cursor:pointer}#chat-box{position:relative;width:410px;height:min(720px,calc(100vh - 40px));height:min(720px,calc(100dvh - 40px));display:flex;flex-direction:column;background:#fff;border:1px solid #d8e3ed;border-radius:18px;box-shadow:0 12px 46px #17395638;overflow:hidden}.ca-header{padding:15px 18px;background:#075aa3;color:white;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.ca-header strong{font-size:17px}.ca-header small{display:block;font-size:11px;color:#dbeaff;letter-spacing:.5px}.ca-header button{background:transparent;border:0;color:white;font-size:28px;padding:2px 8px;cursor:pointer}.ca-notice{background:#edf5fc;padding:8px 15px;font-size:11px;color:#3d617e}.ca-context{font-size:12px;padding:8px 15px;color:#38576e;border-bottom:1px solid #edf1f5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ca-shortcuts{display:flex;gap:6px;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid #e4edf4}.ca-shortcuts button,.ca-shortcuts a{border:1px solid #d6e4ef;background:#fff;border-radius:16px;padding:5px 10px;color:#1b5a89;font-size:12px;line-height:1.4;cursor:pointer;text-decoration:none}.ca-shortcuts button:hover,.ca-shortcuts a:hover{background:#edf5fc}#chat-messages{flex:1;min-height:0;overflow:auto;padding:16px 12px;background:#f5f8fb;overscroll-behavior:contain}.ca-message{margin:0 0 15px;font-size:14px}.ca-message.ca-user{display:flex;justify-content:flex-end}.ca-bubble{background:white;border:1px solid #e0e8ee;border-radius:14px 14px 14px 3px;padding:12px 14px;max-width:100%;overflow-wrap:anywhere;box-shadow:0 2px 4px #17395606}.ca-user .ca-bubble{max-width:88%;background:#075aa3;color:#fff;border:0;border-radius:14px 14px 3px 14px;white-space:pre-wrap}.ca-bubble p:last-child{margin-bottom:0}.ca-bubble p{margin:0 0 9px}.ca-bubble ul,.ca-bubble ol{padding-left:20px}.ca-bubble h1,.ca-bubble h2,.ca-bubble h3,.ca-bubble h4{font-size:15px;line-height:1.6;margin:10px 0}.ca-bubble table{display:block;overflow:auto;max-width:100%;font-size:12px}.ca-bubble th,.ca-bubble td{padding:6px;border:1px solid #dce5ed}.ca-bubble pre{white-space:pre-wrap;font-size:12px}.ca-bubble a{color:#0768ac;text-decoration:underline}.ca-stamp{font-size:10px;color:#70889b;margin-top:8px}.ca-loading{color:#657e93;font-size:13px;padding:8px}.ca-card{background:#fff;border:1px solid #d7e4ee;border-radius:10px;margin-top:10px;padding:12px}.ca-card strong{font-size:13px;line-height:1.5;display:block}.ca-card .ca-model{color:#567389;font-size:11px;margin:4px 0}.ca-status{display:inline-block;font-size:11px;padding:2px 7px;border-radius:5px;background:#edf2f6;color:#436079;margin:4px 0}.ca-status.in_stock{background:#eaf6ef;color:#276741}.ca-status.out_of_stock,.ca-status.insufficient,.ca-status.unknown{background:#fff1eb;color:#a54c2a}.ca-facts{font-size:12px;margin:4px 0;color:#3b576e}.ca-card-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-top:8px}.ca-card-actions input{width:70px;padding:5px;border:1px solid #cbd9e4;border-radius:5px;font-size:13px}.ca-card-actions button{padding:7px 10px;border:0;border-radius:6px;background:#075aa3;color:#fff;font-size:12px;cursor:pointer}.ca-card-actions a{font-size:12px}.ca-image-heading{font-size:12px;color:#536c82;margin-top:14px}.ca-feedback-button{border:0;background:transparent;padding:3px 0;color:#6d8294;text-decoration:underline;font-size:11px;cursor:pointer}.ca-feedback-form{background:#edf3f8;padding:10px;margin-top:8px;border-radius:8px}.ca-feedback-form select,.ca-feedback-form textarea{display:block;width:100%;font-size:13px;margin:6px 0;border:1px solid #c7d7e4;border-radius:5px;padding:7px}.ca-feedback-form button{background:#075aa3;color:white;border:0;border-radius:5px;padding:6px 12px;font-size:12px}.ca-privacy{padding:6px 12px;color:#748899;background:white;font-size:10px;flex-shrink:0}.ca-compose{display:flex;align-items:center;gap:7px;padding:10px 12px;border-top:1px solid #e1e9ef;background:white;margin:0;flex-shrink:0}.ca-compose textarea{flex:1;resize:none;height:42px;max-height:90px;min-width:0;padding:9px 11px;border:1px solid #cbdbe8;border-radius:10px;font-size:14px;line-height:22px;outline:none;font-family:inherit}.ca-compose textarea:focus{border-color:#2887c2;box-shadow:0 0 0 2px #2887c21c}.ca-compose button{border:0;border-radius:8px;cursor:pointer;padding:9px 12px;font-size:13px;color:white;background:#075aa3}#upload-btn{background:#edf4fa;color:#285f8b;font-size:23px;padding:2px 10px}#ai-chat-widget button:disabled{opacity:.5;cursor:wait}#ai-chat-widget button:focus-visible,#ai-chat-widget a:focus-visible{outline:3px solid #70b9e6;outline-offset:2px}#drag-overlay{position:absolute;inset:72px 10px 12px;background:#f1f8fef2;border:2px dashed #2f86bc;border-radius:12px;display:grid;place-items:center;color:#075aa3;font-size:18px;pointer-events:none;z-index:3}.ca-upload-preview{max-width:100%;max-height:180px;border-radius:7px}.ca-history-note{font-size:11px;color:#74889a;text-align:center;margin:10px 0}@media(max-width:480px){#ai-chat-widget{right:12px;bottom:max(12px,env(safe-area-inset-bottom))}#chat-box{width:calc(100vw - 24px);height:calc(100dvh - 32px);max-height:780px}.ca-header{padding:12px 15px}.ca-compose textarea{font-size:16px}.ca-shortcuts{gap:5px;padding:8px 10px}.ca-shortcuts button,.ca-shortcuts a{padding:5px 9px}.ca-message{font-size:14px}.ca-bubble{padding:11px 12px}.ca-context{font-size:11px}.ca-privacy{font-size:9px}}
/* Leave room for browsers that reserve a scrollbar beside the mobile viewport. */
@media(max-width:480px){#ai-chat-widget{max-width:calc(100% - 24px)}#chat-box{max-width:100%}}
