/* Biotech Genetix private customer chat */
.bgt-chat-launcher{position:fixed;right:22px;bottom:96px;z-index:9998;border:0;border-radius:999px;background:#087c37;color:#fff;padding:13px 18px;box-shadow:0 8px 26px rgba(0,0,0,.2);font-weight:700;cursor:pointer;display:flex;align-items:center;gap:9px}
.bgt-chat-launcher:hover{background:#075f2d;transform:translateY(-1px)}
.bgt-chat-launcher .dot{width:9px;height:9px;border-radius:50%;background:#baf3c7;display:inline-block}
.bgt-chat-panel{position:fixed;right:22px;bottom:158px;z-index:9999;width:370px;max-width:calc(100vw - 24px);height:min(590px,calc(100vh - 190px));background:#fff;border:1px solid #dce8df;border-radius:18px;box-shadow:0 18px 55px rgba(8,42,23,.24);display:none;overflow:hidden;color:#173224}
.bgt-chat-panel.open{display:flex;flex-direction:column}
.bgt-chat-panel-head{background:linear-gradient(110deg,#075526,#0b7c3b);color:#fff;padding:15px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.bgt-chat-panel-head strong{display:block;font-size:15px}.bgt-chat-panel-head small{display:block;color:#d4f4df;font-size:11px;margin-top:3px}
.bgt-chat-panel-head button{background:transparent;border:0;color:#fff;font-size:25px;cursor:pointer;line-height:1}
.bgt-chat-panel-body{padding:14px;overflow:auto;flex:1;background:#f7faf7}
.bgt-chat-intro{font-size:13px;line-height:1.5;color:#53675b;margin:0 0 12px}
.bgt-chat-start-form{display:grid;gap:9px}.bgt-chat-start-form label{display:grid;gap:4px;font-size:12px;font-weight:700;color:#294434}.bgt-chat-start-form input,.bgt-chat-start-form textarea,.bgt-chat-compose input,.bgt-chat-product-search{width:100%;border:1px solid #d5e1d8;border-radius:9px;padding:10px;font:inherit;font-size:13px;background:#fff;color:#172d20}.bgt-chat-start-form textarea{resize:vertical;min-height:70px}.bgt-chat-consent{display:flex!important;align-items:flex-start;gap:8px!important;font-weight:400!important;line-height:1.4}.bgt-chat-consent input{width:auto;margin-top:2px}.bgt-chat-start-form button,.bgt-chat-compose button{border:0;border-radius:9px;background:#087c37;color:#fff;font-weight:700;padding:11px 13px;cursor:pointer}.bgt-chat-start-form button:disabled,.bgt-chat-compose button:disabled{opacity:.5;cursor:not-allowed}
.bgt-chat-alert{font-size:12px;color:#a12828;background:#fff1f1;padding:9px;border-radius:8px;margin:0 0 10px;display:none}.bgt-chat-alert.show{display:block}
.bgt-chat-messages{display:flex;flex-direction:column;gap:10px;min-height:100%;}
.bgt-chat-message{max-width:88%;padding:9px 11px;border-radius:13px;background:#fff;border:1px solid #e0e9e2;box-shadow:0 1px 2px rgba(0,0,0,.03);font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.bgt-chat-message.customer{align-self:flex-end;background:#e8f6eb;border-color:#cde8d3}.bgt-chat-message.admin{align-self:flex-start}.bgt-chat-message p{margin:0;white-space:pre-wrap}.bgt-chat-message time{display:block;font-size:10px;color:#6e8075;margin-top:5px}.bgt-chat-system-note{font-size:11px;text-align:center;color:#78877d;padding:5px}
.bgt-chat-product-card{display:flex;gap:9px;text-decoration:none;color:inherit;background:#fff;border:1px solid #dce8df;border-radius:10px;padding:8px;margin-top:6px}.bgt-chat-product-card img{width:58px;height:58px;object-fit:contain;background:#f3f8f4;border-radius:7px}.bgt-chat-product-card b{display:block;font-size:12px}.bgt-chat-product-card small,.bgt-chat-product-card em{display:block;font-size:11px;color:#5d7063;font-style:normal;margin-top:3px}
.bgt-chat-document{display:block;color:#075c2c;background:#f0f8f1;border:1px solid #cfe7d4;border-radius:9px;padding:10px;text-decoration:none;font-weight:700}.bgt-chat-document small{display:block;font-weight:400;color:#687b6d;font-size:10px;margin-top:3px}
.bgt-chat-compose{padding:10px;border-top:1px solid #e2ebe4;background:#fff;display:grid;grid-template-columns:1fr auto;gap:8px}.bgt-chat-compose input{min-width:0}.bgt-chat-compose-extra{grid-column:1/-1;display:flex;gap:8px;align-items:center;justify-content:space-between}.bgt-chat-link-button{border:0;background:transparent;color:#087337;font-weight:700;font-size:12px;cursor:pointer;padding:5px}
.bgt-chat-product-picker{padding:10px;border-top:1px solid #e2ebe4;background:#f9fcf9;max-height:185px;overflow:auto}.bgt-chat-product-picker[hidden]{display:none}.bgt-chat-product-picker-list{display:grid;gap:7px;margin-top:8px}.bgt-chat-picker-item{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e3ebe5;border-radius:8px;padding:7px}.bgt-chat-picker-item img{width:42px;height:42px;object-fit:contain}.bgt-chat-picker-item span{flex:1;min-width:0;font-size:11px}.bgt-chat-picker-item b{display:block}.bgt-chat-picker-item button{border:0;border-radius:7px;background:#087c37;color:#fff;padding:7px 9px;font-size:11px;cursor:pointer}
.bgt-chat-product-trigger{margin-top:8px}
/* Admin chat workspace */
.bgt-admin-chat{margin:10px 0 24px}.bgt-chat-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.bgt-chat-page-heading h1{margin:0 0 5px}.bgt-admin-chat-layout{display:grid;grid-template-columns:minmax(260px,330px) minmax(0,1fr);gap:14px;min-height:640px}.bgt-chat-inbox,.bgt-chat-workspace{background:#fff;border:1px solid #dce7df;border-radius:12px;overflow:hidden;min-width:0}.bgt-chat-inbox{display:flex;flex-direction:column}.bgt-chat-inbox-head{padding:13px;border-bottom:1px solid #e6eee8;display:grid;gap:9px}.bgt-chat-inbox-head input,.bgt-product-share-panel input{width:100%;border:1px solid #d8e3db;border-radius:8px;padding:10px;font:inherit}.bgt-conversation-list{overflow:auto;max-height:640px}.bgt-conversation-row{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #eef2ef;background:#fff;padding:12px;cursor:pointer;color:#20382a}.bgt-conversation-row:hover,.bgt-conversation-row.active{background:#edf8ef}.bgt-conversation-row-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.bgt-conversation-row>span:nth-child(2),.bgt-conversation-row small{display:block;margin-top:5px;font-size:11px;color:#63746a}.bgt-conversation-row small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bgt-status{font-size:10px;border-radius:20px;padding:4px 7px;background:#eef2ef;color:#586a5f;font-style:normal;text-transform:capitalize;white-space:nowrap}.bgt-status.waiting_admin{background:#fff3d9;color:#8a5a00}.bgt-status.waiting_customer{background:#e5f2ff;color:#14558a}.bgt-status.closed{background:#eee;color:#777}
.bgt-chat-workspace{display:flex;flex-direction:column;min-height:640px}.bgt-chat-thread-head{min-height:62px;padding:12px 15px;border-bottom:1px solid #e6eee8;display:flex;align-items:center;justify-content:space-between;gap:10px}.bgt-chat-thread-head b{display:block}.bgt-chat-thread-head small{display:block;font-size:11px;color:#64766a;margin-top:4px}.bgt-thread-actions{display:flex;align-items:center;gap:8px}.bgt-admin-messages{flex:1;min-height:400px;max-height:540px;overflow:auto;padding:14px;background:#f7faf7}.bgt-message{max-width:80%;border:1px solid #e0e9e2;border-radius:12px;padding:9px 11px;background:#fff;margin:0 0 10px;overflow-wrap:anywhere}.bgt-message.mine{margin-left:auto;background:#e9f7ec;border-color:#cde8d3}.bgt-message.theirs{margin-right:auto}.bgt-message p{margin:0;font-size:13px;line-height:1.5;white-space:pre-wrap}.bgt-message time{display:block;color:#718176;font-size:10px;margin-top:5px}.bgt-message-label{font-size:10px;color:#55715d;font-weight:700;margin-bottom:5px}.bgt-chat-admin-notice{display:none;margin-top:10px;border-radius:8px;padding:10px;background:#e8f6eb;color:#155d2c;font-size:12px}.bgt-chat-admin-notice.show{display:block}.bgt-chat-admin-notice.error{background:#fff1f1;color:#9b1c1c}.bgt-chat-empty{padding:20px;text-align:center;color:#819087;font-size:12px}.bgt-admin-chat-tools{padding:12px;border-top:1px solid #e4ece6;background:#fff}.bgt-admin-chat-tools[hidden]{display:none}.bgt-product-share-panel{margin:10px 0;padding:11px;border:1px solid #dce8df;border-radius:10px;background:#f8fbf8}.bgt-product-results{max-height:240px;overflow:auto;display:grid;gap:8px;margin-top:9px}.bgt-share-result{display:grid;grid-template-columns:48px minmax(120px,1fr) auto;align-items:center;gap:9px;background:#fff;border:1px solid #e5ece7;border-radius:9px;padding:8px}.bgt-share-result>img{width:46px;height:46px;object-fit:contain;background:#f5f8f5;border-radius:6px}.bgt-share-result b,.bgt-share-result small{display:block}.bgt-share-result b{font-size:12px}.bgt-share-result small{font-size:10px;color:#6d7b71;margin-top:3px}.bgt-share-result .bgt-terms{max-width:300px;max-height:32px;overflow:hidden}.bgt-share-result-actions{display:grid;gap:5px}.bgt-chat-document{display:block;color:#075c2c;background:#f0f8f1;border:1px solid #cfe7d4;border-radius:9px;padding:10px;text-decoration:none;font-weight:700;font-size:12px}.bgt-chat-document small{display:block;font-weight:400;color:#687b6d;font-size:10px;margin-top:3px}.bgt-admin-reply-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin-top:10px}.bgt-admin-reply-form textarea{width:100%;resize:vertical;border:1px solid #d7e3da;border-radius:8px;padding:10px;font:inherit;font-size:13px;min-height:48px}.bgt-admin-reply-form button{align-self:stretch;white-space:nowrap}
@media(max-width:850px){.bgt-admin-chat-layout{grid-template-columns:1fr}.bgt-chat-inbox{max-height:300px}.bgt-conversation-list{max-height:220px}.bgt-chat-workspace{min-height:560px}.bgt-admin-messages{max-height:none}.bgt-share-result{grid-template-columns:42px 1fr}.bgt-share-result-actions{grid-column:1/-1;display:flex;flex-wrap:wrap}.bgt-chat-page-heading{align-items:center}}
@media(max-width:520px){.bgt-chat-launcher{right:12px;bottom:88px;padding:11px 14px}.bgt-chat-panel{right:8px;bottom:145px;width:calc(100vw - 16px);height:calc(100vh - 165px);max-height:620px}.bgt-admin-reply-form{grid-template-columns:1fr}.bgt-admin-reply-form button{min-height:42px}.bgt-thread-actions{flex-direction:column;align-items:flex-end}}
[hidden]{display:none!important}
/* Admin inbox enhancements: unread counters, read receipts and customer typing state */
.bgt-admin-agent-line{display:flex;align-items:center;gap:7px;margin-top:7px;color:#678071;font-size:11px}.bgt-admin-agent-line i,.bgt-admin-customer-typing i{width:8px;height:8px;border-radius:50%;background:#20b568;display:inline-block;box-shadow:0 0 0 3px #e5f6eb}.bgt-admin-agent-line a{color:#087b36;font-weight:700;text-decoration:none;margin-left:5px}
.bgt-conversation-row-top{display:flex;align-items:center;gap:7px}.bgt-admin-unread{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:20px;background:#087b36;color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px}.bgt-conversation-row small{display:block}.bgt-admin-customer-typing{padding:6px 14px;background:#f1f8f3;color:#0a8540;font-size:11px}.bgt-admin-customer-typing[hidden]{display:none}.bgt-admin-customer-typing i{margin-right:7px;animation:bgtAdminPulse 1s infinite}.bgt-admin-conversation-product{color:#087b36!important;font-weight:700}.bgt-admin-message-ticks{margin-left:6px;color:#849289;letter-spacing:-3px;font-weight:700}.bgt-admin-message-ticks.seen{color:#1689e8}.bgt-admin-system-message{padding:8px 12px;border:1px dashed #d7e3da;border-radius:10px;background:#f2f6f3;color:#5c7163;text-align:center}.bgt-message time{display:flex;justify-content:flex-end;align-items:center;gap:4px}.bgt-message p{word-break:break-word}
@keyframes bgtAdminPulse{50%{opacity:.35;transform:scale(.82)}}

/* Secure customer attachment previews inside the admin inbox */
.bgt-chat-document-image{display:flex;align-items:center;gap:10px;max-width:360px;padding:8px;border:1px solid #d6e6da;border-radius:10px;background:#fff;color:#176239;text-decoration:none}
.bgt-chat-document-image img{width:78px;height:68px;object-fit:contain;border-radius:7px;background:#f5f8f6}
.bgt-chat-document-image span{display:flex;min-width:0;flex-direction:column;gap:4px}
.bgt-chat-document-image b{font-size:12px;overflow-wrap:anywhere}
.bgt-chat-document-image small{font-size:10px;color:#718278}
.bgt-admin-attachment-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.bgt-admin-attachment-preview{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 10px;border:1px solid #d7e8dc;border-radius:9px;background:#f4faf5;color:#28533a;font-size:11px}
.bgt-admin-attachment-preview[hidden]{display:none!important}
.bgt-admin-attachment-preview span{max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bgt-admin-attachment-preview button{border:0;border-radius:50%;width:23px;height:23px;background:#e6f0e8;color:#526d5a;font-size:17px;cursor:pointer}
