/* MetroSales Toolkit — chat assistant */
.mschat{--mschat-accent:#D84249;--mschat-ink:#1E1F21;--mschat-ink2:#2A2B2E;--mschat-bg:#F4F4F5;--mschat-line:#E4E4E7;--mschat-text:#1E1F21;--mschat-muted:#6B6E70;
	position:fixed;bottom:max(20px,env(safe-area-inset-bottom));z-index:1100;font-family:inherit;font-size:15px;line-height:1.5;color:var(--mschat-text);-webkit-font-smoothing:antialiased}
.mschat--right{right:max(20px,env(safe-area-inset-right))}
.mschat--left{left:max(20px,env(safe-area-inset-left))}
.mschat *,.mschat *::before,.mschat *::after{box-sizing:border-box}
.mschat [hidden]{display:none!important}
.mschat button{font:inherit;cursor:pointer}

/* launcher */
.mschat__launch{position:relative;display:grid;place-items:center;width:62px;height:62px;padding:0;border:2px solid var(--mschat-accent);border-radius:50%;background:var(--mschat-ink);color:#fff;
	box-shadow:0 10px 30px rgba(20,20,22,.3),0 0 0 4px rgba(255,255,255,.9);transition:transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s}
.mschat__launch:hover{transform:translateY(-2px) scale(1.04);box-shadow:0 14px 34px rgba(20,20,22,.34)}
.mschat__launch:focus-visible{outline:3px solid var(--mschat-accent);outline-offset:3px}
.mschat__launch::before{content:"";position:absolute;inset:-5px;border-radius:50%;border:2px solid var(--mschat-accent);opacity:0;animation:mschatPulse 2.8s ease-out 3s infinite}
.mschat.is-open .mschat__launch::before{animation:none}
.mschat__launch-open,.mschat__launch-close{position:absolute;inset:0;display:grid;place-items:center;transition:opacity .2s,transform .3s cubic-bezier(.2,.8,.2,1)}
.mschat__launch-close{opacity:0;transform:rotate(-90deg) scale(.6)}
.mschat.is-open .mschat__launch-open{opacity:0;transform:rotate(90deg) scale(.6)}
.mschat.is-open .mschat__launch-close{opacity:1;transform:none}
.mschat__launch .mschat__mark{width:34px;height:34px;color:#fff}
.mschat__badge{position:absolute;top:-2px;right:-2px;display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--mschat-accent);color:#fff;font-size:11px;font-style:normal;font-weight:700;border:2px solid #fff}
@keyframes mschatPulse{0%{opacity:.7;transform:scale(.92)}70%,100%{opacity:0;transform:scale(1.25)}}

/* teaser */
.mschat__teaser{position:absolute;bottom:76px;max-width:260px;width:max-content;opacity:0;transform:translateY(8px) scale(.96);transform-origin:bottom right;transition:opacity .3s,transform .35s cubic-bezier(.2,.8,.2,1)}
.mschat--right .mschat__teaser{right:0}
.mschat--left .mschat__teaser{left:0;transform-origin:bottom left}
.mschat__teaser.is-in{opacity:1;transform:none}
.mschat__teaser-text{display:block;width:100%;padding:13px 34px 13px 16px;border:0;border-radius:16px 16px 4px 16px;background:#fff;color:var(--mschat-text);text-align:left;font-size:14px;font-weight:500;line-height:1.45;box-shadow:0 12px 32px rgba(20,20,22,.18),0 0 0 1px rgba(0,0,0,.04)}
.mschat--left .mschat__teaser-text{border-radius:16px 16px 16px 4px}
.mschat__teaser-x{position:absolute;top:6px;right:6px;z-index:1;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--mschat-muted);font-size:17px;line-height:1}
.mschat__teaser-x:hover{background:var(--mschat-bg);color:var(--mschat-text)}

/* panel */
.mschat__panel{position:absolute;bottom:78px;display:flex;flex-direction:column;width:380px;height:min(620px,calc(100vh - 120px));height:min(620px,calc(100dvh - 120px));overflow:hidden;border-radius:20px;background:var(--mschat-bg);
	box-shadow:0 24px 70px rgba(20,20,22,.3),0 0 0 1px rgba(0,0,0,.05);opacity:0;transform:translateY(14px) scale(.97);transform-origin:bottom right;transition:opacity .22s,transform .3s cubic-bezier(.2,.8,.2,1)}
.mschat--right .mschat__panel{right:0}
.mschat--left .mschat__panel{left:0;transform-origin:bottom left}
.mschat.is-open .mschat__panel{opacity:1;transform:none}

.mschat__head{display:flex;align-items:center;gap:12px;padding:16px 14px 16px 18px;background:var(--mschat-ink);color:#fff;position:relative}
.mschat__head::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--mschat-accent),transparent 75%)}
.mschat__avatar{position:relative;flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--mschat-ink2);box-shadow:0 0 0 1px rgba(255,255,255,.08) inset}
.mschat__avatar .mschat__mark{width:28px;height:28px;color:#fff}
.mschat__online{position:absolute;right:-3px;bottom:-3px;width:12px;height:12px;border-radius:50%;background:#2BB673;border:2px solid var(--mschat-ink)}
.mschat__who{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.mschat__who strong{font-size:15.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mschat__who small{font-size:12.5px;color:rgba(255,255,255,.62)}
.mschat__icon{flex:none;display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:10px;background:transparent;color:rgba(255,255,255,.75);transition:background .2s,color .2s}
.mschat__icon:hover{background:rgba(255,255,255,.1);color:#fff}
.mschat__icon:focus-visible{outline:2px solid var(--mschat-accent)}

.mschat__log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:18px 16px 8px;display:flex;flex-direction:column;gap:8px;scroll-behavior:smooth}
.mschat__msg{display:flex;flex-direction:column;align-items:flex-start;max-width:86%;animation:mschatIn .3s cubic-bezier(.2,.8,.2,1)}
.mschat__msg--me{align-self:flex-end;align-items:flex-end}
.mschat__bubble{padding:10px 14px;border-radius:16px 16px 16px 4px;background:#fff;color:var(--mschat-text);font-size:14.5px;box-shadow:0 1px 2px rgba(0,0,0,.05),0 0 0 1px var(--mschat-line) inset;overflow-wrap:anywhere}
.mschat__msg--me .mschat__bubble{border-radius:16px 16px 4px 16px;background:var(--mschat-accent);color:#fff;box-shadow:none}
.mschat__bubble p{margin:0 0 .55em}.mschat__bubble p:last-child{margin:0}
.mschat__bubble ul,.mschat__bubble ol{margin:.3em 0 .5em;padding-left:1.2em}
.mschat__bubble a{color:var(--mschat-accent);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.mschat__note{display:block;margin-top:6px;font-size:11.5px;color:var(--mschat-muted)}
.mschat__note a{color:inherit;font-weight:500}
.mschat__cta{display:inline-flex;align-items:center;gap:6px;margin-top:6px;padding:7px 13px;border-radius:999px;background:var(--mschat-ink);color:#fff!important;font-size:13px;font-weight:600;text-decoration:none!important}
.mschat__cta::after{content:"→"}
.mschat__cta:hover{background:var(--mschat-accent)}
.mschat__typing .mschat__bubble{display:flex;gap:4px;padding:13px 14px}
.mschat__typing i{width:7px;height:7px;border-radius:50%;background:#B7B9BB;animation:mschatDot 1.1s infinite}
.mschat__typing i:nth-child(2){animation-delay:.15s}.mschat__typing i:nth-child(3){animation-delay:.3s}
@keyframes mschatDot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}
@keyframes mschatIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.mschat__chips{display:flex;flex-wrap:wrap;gap:7px;padding:6px 16px 12px;max-height:38%;overflow-y:auto}
.mschat__chips:empty{display:none}
.mschat__chip{padding:7px 13px;border:1.5px solid color-mix(in srgb,var(--mschat-accent) 45%,transparent);border-radius:999px;background:#fff;color:var(--mschat-accent);font-size:13.5px;font-weight:600;line-height:1.3;text-align:left;transition:background .15s,color .15s,border-color .15s}
.mschat__chip:hover,.mschat__chip:focus-visible{background:var(--mschat-accent);border-color:var(--mschat-accent);color:#fff;outline:0}
.mschat__chip--primary{background:var(--mschat-accent);border-color:var(--mschat-accent);color:#fff}
.mschat__chip--primary:hover{background:var(--mschat-ink);border-color:var(--mschat-ink)}

.mschat__input{display:flex;align-items:center;gap:8px;margin:0;padding:10px 12px;border-top:1px solid var(--mschat-line);background:#fff}
.mschat__hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.mschat__field{flex:1;min-width:0;height:44px;padding:0 14px;border:1px solid var(--mschat-line);border-radius:12px;background:var(--mschat-bg);color:var(--mschat-text);font:inherit;font-size:16px;outline:0;transition:border-color .15s,background .15s}
.mschat__field:focus,.mschat__field:focus-visible{border-color:var(--mschat-accent);background:#fff;outline:0!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--mschat-accent) 18%,transparent)!important}
.mschat__send{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:var(--mschat-accent);color:#fff;transition:background .2s,transform .15s}
.mschat__send:hover{background:var(--mschat-ink)}
.mschat__send:active{transform:scale(.94)}
.mschat__foot{margin:0;padding:0 12px 9px;background:#fff;color:var(--mschat-muted);font-size:10.5px;text-align:center}

/* phones: full screen */
@media (max-width:599px){
	.mschat{bottom:max(16px,env(safe-area-inset-bottom))}
	.mschat--right{right:16px}.mschat--left{left:16px}
	.mschat__launch{width:56px;height:56px}
	.mschat__launch .mschat__mark{width:30px;height:30px}
	.mschat__teaser{bottom:68px;max-width:calc(100vw - 32px)}
	.mschat__panel{position:fixed;inset:0;bottom:0;width:auto;height:100%;height:100dvh;border-radius:0;transform:translateY(24px)}
	.mschat__head{padding-top:max(14px,env(safe-area-inset-top))}
	.mschat__input{padding-bottom:max(10px,env(safe-area-inset-bottom))}
	.mschat.is-open .mschat__launch{display:none}
	.mschat__msg{max-width:90%}
	.mschat__chips{max-height:42%}
	html.mschat-open,html.mschat-open body{overflow:hidden}
}
/* short laptop screens */
@media (min-width:600px) and (max-height:700px){
	.mschat__panel{height:calc(100vh - 110px);height:calc(100dvh - 110px)}
}
@media (prefers-reduced-motion:reduce){
	.mschat *,.mschat *::before{animation:none!important;transition:none!important}
}
@media print{.mschat{display:none}}
