#bs-customer-chat{position:fixed;right:24px;bottom:24px;z-index:9999;font:14px/1.5 Arial,sans-serif;color:#29241f}#bs-customer-chat button{border:1px solid #ddd5cb;border-radius:20px;padding:8px 13px;background:#fff;color:#352c23;cursor:pointer;font:inherit}#bs-customer-chat>button{background:#362e26;color:#fff;padding:13px 20px;box-shadow:0 4px 20px #0002}#bs-customer-chat button:disabled{opacity:.5;cursor:default}#bs-customer-chat [hidden]{display:none!important}.bs-customer-panel{width:380px;max-width:calc(100vw - 32px);height:620px;max-height:calc(100dvh - 100px);display:flex;flex-direction:column;background:#fffdf9;border:1px solid #e6ded4;border-radius:20px;box-shadow:0 12px 50px #0003;margin-bottom:12px;overflow:hidden}.bs-customer-panel header{display:flex;justify-content:space-between;align-items:center;padding:15px 16px;background:#f2ece2}.bs-customer-panel header small{display:block;color:#776d61}.bs-chat-notice{font-size:11px;line-height:1.5;margin:8px 14px;color:#70665b}.bs-customer-messages{overflow-y:auto;flex:1;min-height:80px;padding:12px 14px}.bs-customer-message{padding:10px 12px;border-radius:13px;background:#f1ece5;margin:0 24px 12px 0;overflow-wrap:anywhere}.bs-customer-message.customer{background:#e7ede6;margin:0 0 12px 24px}.bs-customer-message p{white-space:pre-wrap;margin:4px 0}.bs-customer-message small{font-size:11px;color:#776d61}.bs-chat-status{font-size:12px;margin:0 14px;color:#6b5034}.bs-chat-actions{display:flex;gap:5px;flex-wrap:wrap;padding:8px 12px}.bs-chat-actions button{font-size:11px!important;padding:5px 9px!important}.bs-customer-panel>p:not([class]){font-size:12px;margin:8px 14px}.bs-customer-panel>button{margin:8px 14px}.bs-customer-panel form{display:flex;align-items:flex-end;gap:8px;border-top:1px solid #e6ded4;padding:12px}.bs-customer-panel label{flex:1;font-size:11px}.bs-customer-panel textarea{display:block;box-sizing:border-box;width:100%;resize:none;border:1px solid #d5c9bc;border-radius:10px;padding:8px;font:14px/1.4 Arial,sans-serif;background:#fff}.bs-chat-product{display:flex;gap:10px;background:#fff;border-radius:9px;padding:8px;margin:8px 0}.bs-chat-product img{width:50px;height:66px;object-fit:contain}.bs-chat-product div>*{display:block}.bs-chat-product a{color:#63482a;text-decoration:underline}.bs-chat-product-note{display:block}@media(max-width:480px){#bs-customer-chat{left:12px;right:12px;bottom:12px}.bs-customer-panel{width:100%;max-width:none;max-height:calc(100dvh - 92px)}}

/* Keep the customer composer readable without triggering mobile input zoom. */
.bs-customer-panel textarea{font-size:16px}
.bs-customer-panel [role=log]{overscroll-behavior:contain}
#bs-customer-chat button:focus-visible,.bs-customer-panel textarea:focus-visible{outline:3px solid #9c678d;outline-offset:2px}

.bs-customer-panel{box-sizing:border-box}
.bs-customer-messages{min-height:0;overscroll-behavior:contain}
.bs-customer-panel header,.bs-customer-panel form,.bs-chat-actions{flex-shrink:0}
.bs-customer-panel .bs-chat-notice,.bs-customer-panel .bs-chat-status{flex-shrink:0;max-height:64px;overflow-y:auto}

