/* Shared Web Chat — homepage, demo, editor preview, and published storefront. */
.sellios-web-chat{--web-chat-edge:28px;--web-chat-bottom:28px;position:fixed;right:var(--web-chat-edge);bottom:var(--web-chat-bottom);z-index:60;font-family:inherit;color:#211a31}
.sellios-web-chat[data-web-chat-position="bottom-left"]{right:auto;left:var(--web-chat-edge)}
.sellios-web-chat[data-web-chat-has-bottom-nav="true"]{--web-chat-bottom:calc(var(--storefront-bottom-nav-height,64px) + 16px + env(safe-area-inset-bottom))}
.sellios-web-chat-launcher{display:inline-flex;align-items:center;gap:9px;min-height:52px;padding:0 18px;border:0;border-radius:999px;background:linear-gradient(135deg,#5b46e8,#824ed8);color:#fff;box-shadow:0 14px 32px rgba(68,48,142,.28);font:800 14px/1 inherit;cursor:pointer}
.sellios-web-chat-launcher>span:first-child,.sellios-web-chat-avatar{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.18);font-size:14px}
.sellios-web-chat-panel{position:absolute;right:0;bottom:64px;display:flex;flex-direction:column;width:min(388px,calc(100vw - 40px));max-height:min(75vh,680px);overflow:hidden;border:1px solid rgba(91,70,232,.13);border-radius:24px;background:#fff;box-shadow:0 24px 70px rgba(36,23,65,.25)}
.sellios-web-chat-overlay[hidden]{display:none}
.sellios-web-chat[data-web-chat-position="bottom-left"] .sellios-web-chat-panel{right:auto;left:0}
.sellios-web-chat-panel[hidden]{display:none}
.sellios-web-chat-panel header{display:flex;align-items:center;gap:10px;padding:16px 17px;border-bottom:1px solid #eeeaf8;background:linear-gradient(135deg,#f6f2ff,#fff)}
.sellios-web-chat-panel header>div:nth-child(2){display:grid;gap:3px;min-width:0}
.sellios-web-chat-panel header strong{font-size:15px;line-height:1.2}
.sellios-web-chat-panel header small{display:flex;align-items:center;gap:5px;color:#746d83;font-size:11px;font-weight:700}
.sellios-web-chat-panel header small i{width:7px;height:7px;border-radius:50%;background:#31a96f}
.sellios-web-chat-avatar{width:34px;height:34px;background:#5b46e8;color:#fff}
.sellios-web-chat-panel header button{margin-left:auto;width:32px;height:32px;border:0;border-radius:50%;background:#fff;color:#4a4059;font-size:23px;line-height:1;cursor:pointer}
.sellios-web-chat-messages{display:grid;align-content:start;gap:10px;min-height:150px;padding:17px;overflow-y:auto;background:#fcfbff}
.sellios-web-chat-messages p{max-width:86%;margin:0;padding:10px 12px;border-radius:14px;font-size:13px;font-weight:650;line-height:1.45}
.sellios-web-chat-messages .is-assistant{justify-self:start;border-bottom-left-radius:4px;background:#eeeaff;color:#392783}
.sellios-web-chat-messages .is-customer{justify-self:end;border-bottom-right-radius:4px;background:#5b46e8;color:#fff}
.sellios-web-chat-notice{max-width:none!important;background:#f1f0f4!important;color:#6e6776!important}
.sellios-web-chat-quick-actions{display:flex;flex-wrap:wrap;gap:7px;padding:0 17px 13px;background:#fcfbff}
.sellios-web-chat-quick-actions button{border:1px solid #dcd5fb;border-radius:999px;background:#fff;color:#513bbb;padding:7px 10px;font:750 11px/1.1 inherit;cursor:pointer}
.sellios-web-chat-panel form{display:flex;gap:8px;padding:12px;border-top:1px solid #eeeaf8;background:#fff}
.sellios-web-chat-panel input{min-width:0;flex:1;border:1px solid #dcd7e8;border-radius:999px;padding:10px 13px;background:#fff;color:#211a31;font:600 13px/1.2 inherit;outline:none}
.sellios-web-chat-panel input:focus{border-color:#725cf0;box-shadow:0 0 0 3px rgba(114,92,240,.13)}
.sellios-web-chat-panel input:disabled{background:#f4f2f6;color:#968f9e;cursor:not-allowed}
.sellios-web-chat-panel form button{width:38px;border:0;border-radius:50%;background:#5b46e8;color:#fff;font:800 18px/1 inherit;cursor:pointer}
.sellios-web-chat-panel form button:disabled{background:#d9d5e1;cursor:not-allowed}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.sf-shared-storefront-preview .sellios-web-chat{position:absolute;right:12px;bottom:auto;top:12px;z-index:8;transform:scale(.86);transform-origin:top right}.sf-shared-storefront-preview .sellios-web-chat-panel{display:none!important}
@media(max-width:640px){
  .sellios-web-chat{--web-chat-edge:max(14px,env(safe-area-inset-right));--web-chat-bottom:calc(14px + env(safe-area-inset-bottom))}
  .homepage-rebuild .sellios-web-chat{--web-chat-bottom:calc(72px + env(safe-area-inset-bottom))}
  .sellios-web-chat[data-web-chat-has-bottom-nav="true"]{--web-chat-bottom:calc(var(--storefront-bottom-nav-height,64px) + 14px + env(safe-area-inset-bottom))}
  .sellios-web-chat-launcher{min-height:48px;padding:0 15px}
  .sellios-web-chat-panel{position:fixed;right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:22px}
  .sellios-web-chat[data-web-chat-position="bottom-left"] .sellios-web-chat-panel{right:auto;left:max(10px,env(safe-area-inset-left))}
  .sellios-web-chat-panel header{padding:16px}.sellios-web-chat-messages{min-height:220px}.sellios-web-chat-panel form{padding-bottom:max(12px,env(safe-area-inset-bottom))}
}

/* Public mobile chat is opened exclusively from the five-item navigation dock. */
@media(max-width:720px){
  body.sellios-web-chat-open{overflow:hidden}
  .sellios-web-chat[data-web-chat-public-dock="true"]{z-index:82}
  .sellios-web-chat[data-web-chat-public-dock="true"] .sellios-web-chat-launcher{display:none}
  .sellios-web-chat[data-web-chat-public-dock="true"] .sellios-web-chat-overlay{position:fixed;z-index:-1;inset:0;background:rgba(27,20,44,.48);backdrop-filter:blur(2px)}
  .sellios-web-chat[data-web-chat-public-dock="true"] .sellios-web-chat-panel{position:fixed;right:max(8px,env(safe-area-inset-right));bottom:0;left:max(8px,env(safe-area-inset-left));width:auto;max-height:min(78dvh,720px);border-radius:24px 24px 0 0;box-shadow:0 -14px 44px rgba(31,21,57,.24)}
  .sellios-web-chat[data-web-chat-public-dock="true"] .sellios-web-chat-panel form{padding-bottom:max(14px,env(safe-area-inset-bottom))}
  .sellios-web-chat[data-web-chat-public-dock="true"] .sellios-web-chat-messages{min-height:0}
}

@media(prefers-reduced-motion:reduce){
  .sellios-web-chat-panel,.sellios-web-chat-overlay{transition:none!important}
}
