/* Scoped styles: existing Sofa-Man components retain their own styling. */
.sm-ai{--sm-ai-brand:#003580;--sm-ai-line:#dce6f1;--sm-ai-soft:#f4f8fd;color:#24313d;font-family:inherit;font-size:14px;line-height:1.5;text-align:left}
.sm-ai *{box-sizing:border-box}
.sm-ai button,.sm-ai input{font-family:inherit;line-height:1.3;text-transform:none;letter-spacing:normal}
.sm-ai button{cursor:pointer;box-shadow:none;margin:0}
.sm-ai [hidden]{display:none!important}
.sm-ai button:focus-visible,.sm-ai a:focus-visible,.sm-ai input:focus-visible{outline:3px solid #5ba6ee;outline-offset:3px}
.sm-ai button:disabled{opacity:.6;cursor:wait}
.sm-ai-launch{display:inline-flex;max-width:100%;align-items:center;gap:10px;border:0;border-radius:9px;padding:13px 16px!important;min-height:48px;background:var(--sm-ai-brand)!important;color:#fff!important;font-size:14px;font-weight:600;box-shadow:0 4px 16px #00358030!important}
.sm-ai-chat-icon{display:block;width:18px;height:15px;border:1.6px solid currentColor;border-radius:4px;position:relative}
.sm-ai-chat-icon:after{content:"";position:absolute;bottom:-4px;left:3px;width:5px;height:5px;border-left:1.6px solid currentColor;background:var(--sm-ai-brand);transform:skewY(-35deg)}
.sm-ai-ai{font-size:10px;border-left:1px solid #ffffff70;padding-left:9px}
.sm-ai-panel{border:1px solid #c1d2e7;border-radius:13px;overflow:hidden;background:#fff;box-shadow:0 6px 30px #00000025;display:flex;flex-direction:column}
.sm-ai-inline-mount{margin:16px 0}.sm-ai-inline-mount .sm-ai-panel{margin-top:10px}.sm-ai-inline-mount .sm-ai-panel{max-width:600px;box-shadow:0 2px 8px #123a5a0c}
.sm-ai-head{display:flex;gap:8px;align-items:center;justify-content:space-between;background:var(--sm-ai-brand);color:#fff;padding:12px 13px;flex-shrink:0}
.sm-ai-heading{flex:1;min-width:0}.sm-ai-heading strong{display:block;font-size:15px;color:#fff}.sm-ai-heading small{display:block;font-size:11px;line-height:1.4;color:#e0edff;overflow-wrap:anywhere;margin-top:3px}
.sm-ai-new,.sm-ai-close{color:#fff!important;background:transparent!important;border:0!important;min-height:44px;padding:7px!important;border-radius:5px!important}
.sm-ai-new{font-size:11px!important;white-space:nowrap}.sm-ai-close{min-width:36px;font-size:24px!important}
.sm-ai-messages{padding:14px;overflow-y:auto;overscroll-behavior:contain;min-height:120px;max-height:370px;flex:1;scrollbar-width:thin}
.sm-ai-bubble{padding:11px 12px;border-radius:8px;background:var(--sm-ai-soft);margin:0 22px 11px 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;color:#24313d}
.sm-ai-user{background:var(--sm-ai-brand);color:#fff;margin:0 0 11px 26px}.sm-ai-error{background:#fff5ed;color:#723800}
.sm-ai-prompts{display:flex;flex-wrap:wrap;gap:7px;margin:5px 0 12px}
.sm-ai-prompt{border:1px solid #bfd0e5!important;border-radius:6px!important;color:var(--sm-ai-brand)!important;background:#fff!important;font-size:12px!important;padding:9px 10px!important;min-height:42px}
.sm-ai-product{display:flex;align-items:center;gap:10px;padding:9px;margin-top:10px;border:1px solid var(--sm-ai-line);border-radius:8px;background:#fff;color:#24313d!important;text-decoration:none!important;white-space:normal}
.sm-ai-product img{width:78px;height:59px;object-fit:cover;border-radius:5px;flex-shrink:0}.sm-ai-product>div{min-width:0}.sm-ai-product strong{display:block;font-size:13px;color:var(--sm-ai-brand)}.sm-ai-price{display:block;font-size:12px;font-weight:600;margin-top:4px}.sm-ai-product small{display:block;font-size:11px}
.sm-ai-action{display:block;margin-top:10px;color:var(--sm-ai-brand)!important;font-weight:600;text-decoration:underline!important;white-space:normal}
.sm-ai-status{font-size:11px;color:#5b6e84;min-height:0;padding:0 14px;flex-shrink:0}.sm-ai-status:not(:empty){padding-bottom:8px}
.sm-ai-form{display:flex;gap:8px;align-items:center;padding:12px;border-top:1px solid var(--sm-ai-line);flex-shrink:0;margin:0!important;background:#fff}
.sm-ai-input{flex:1;min-width:0;width:100%;min-height:44px;margin:0!important;border:1px solid #cbd7e7!important;border-radius:6px!important;background:#fff!important;color:#24313d!important;font-size:16px!important;padding:10px!important;box-shadow:none!important}
.sm-ai-send{background:var(--sm-ai-brand)!important;color:#fff!important;font-size:21px!important;border:0!important;border-radius:6px!important;min-width:44px;min-height:44px;padding:7px!important}
.sm-ai-foot{padding:0 12px 11px;text-align:center;background:#fff;font-size:11px;line-height:1.4;color:#5b6e84;flex-shrink:0}.sm-ai-foot p{margin:0 0 6px!important;font-size:11px!important;line-height:1.4!important}.sm-ai-footlinks{display:flex;flex-wrap:wrap;justify-content:center;gap:16px}.sm-ai-foot a{color:var(--sm-ai-brand)!important;text-decoration:underline!important}
.sm-ai-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:480px){.sm-ai-launch{padding:12px 14px!important;font-size:13px;max-width:100%;overflow-wrap:anywhere}.sm-ai-messages{max-height:340px}.sm-ai-head{padding:10px}.sm-ai-new{font-size:10px!important}.sm-ai-form{padding:10px}.sm-ai-inline-mount .sm-ai-messages{max-height:320px}}

/* One card in normal page flow; explicit hidden rule also resists theme overrides. */
.sm-ai-inline-mount.sm-ai{background:#fff;border:1px solid #dce3eb;border-radius:14px;padding:16px;box-shadow:0 4px 18px #123a5a0c;width:100%;margin:16px 0}
.sm-ai-inline-mount .sm-ai-panel{max-width:none;box-shadow:none;border-color:#dce3eb}
.sm-ai-notice{margin:0!important;padding:10px 12px 0!important;font-size:11px!important;line-height:1.4!important;color:#5b6e84;text-align:center;border-top:1px solid var(--sm-ai-line)}
.sm-ai-form{border-top:0}
.sm-ai-more{background:transparent!important;color:var(--sm-ai-brand)!important;border:0!important;text-decoration:underline;font-size:13px!important;padding:10px 0!important;min-height:44px}
.sm-ai-contact{background:#20c967;color:#fff!important;border-radius:8px;padding:10px 14px;text-decoration:none!important;white-space:normal;overflow-wrap:anywhere}
.sm-ai-foot .sm-ai-contact{color:#fff!important;text-decoration:none!important}

/* 1.0.3: match Sofa-Man's pale cards and softly coloured borders. */
.sm-ai-inline-mount.sm-ai{--sm-ai-line:#dce4ec;--sm-ai-soft:#f1f5fb;background:#f8faff!important;border:1px solid #dce4ec!important;border-radius:14px!important;box-shadow:0 2px 7px #123a5a0a!important}
.sm-ai-inline-mount .sm-ai-panel{background:#f8faff!important;border:1px solid #dce4ec!important;border-radius:14px!important;box-shadow:none!important}
.sm-ai-inline-mount .sm-ai-messages,.sm-ai-inline-mount .sm-ai-status,.sm-ai-inline-mount .sm-ai-notice,.sm-ai-inline-mount .sm-ai-form,.sm-ai-inline-mount .sm-ai-foot{background:#f8faff!important}
.sm-ai-inline-mount .sm-ai-notice{border-top:1px solid #dce4ec!important}
.sm-ai-inline-mount .sm-ai-form{border:0!important}
.sm-ai-inline-mount .sm-ai-input{border:1px solid #dce4ec!important;background:#fff!important}
.sm-ai-inline-mount .sm-ai-product,.sm-ai-inline-mount .sm-ai-prompt{border:1px solid #dce4ec!important;background:#fff!important}

/* 1.0.4: WordPress Site Icon next to the in-page assistant button. */
.sm-ai-launch-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.sm-ai .sm-ai-site-icon{display:block;width:48px!important;height:48px!important;max-width:48px!important;object-fit:contain;flex:0 0 48px;border:0!important;box-shadow:none!important;margin:0!important;padding:0!important;background:transparent}
.sm-ai-launch-row .sm-ai-launch{min-width:0;white-space:normal}


/* 1.0.5: harden AI product cards against page/theme image and flex overrides. */
.sm-ai .sm-ai-products{min-width:0;max-width:100%;overflow:hidden}
.sm-ai .sm-ai-product{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
.sm-ai .sm-ai-product img{width:78px!important;min-width:78px!important;max-width:78px!important;height:59px!important;min-height:59px!important;max-height:59px!important;flex:0 0 78px!important;object-fit:cover!important}
.sm-ai .sm-ai-product>div{flex:1 1 0!important;width:0!important;min-width:0!important;max-width:100%!important;overflow:hidden}
.sm-ai .sm-ai-product strong,.sm-ai .sm-ai-product .sm-ai-price,.sm-ai .sm-ai-product small{max-width:100%;overflow-wrap:break-word;word-break:normal;white-space:normal}