/* Leave the mobile purchase and checkout actions unobstructed. */
@media(max-width:850px){
 body:has(#productView:not([hidden]) .pdp-mobile-sticky) #bs-customer-chat,
 body:has(.mobile-checkout-action:not([hidden])) #bs-customer-chat{bottom:calc(100px + env(safe-area-inset-bottom))}
 body:has(#productView:not([hidden]) .pdp-mobile-sticky) .bs-customer-panel,
 body:has(.mobile-checkout-action:not([hidden])) .bs-customer-panel{max-height:calc(100dvh - 190px - env(safe-area-inset-bottom))}
}

/* Match the storefront's deep-plum palette and keep the reply composer prominent. */
#bs-customer-chat{color:#30232d}
#bs-customer-chat>button{background:#522340;border-color:#522340;font-weight:700;min-height:46px}
.bs-customer-panel{background:#fff;border-color:#e9dce5;box-shadow:0 12px 44px #39223729}
.bs-customer-panel header{background:#522340;color:#fff;gap:12px}
.bs-customer-panel header strong{font-size:17px}
.bs-customer-panel header small{color:#f1dce9;font-size:12px}
#bs-customer-chat .bs-customer-panel header button{background:#fff3;color:#fff;border-color:#ffffff80}
.bs-chat-notice{color:#62505e}
.bs-customer-message{background:#f7f2f6}
.bs-customer-message.customer{background:#eee0ea}
.bs-customer-message.operator{border-left:3px solid #855171}
.bs-customer-message small{color:#62505e}
.bs-chat-status:not(:empty){background:#f8edf5;color:#552441;border-radius:8px;padding:6px 9px}
.bs-chat-status:empty{display:none}
.bs-customer-panel form{border-color:#e9dce5;background:#fff}
.bs-customer-panel textarea{border-color:#d7c2d1;color:#30232d}
#bs-customer-chat .bs-customer-panel form button,#bs-customer-chat .bs-chat-start{background:#522340;border-color:#522340;color:#fff;font-weight:700;min-height:42px}
#bs-customer-chat .bs-chat-actions button{min-height:32px;color:#552441;border-color:#e1cfdc}
.bs-chat-product a{color:#662c54}
@media(max-width:480px){
 #bs-customer-chat{bottom:max(12px,env(safe-area-inset-bottom))}
 .bs-customer-panel header{padding:12px 14px}
 .bs-customer-panel form{padding:9px}
}


/* Keep primary chat controls visible and group the occasional actions. */
.bs-customer-panel{background:#fcfafc}
.bs-customer-panel header{background:#fff;color:#522340;border-bottom:1px solid #efe5ec}
.bs-customer-panel header small{color:#665465}
.bs-chat-header-actions{display:flex;align-items:center;gap:4px}
#bs-customer-chat .bs-customer-panel .bs-chat-header-actions button{width:36px;height:36px;padding:0;border:0;border-radius:10px;background:#f5edf3;color:#522340;font-size:20px;line-height:1}
#bs-customer-chat .bs-customer-panel .bs-chat-header-actions button:hover{background:#ebdce7}
.bs-chat-actions,.bs-chat-confirm-actions{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px;background:#fff;border-bottom:1px solid #efe5ec;flex-shrink:0}
.bs-customer-messages{padding:14px 12px}
.bs-customer-message{width:fit-content;max-width:92%;margin-bottom:8px;background:#fff;border:1px solid #eee5eb}
.bs-customer-message.customer{margin-left:auto;background:#eee0ea;border-color:transparent}
.bs-customer-message p{margin:0}
#bs-customer-chat .bs-chat-retry{align-self:flex-start}
.bs-customer-panel form label{font-size:0}
.bs-customer-panel form textarea{min-height:44px}
@media(max-width:480px){.bs-customer-panel{border-radius:16px}.bs-customer-messages{padding:12px 10px}}

#bs-customer-chat>button{display:flex;align-items:center;gap:9px;border-radius:999px;padding:11px 17px;min-height:48px}
#bs-customer-chat>button::before{content:'';display:block;width:23px;height:23px;background:currentColor;mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11.5a8 8 0 0 1-8 8H5l1.7-3.4A8 8 0 1 1 20 11.5Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M9 11.5h6' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E")}
.bs-customer-panel>p:not([class]){margin:0 14px 8px;color:#62505e;font-size:11px}
.bs-customer-panel form+.bs-chat-notice{margin:6px 14px}
@media(max-width:480px){
 #bs-customer-chat>button{margin-left:auto;width:48px;height:48px;justify-content:center;font-size:0;gap:0;padding:0}
 .bs-customer-panel{height:min(560px,calc(100dvh - 88px));border-radius:18px}
}

.bs-customer-panel{height:520px}
.bs-chat-greeting{width:fit-content;margin:0;padding:9px 12px;border:1px solid #eee5eb;border-radius:13px;background:#fff}
.bs-customer-panel form textarea{padding:10px 11px}
@media(max-width:480px){
 .bs-customer-panel{height:min(500px,calc(100dvh - 88px))}
}

.bs-customer-panel{background:#fcfaf8;border-color:#e9dce5;box-shadow:0 16px 42px #45263826}
.bs-customer-panel header{background:#fffcfa}
.bs-customer-panel header small{letter-spacing:normal}
.bs-customer-messages{padding:16px}
.bs-chat-greeting,.bs-customer-message,.bs-chat-typing{background:#f5edf3;color:#382934;border:1px solid #eee2eb;border-radius:16px 16px 16px 5px}
.bs-customer-message{padding:10px 13px;margin-bottom:10px}
.bs-customer-message.customer{background:#eadbe7;border-radius:16px 16px 5px 16px}
.bs-chat-greeting{margin-bottom:12px}
.bs-chat-typing{display:flex;align-items:center;gap:5px;width:fit-content;padding:12px 14px}
.bs-chat-typing span{width:6px;height:6px;border-radius:50%;background:#855171;animation:bs-chat-dot 1.2s ease-in-out infinite}
.bs-chat-typing span:nth-child(2){animation-delay:.15s}
.bs-chat-typing span:nth-child(3){animation-delay:.3s}
.bs-chat-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@keyframes bs-chat-dot{0%,60%,100%{opacity:.52;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.bs-chat-typing span{animation:none}}
@media(max-width:480px){.bs-customer-messages{padding:13px}}
