.bm-assistant{position:fixed;right:24px;bottom:24px;z-index:9998;font:14px/1.45 Arial,sans-serif}.bm-assistant__launcher{border:0;border-radius:28px;background:#173f70;color:#fff;padding:15px 22px;font-weight:700;box-shadow:0 8px 28px #0003;cursor:pointer}.bm-assistant__panel{position:absolute;right:0;bottom:0;width:min(390px,calc(100vw - 28px));height:min(620px,calc(100vh - 110px));background:#fff;border-radius:18px;box-shadow:0 18px 55px #102b4a4d;overflow:hidden;display:flex;flex-direction:column}.bm-assistant__panel[hidden]{display:none}.bm-assistant header{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,#173f70,#087fa3);color:#fff;padding:16px 18px}.bm-assistant header small{display:block;opacity:.8}.bm-assistant__close{border:0;background:transparent;color:#fff;font-size:27px}.bm-assistant__messages{flex:1;overflow:auto;background:#f5f8fb;padding:14px}.bm-msg{max-width:84%;margin:0 0 12px;padding:10px 13px;border-radius:14px;white-space:pre-wrap}.bm-msg--bot{background:#fff;color:#24384c;border-bottom-left-radius:4px}.bm-msg--user{background:#173f70;color:#fff;margin-left:auto;border-bottom-right-radius:4px}.bm-assistant__chips{padding:4px 12px 8px;display:flex;gap:6px;overflow:auto}.bm-assistant__chips button{white-space:nowrap;border:1px solid #bfd5e6;border-radius:14px;background:#fff;color:#173f70;padding:6px 9px}.bm-assistant form{display:flex;border-top:1px solid #dce5ec;padding:10px}.bm-assistant form input{flex:1;border:1px solid #ccd9e3;border-radius:20px;padding:9px 13px}.bm-assistant form button,.bm-product__action{border:0;border-radius:17px;background:#f36f21;color:#fff;padding:8px 13px;margin-left:7px}.bm-products{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:13px}.bm-product{background:#fff;border:1px solid #dce5ec;border-radius:11px;padding:8px}.bm-product img{width:100%;height:105px;object-fit:contain}.bm-product__name{display:block;color:#173f70;font-weight:700;max-height:42px;overflow:hidden}.bm-product__price{font-size:16px;font-weight:700;margin:5px 0}.bm-product__offer{font-size:11px;color:#3d6b51}.bm-product__action{display:inline-block;margin:7px 0 0;text-decoration:none;font-size:12px}@media(max-width:480px){.bm-assistant{right:14px;bottom:14px}.bm-assistant__panel{position:fixed;inset:12px;width:auto;height:auto}.bm-products{grid-template-columns:1fr}}

/* Responsive storefront shell: phones, tablets, notches and soft keyboards. */
.bm-assistant,
.bm-assistant *,
.bm-assistant *::before,
.bm-assistant *::after{box-sizing:border-box}
.bm-assistant__panel{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px)}
.bm-assistant header{flex:0 0 auto;min-width:0}
.bm-assistant header>div{min-width:0;padding-right:10px}
.bm-assistant header strong,.bm-assistant header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bm-assistant__close{flex:0 0 42px;width:42px;height:42px;padding:0;line-height:42px;cursor:pointer;touch-action:manipulation}
.bm-assistant__conversation,.bm-assistant__messages{min-width:0;min-height:0}
.bm-assistant__messages{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;overflow-wrap:anywhere}
.bm-msg{overflow-wrap:anywhere;word-break:normal}
.bm-assistant__chips{flex:0 0 auto;max-width:100%;scrollbar-width:thin;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.bm-assistant__chips button{flex:0 0 auto;min-height:34px;touch-action:manipulation}
.bm-assistant form{flex:0 0 auto;align-items:center;background:#fff;padding-bottom:max(10px,env(safe-area-inset-bottom))}
.bm-assistant form input{width:0;min-width:0;min-height:42px;font-size:16px;line-height:1.25}
.bm-assistant form button{flex:0 0 auto;min-width:64px;min-height:42px;margin-left:8px;touch-action:manipulation}
.bm-product{min-width:0;overflow:hidden}
.bm-product__name,.bm-product__offer{overflow-wrap:anywhere}

/* Tablets and small laptops. */
@media (min-width:481px) and (max-width:900px){
 .bm-assistant{right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom))}
 .bm-assistant__panel{width:min(480px,calc(100vw - 36px));height:min(700px,calc(100dvh - 52px));max-height:calc(100dvh - 36px)}
 .bm-assistant header{padding:15px 17px}
 .bm-products{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phones: use a stable near-full-screen sheet and keep the composer visible. */
@media (max-width:480px){
 .bm-assistant{right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));left:auto}
 .bm-assistant__launcher{max-width:calc(100vw - 20px);min-height:48px;padding:12px 18px}
 .bm-assistant__panel{position:fixed;z-index:9999;inset:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));width:auto;max-width:none;height:auto;max-height:none;border-radius:14px}
 .bm-assistant header{min-height:64px;padding:10px 12px 10px 15px}
 .bm-assistant header strong{font-size:15px}
 .bm-assistant header small{font-size:12px}
 .bm-assistant__messages{padding:10px}
 .bm-msg{max-width:92%;margin-bottom:9px;padding:9px 11px}
 .bm-assistant__chips{padding:6px 9px 8px}
 .bm-products{grid-template-columns:1fr;gap:9px}
 .bm-product{display:grid;grid-template-columns:88px minmax(0,1fr);column-gap:10px;align-items:start;padding:9px}
 .bm-product__source{grid-column:1/-1}
 .bm-product img{grid-column:1;grid-row:span 5;align-self:center;width:88px;height:94px}
 .bm-product__name,.bm-product__price,.bm-product__offer,.bm-product__action{grid-column:2}
 .bm-product__name{max-height:none}
 .bm-product__price{margin:4px 0}
 .bm-product__action{justify-self:start;margin-top:5px}
 .bm-assistant form{padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
}

/* Short landscape phones: reserve more room for the conversation. */
@media (max-height:520px) and (orientation:landscape){
 .bm-assistant__panel{inset:4px;border-radius:10px}
 .bm-assistant header{min-height:50px;padding:6px 12px}
 .bm-assistant header small{display:none}
 .bm-assistant__close{height:38px;line-height:38px}
 .bm-assistant__messages{padding:8px}
 .bm-assistant__chips{padding-top:3px;padding-bottom:4px}
 .bm-assistant form{padding-top:6px}
}

@media (prefers-reduced-motion:reduce){.bm-assistant *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
