.m8-ai-chat,.m8-ai-chat *{box-sizing:border-box}.m8-ai-chat{position:fixed;left:18px;bottom:18px;z-index:1260;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans SC","Helvetica Neue",Arial,sans-serif;color:#10213d}.m8-ai-chat button,.m8-ai-chat textarea{font:inherit}.m8-ai-chat [hidden]{display:none!important}
.m8-ai-toggle{display:flex;align-items:center;gap:10px;min-height:54px;padding:7px 15px 7px 8px;border:1px solid rgba(113,163,226,.36);border-radius:18px;background:linear-gradient(135deg,#0868df,#08a9a5);color:#fff;box-shadow:0 18px 42px rgba(7,83,174,.28);cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}.m8-ai-toggle:hover{transform:translateY(-2px);box-shadow:0 22px 50px rgba(7,83,174,.34)}.m8-ai-toggle:focus-visible{outline:3px solid rgba(8,104,223,.25);outline-offset:3px}.m8-ai-toggle-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:rgba(255,255,255,.17);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}.m8-ai-toggle-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.m8-ai-toggle-label{font-size:14px;font-weight:800;white-space:nowrap}.m8-ai-toggle-dot{width:8px;height:8px;border-radius:999px;background:#7dffb0;box-shadow:0 0 0 4px rgba(125,255,176,.15)}
.m8-ai-proactive{position:absolute;left:0;bottom:68px;width:min(320px,calc(100vw - 36px));padding:13px 38px 13px 14px;border:1px solid #cfe1f7;border-radius:15px;background:#fff;color:#17365f;box-shadow:0 18px 46px rgba(7,54,110,.18);font-size:13px;line-height:1.48;animation:m8AiRise .24s ease-out}.m8-ai-proactive:after{content:"";position:absolute;left:28px;bottom:-7px;width:13px;height:13px;background:#fff;border-right:1px solid #cfe1f7;border-bottom:1px solid #cfe1f7;transform:rotate(45deg)}.m8-ai-proactive-close{position:absolute;right:8px;top:7px;width:26px;height:26px;border:0;border-radius:8px;background:transparent;color:#60728c;font-size:20px;line-height:1;cursor:pointer}.m8-ai-proactive-close:hover{background:#edf4fc;color:#17365f}
.m8-ai-panel{position:absolute;left:0;bottom:70px;display:flex;flex-direction:column;width:min(390px,calc(100vw - 36px));height:min(620px,calc(100vh - 112px));height:min(620px,calc(100dvh - 112px));overflow:hidden;border:1px solid #c8dbf2;border-radius:21px;background:#fff;box-shadow:0 28px 74px rgba(4,44,94,.26);transform-origin:bottom left;animation:m8AiOpen .2s ease-out}.m8-ai-panel:focus{outline:none}
.m8-ai-header{display:flex;align-items:center;gap:10px;min-height:68px;padding:11px 12px 11px 13px;background:linear-gradient(135deg,#072e63 0%,#0868df 62%,#08a9a5 130%);color:#fff}.m8-ai-brand-icon{display:grid;place-items:center;flex:0 0 41px;height:41px;border-radius:13px;background:rgba(255,255,255,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.2);font-size:14px;font-weight:900;letter-spacing:.02em}.m8-ai-heading{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.m8-ai-heading strong{font-size:15px;line-height:1.25}.m8-ai-heading span{display:flex;align-items:center;gap:6px;min-width:0;color:rgba(255,255,255,.82);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.m8-ai-heading i{width:7px;height:7px;flex:0 0 auto;border-radius:999px;background:#73f5a5;box-shadow:0 0 0 3px rgba(115,245,165,.15)}.m8-ai-header-actions{display:flex;align-items:center;gap:4px}.m8-ai-icon-button{display:grid;place-items:center;width:35px;height:35px;border:0;border-radius:10px;background:transparent;color:#fff;cursor:pointer;font-size:25px;line-height:1}.m8-ai-icon-button:hover{background:rgba(255,255,255,.14)}.m8-ai-icon-button:focus-visible{outline:2px solid rgba(255,255,255,.8);outline-offset:1px}.m8-ai-icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.m8-ai-messages{flex:1;min-height:0;overflow-y:auto;padding:16px 14px 12px;background:linear-gradient(180deg,#f7fbff 0%,#f4f8fd 100%);scroll-behavior:smooth}.m8-ai-message{display:flex;gap:8px;margin:0 0 13px}.m8-ai-message.is-user{justify-content:flex-end}.m8-ai-avatar{display:grid;place-items:center;flex:0 0 28px;height:28px;margin-top:2px;border-radius:9px;background:linear-gradient(135deg,#0868df,#08a9a5);color:#fff;font-size:10px;font-weight:900}.m8-ai-bubble{max-width:84%;padding:10px 12px;border:1px solid #dae6f3;border-radius:15px 15px 15px 5px;background:#fff;box-shadow:0 4px 13px rgba(20,58,101,.055);color:#233a5b;font-size:13.5px;line-height:1.58;overflow-wrap:anywhere}.m8-ai-message.is-user .m8-ai-bubble{border-color:#0868df;border-radius:15px 15px 5px 15px;background:#0868df;color:#fff;box-shadow:0 6px 16px rgba(8,104,223,.18)}.m8-ai-bubble p{margin:0 0 8px}.m8-ai-bubble p:last-child{margin-bottom:0}.m8-ai-bubble ul{margin:5px 0 0;padding-left:19px}.m8-ai-bubble li+li{margin-top:4px}.m8-ai-bubble a{color:#0868df;font-weight:700;text-decoration:none}.m8-ai-bubble a:hover{text-decoration:underline}.m8-ai-message.is-user .m8-ai-bubble a{color:#fff}.m8-ai-sources{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px;padding-top:8px;border-top:1px solid #e9f0f7}.m8-ai-sources a{max-width:100%;padding:5px 8px;border:1px solid #cfe0f4;border-radius:999px;background:#f5f9ff;color:#0b5cae;font-size:11.5px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.m8-ai-typing .m8-ai-bubble{display:flex;align-items:center;gap:8px;color:#62748e}.m8-ai-dots{display:flex;gap:4px}.m8-ai-dots i{width:6px;height:6px;border-radius:999px;background:#4f8bc8;animation:m8AiDots 1s infinite ease-in-out}.m8-ai-dots i:nth-child(2){animation-delay:.15s}.m8-ai-dots i:nth-child(3){animation-delay:.3s}
.m8-ai-quick{display:flex;gap:7px;overflow-x:auto;padding:9px 12px 7px;border-top:1px solid #e5edf6;background:#fff;scrollbar-width:none}.m8-ai-quick::-webkit-scrollbar{display:none}.m8-ai-quick button{flex:0 0 auto;max-width:210px;padding:7px 10px;border:1px solid #cfe0f4;border-radius:999px;background:#f7faff;color:#185c9d;font-size:11.5px;font-weight:700;line-height:1.25;cursor:pointer}.m8-ai-quick button:hover{border-color:#8ebbe9;background:#edf6ff}.m8-ai-quick button:focus-visible{outline:2px solid rgba(8,104,223,.25);outline-offset:1px}
.m8-ai-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;padding:9px 11px 10px;border-top:1px solid #e4edf6;background:#fff}.m8-ai-input-wrap{display:block}.m8-ai-input-wrap textarea{display:block;width:100%;min-height:44px;max-height:112px;resize:none;padding:11px 12px;border:1px solid #cbd9e8;border-radius:13px;background:#f9fbfe;color:#172c49;font-size:13.5px;line-height:1.45;outline:none}.m8-ai-input-wrap textarea:focus{border-color:#4c93dc;background:#fff;box-shadow:0 0 0 3px rgba(8,104,223,.11)}.m8-ai-input-wrap textarea::placeholder{color:#8796aa}.m8-ai-send{display:flex;align-items:center;justify-content:center;gap:6px;min-width:76px;height:44px;padding:0 12px;border:0;border-radius:13px;background:linear-gradient(135deg,#0868df,#087ccf);color:#fff;font-size:12.5px;font-weight:800;cursor:pointer;box-shadow:0 7px 16px rgba(8,104,223,.18)}.m8-ai-send:hover{filter:brightness(.97)}.m8-ai-send:disabled{cursor:not-allowed;opacity:.58;box-shadow:none}.m8-ai-send:focus-visible{outline:3px solid rgba(8,104,223,.22);outline-offset:2px}.m8-ai-send svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.m8-ai-footer{padding:8px 11px 10px;border-top:1px solid #edf2f7;background:#fbfdff}.m8-ai-footer p{margin:0;color:#75859a;font-size:10.5px;line-height:1.4}.m8-ai-footer div{display:flex;gap:12px;margin-top:5px}.m8-ai-footer a{color:#0b63b6;font-size:11px;font-weight:750;text-decoration:none}.m8-ai-footer a:hover{text-decoration:underline}
@keyframes m8AiOpen{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}@keyframes m8AiRise{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}@keyframes m8AiDots{0%,70%,100%{transform:translateY(0);opacity:.45}35%{transform:translateY(-3px);opacity:1}}
@media(max-width:640px){.m8-ai-chat{left:12px;bottom:calc(12px + env(safe-area-inset-bottom))}.m8-ai-toggle{min-height:50px;padding:5px 12px 5px 6px;border-radius:16px}.m8-ai-toggle-icon{width:39px;height:39px;border-radius:12px}.m8-ai-toggle-label{font-size:13px}.m8-ai-panel{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;max-width:none;border:0;border-radius:0;animation:m8AiOpenMobile .18s ease-out}.m8-ai-chat.is-open .m8-ai-toggle,.m8-ai-chat.is-open .m8-ai-proactive{display:none!important}.m8-ai-header{min-height:64px;padding-top:calc(9px + env(safe-area-inset-top))}.m8-ai-messages{padding:14px 12px 10px}.m8-ai-bubble{max-width:88%;font-size:14px}.m8-ai-quick{padding:8px 10px 7px}.m8-ai-form{padding:8px 10px}.m8-ai-footer{padding:7px 10px calc(8px + env(safe-area-inset-bottom))}.m8-ai-proactive{bottom:62px;width:min(310px,calc(100vw - 24px))}@keyframes m8AiOpenMobile{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}}
@media(max-width:380px){.m8-ai-send{min-width:48px;width:48px;padding:0}.m8-ai-send span{display:none}.m8-ai-heading span{max-width:180px}.m8-ai-footer div{gap:9px}.m8-ai-footer a{font-size:10.5px}}
@media(prefers-reduced-motion:reduce){.m8-ai-toggle,.m8-ai-panel,.m8-ai-proactive,.m8-ai-dots i{animation:none!important;transition:none!important}.m8-ai-messages{scroll-behavior:auto}}
html.m8-ai-page-lock{overflow:hidden}

/* v1.1.0 — right-side placement, mobile shared trigger and streaming cursor. */
.m8-ai-chat{left:auto;right:18px;bottom:84px}
.m8-ai-proactive{left:auto;right:0}
.m8-ai-proactive:after{left:auto;right:28px}
.m8-ai-panel{left:auto;right:0;transform-origin:bottom right}
.m8-ai-stream-text{white-space:pre-wrap}
.m8-ai-stream-cursor{display:inline-block;width:2px;height:1em;margin-left:3px;vertical-align:-.12em;border-radius:2px;background:#0b6bdc;animation:m8AiCursor .8s steps(1,end) infinite}
@keyframes m8AiCursor{0%,48%{opacity:1}49%,100%{opacity:0}}

@media(max-width:640px){
  .m8-ai-chat{left:auto;right:12px;bottom:calc(76px + env(safe-area-inset-bottom))}
  .m8-ai-toggle{display:none!important}
  .m8-ai-proactive{right:0;bottom:0;width:min(310px,calc(100vw - 24px))}
  .m8-ai-proactive:after{right:24px}
  .m8-ai-panel{position:fixed;inset:auto 10px calc(72px + env(safe-area-inset-bottom)) auto;width:calc(100vw - 20px);max-width:390px;height:min(72dvh,600px);max-height:calc(100dvh - 96px - env(safe-area-inset-bottom));border:1px solid #c8dbf2;border-radius:20px;animation:m8AiOpen .18s ease-out}
  .m8-ai-chat.is-open .m8-ai-proactive{display:none!important}
  .m8-ai-header{min-height:62px;padding:9px 10px}
  .m8-ai-messages{padding:13px 11px 9px}
  .m8-ai-form{padding:8px 9px}
  .m8-ai-footer{padding:7px 9px 8px}
}
@media(min-width:641px){.m8-ai-panel{height:min(620px,calc(100dvh - 176px))}}

/* v1.4.1 — truthful handoff confirmation and server-side mail delivery. */
.m8-ai-footer div{align-items:center;flex-wrap:wrap}
.m8-ai-submit-lead{padding:0;border:0;background:transparent;color:#0b63b6;font-size:11px;font-weight:800;line-height:1.35;cursor:pointer;text-decoration:none}
.m8-ai-submit-lead:hover{text-decoration:underline}
.m8-ai-submit-lead:focus-visible{outline:2px solid rgba(8,104,223,.24);outline-offset:3px;border-radius:4px}
.m8-ai-messages{overscroll-behavior:contain}

@media(max-width:640px){
  .m8-ai-panel{transition:height .16s ease,top .16s ease,bottom .16s ease;contain:layout paint}
  .m8-ai-input-wrap textarea{font-size:16px}
  .m8-ai-chat.is-keyboard-open .m8-ai-panel{
    top:var(--m8-ai-panel-top,6px);
    right:6px;
    bottom:auto;
    left:6px;
    width:auto;
    max-width:none;
    height:var(--m8-ai-panel-height,calc(100dvh - 12px));
    max-height:none;
    border-radius:16px;
  }
  .m8-ai-chat.is-keyboard-open .m8-ai-header{min-height:54px;padding:7px 9px}
  .m8-ai-chat.is-keyboard-open .m8-ai-brand-icon{flex-basis:36px;height:36px;border-radius:11px}
  .m8-ai-chat.is-keyboard-open .m8-ai-quick,
  .m8-ai-chat.is-keyboard-open .m8-ai-footer{display:none!important}
  .m8-ai-chat.is-keyboard-open .m8-ai-messages{padding:9px 9px 6px}
  .m8-ai-chat.is-keyboard-open .m8-ai-form{padding:7px 8px calc(7px + env(safe-area-inset-bottom));gap:6px}
  .m8-ai-chat.is-keyboard-open .m8-ai-input-wrap textarea{min-height:42px;max-height:86px;padding:9px 10px}
  .m8-ai-chat.is-keyboard-open .m8-ai-send{height:42px}
}

/* v1.4.7 — stronger mobile consultation prompt beside the promoted AI entry. */
@media(max-width:640px){
  .m8-ai-chat{right:10px;bottom:calc(72px + env(safe-area-inset-bottom))}
  .m8-ai-proactive{
    right:0;
    bottom:0;
    width:min(318px,calc(100vw - 20px));
    padding:14px 38px 14px 15px;
    border:1px solid rgba(73,142,220,.58);
    border-radius:16px;
    background:linear-gradient(145deg,#fff 0%,#f1f8ff 100%);
    color:#123d6b;
    box-shadow:0 18px 46px rgba(7,65,137,.24);
    font-size:13.5px;
    font-weight:750;
    line-height:1.5;
  }
  .m8-ai-proactive:after{right:88px}
}
