/* Mazic Line AI support chat — standalone styles, bottom-right to avoid the Follow Us rail. */
.ml-ai-launcher,.ml-ai-panel{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;box-sizing:border-box}
.ml-ai-launcher *, .ml-ai-panel *{box-sizing:border-box}
.ml-ai-launcher{position:fixed;right:22px;bottom:22px;z-index:88;display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:0 18px;border:1px solid rgba(255,255,255,.26);border-radius:999px;background:linear-gradient(115deg,#07172f,#173b62);color:#fff;font-size:13px;font-weight:850;letter-spacing:.01em;box-shadow:0 14px 34px rgba(7,23,47,.27);cursor:pointer;transition:transform .18s,box-shadow .18s,border-color .18s}
.ml-ai-launcher:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(7,23,47,.32);border-color:#49d7e5}
.ml-ai-launcher:focus-visible,.ml-ai-panel button:focus-visible,.ml-ai-panel a:focus-visible,.ml-ai-panel textarea:focus-visible{outline:3px solid #fbbc05;outline-offset:3px}
.ml-ai-launcher>svg{width:22px;height:22px;fill:none;stroke:#80edf0;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ml-ai-launcher-pulse{width:7px;height:7px;flex:none;background:#5ee5b5;border-radius:50%;box-shadow:0 0 0 4px rgba(94,229,181,.13)}
.ml-ai-panel{position:fixed;right:22px;bottom:86px;z-index:89;width:min(390px,calc(100vw - 28px));height:min(620px,calc(100dvh - 116px));min-height:380px;display:flex;flex-direction:column;overflow:hidden;border:1px solid #cbd8e7;border-radius:22px;background:#fff;color:#102541;box-shadow:0 24px 75px rgba(7,23,47,.28)}
.ml-ai-panel[hidden]{display:none!important}
.ml-ai-header{display:flex;align-items:center;gap:10px;padding:15px 14px;background:linear-gradient(120deg,#07172f,#153c63);color:#fff}
.ml-ai-avatar{width:40px;height:40px;display:grid;place-items:center;flex:none;border:1px solid rgba(255,255,255,.22);border-radius:13px;background:rgba(255,255,255,.08)}
.ml-ai-avatar svg{width:25px;height:25px;fill:#6fe6e8;stroke:#6fe6e8;stroke-width:.4}
.ml-ai-titlewrap{display:flex;min-width:0;flex:1;flex-direction:column;gap:3px}
.ml-ai-titlewrap strong{font-size:13px;font-weight:850;color:#fff;line-height:1.25}
.ml-ai-titlewrap span{font-size:10px;color:#c1d0e1;line-height:1.35}
.ml-ai-iconbutton{display:grid;place-items:center;width:30px;height:30px;flex:none;border:0;border-radius:8px;background:transparent;color:#dceaf8;cursor:pointer}
.ml-ai-iconbutton:hover{background:rgba(255,255,255,.1);color:#fff}
.ml-ai-iconbutton svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ml-ai-mode{display:flex;align-items:center;gap:7px;padding:9px 14px;border-bottom:1px solid #edf1f6;background:#f7fafd;color:#5a6c83;font-size:10px;font-weight:700}
.ml-ai-mode-dot{width:7px;height:7px;border-radius:50%;background:#e6a23b;flex:none}
.ml-ai-mode.is-live .ml-ai-mode-dot{background:#15a779}
.ml-ai-mode.is-error .ml-ai-mode-dot{background:#e25555}
.ml-ai-messages{display:flex;flex:1;flex-direction:column;gap:12px;overflow-y:auto;padding:15px 13px 12px;background:linear-gradient(#fff,#fbfdff);overscroll-behavior:contain}
.ml-ai-message{display:flex;flex-direction:column;gap:4px;max-width:91%;align-self:flex-start}
.ml-ai-message.is-user{align-self:flex-end;max-width:88%}
.ml-ai-message-label{padding:0 4px;color:#6b7b90;font-size:9px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.ml-ai-message.is-user .ml-ai-message-label{text-align:right}
.ml-ai-bubble{padding:10px 12px;border:1px solid #e2eaf2;border-radius:5px 15px 15px 15px;background:#f2f7fc;color:#152b47;font-size:12px;line-height:1.6;overflow-wrap:anywhere;white-space:pre-wrap}
.ml-ai-message.is-user .ml-ai-bubble{border-color:#17395c;border-radius:15px 5px 15px 15px;background:#102c4b;color:white}
.ml-ai-quickprompts{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 10px;background:#fff}
.ml-ai-quickprompts button{padding:7px 9px;border:1px solid #cedbe8;border-radius:999px;background:#fff;color:#17395c;font-size:10px;font-weight:750;cursor:pointer}
.ml-ai-quickprompts button:hover{background:#eef8fb;border-color:#73dce2}
.ml-ai-form{display:flex;align-items:flex-end;gap:8px;padding:10px 11px;border-top:1px solid #e9eef4;background:#fff}
.ml-ai-form textarea{display:block;flex:1;min-width:0;min-height:42px;max-height:100px;resize:vertical;padding:11px 12px;border:1px solid #d7e1ec;border-radius:13px;background:#fbfdff;color:#102541;font-size:12px;line-height:1.45;outline:none}
.ml-ai-form textarea::placeholder{color:#7c8ba0}
.ml-ai-form textarea:focus{border-color:#39cbd8;box-shadow:0 0 0 3px rgba(57,203,216,.12)}
.ml-ai-send{display:grid;place-items:center;width:42px;height:42px;flex:none;border:0;border-radius:13px;background:#0d3155;color:white;cursor:pointer}
.ml-ai-send:hover{background:#164a74}
.ml-ai-send:disabled{opacity:.5;cursor:wait}
.ml-ai-send svg{width:19px;height:19px;fill:none;stroke:#8af0f0;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ml-ai-disclaimer{margin:0;padding:0 13px 12px;background:#fff;color:#718095;font-size:9px;line-height:1.5}
.ml-ai-disclaimer a{color:#125c89;font-weight:750;text-decoration:underline;text-underline-offset:2px}
.ml-ai-typing{display:flex;gap:4px;align-items:center;min-height:18px}
.ml-ai-typing span{width:5px;height:5px;background:#7289a1;border-radius:50%;animation:mlAiDot .9s infinite alternate}
.ml-ai-typing span:nth-child(2){animation-delay:.18s}.ml-ai-typing span:nth-child(3){animation-delay:.36s}
.ml-ai-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes mlAiDot{from{opacity:.35;transform:translateY(0)}to{opacity:1;transform:translateY(-3px)}}
@media(max-width:600px){.ml-ai-launcher{right:14px;bottom:15px;min-height:49px;padding:0 14px}.ml-ai-panel{right:8px;bottom:73px;width:calc(100vw - 16px);height:min(650px,calc(100dvh - 88px));min-height:350px;border-radius:18px}.ml-ai-header{padding:12px}.ml-ai-messages{padding:12px 10px}.ml-ai-disclaimer{padding:0 11px 9px}}
@media(prefers-reduced-motion:reduce){.ml-ai-launcher{transition:none}.ml-ai-typing span{animation:none;opacity:.8}}

/* v11: claim-level citations; never render model-provided HTML. */
.ml-ai-answer-bubble{display:flex;flex-direction:column;gap:9px}
.ml-ai-claim{display:flex;flex-direction:column;gap:5px}
.ml-ai-claim + .ml-ai-claim{padding-top:9px;border-top:1px solid #d9e6ef}
.ml-ai-claim-text{margin:0;color:#152b47;font-size:12px;line-height:1.6;white-space:pre-wrap}
.ml-ai-sources{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:10px;line-height:1.5}
.ml-ai-sources-label{font-weight:800;color:#61738a}
.ml-ai-source-card{display:flex;flex-direction:column;gap:5px;max-width:100%}
.ml-ai-source-toggle{display:inline-flex;align-items:center;gap:5px;max-width:100%;text-align:left;border:1px solid #bed6e4;border-radius:999px;padding:5px 9px;background:#fff;color:#0b6482;font-size:10px;font-weight:750;line-height:1.45;cursor:pointer;white-space:normal}
.ml-ai-source-toggle::after{content:"＋";font-size:11px;font-weight:900}
.ml-ai-source-toggle[aria-expanded="true"]::after{content:"−"}
.ml-ai-source-toggle:hover{background:#eef8fb;border-color:#73dce2}
.ml-ai-source-toggle:focus-visible{outline:2px solid #fbbc05;outline-offset:2px}
.ml-ai-source-detail{max-width:100%;padding:8px 10px;border-left:3px solid #37bdc8;border-radius:0 9px 9px 0;background:#f2f8fb}
.ml-ai-source-detail[hidden]{display:none}
.ml-ai-source-section{display:block;margin:0 0 4px;color:#60748a;font-size:9px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}
.ml-ai-source-excerpt{margin:0;color:#30465f;font-size:10px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}


/* v13: broader in-chat topic picker plus manual typing, speech input and spoken answers. */
.ml-ai-topic-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px 5px;background:#fff;color:#17395c;font-size:10px;font-weight:850}
.ml-ai-topic-heading span+span{color:#6c7d91;font-size:9px;font-weight:600;text-align:right}
.ml-ai-quickprompts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;max-height:154px;overflow-y:auto;overscroll-behavior:contain;padding:4px 11px 9px;background:#fff;scrollbar-width:thin}
.ml-ai-quickprompts button{min-width:0;min-height:29px;padding:5px 6px;border:1px solid #cedbe8;border-radius:9px;background:#fff;color:#17395c;font-size:9px;font-weight:750;line-height:1.25;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.ml-ai-quickprompts button:hover{background:#eef8fb;border-color:#73dce2}
.ml-ai-quickprompts button:disabled{opacity:.55;cursor:wait}
.ml-ai-form{gap:6px}
.ml-ai-mic{display:grid;place-items:center;width:42px;height:42px;flex:none;border:1px solid #cbd9e6;border-radius:13px;background:#f3f8fc;color:#123b61;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
.ml-ai-mic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ml-ai-mic:hover{background:#e7f7fa;border-color:#69d4df}
.ml-ai-mic:disabled{opacity:.5;cursor:wait}
.ml-ai-mic.is-listening{background:#fff0f0;border-color:#dc4545;color:#b4232b;box-shadow:0 0 0 3px rgba(220,69,69,.12);animation:mlAiMicPulse 1.2s ease-in-out infinite}
.ml-ai-voice-status{margin:0;padding:0 12px 7px;background:#fff;color:#6b7b90;font-size:9px;line-height:1.4}
.ml-ai-voice-actions{display:flex;gap:5px;align-items:center;padding-left:4px}
.ml-ai-listen-button{border:1px solid #d5e3ed;border-radius:999px;padding:5px 9px;background:#fff;color:#23516d;font-size:9px;font-weight:750;cursor:pointer}
.ml-ai-listen-button:hover{background:#eef8fb;border-color:#73dce2}
.ml-ai-listen-button[aria-pressed="true"]{background:#fff0f0;color:#9c2020;border-color:#edaaaa}
.ml-ai-listen-button:focus-visible,.ml-ai-mic:focus-visible,.ml-ai-quickprompts button:focus-visible{outline:3px solid #fbbc05;outline-offset:2px}
@keyframes mlAiMicPulse{0%,100%{box-shadow:0 0 0 2px rgba(220,69,69,.10)}50%{box-shadow:0 0 0 5px rgba(220,69,69,.18)}}
@media(max-width:400px){.ml-ai-quickprompts{grid-template-columns:repeat(3,minmax(0,1fr));max-height:160px}.ml-ai-quickprompts button{font-size:8.5px;padding:5px 4px}.ml-ai-topic-heading span+span{max-width:54%}.ml-ai-form{gap:5px}.ml-ai-mic,.ml-ai-send{width:39px;height:40px}}
@media(prefers-reduced-motion:reduce){.ml-ai-mic.is-listening{animation:none}}


/* v14: increase conversation viewport and let users move/resize the chat window. */
.ml-ai-panel {
  width: min(560px, calc(100vw - 28px));
  height: min(780px, calc(100dvh - 100px));
  min-width: min(380px, calc(100vw - 16px));
  min-height: min(520px, calc(100dvh - 120px));
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  resize: none;
  overflow: hidden;
}
.ml-ai-header { cursor: move; touch-action: none; user-select: none; }
.ml-ai-header button { cursor: pointer; touch-action: manipulation; }
.ml-ai-messages { flex: 1 1 0; min-height: 0; overscroll-behavior: contain; }
.ml-ai-topic-heading { flex: 0 0 auto; min-height: 31px; padding: 5px 12px 3px; }
.ml-ai-topic-heading-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.ml-ai-topic-heading span+span { min-width: 0; }
.ml-ai-topic-heading-actions > span { color: #6c7d91; font-size: 9px; font-weight: 600; text-align: right; }
.ml-ai-topics-toggle { border: 0; }
#mlAiTopicsToggle { flex: none; border: 1px solid #cedbe8; border-radius: 999px; background: #f8fbfe; color: #23516d; padding: 4px 7px; font-size: 9px; font-weight: 800; cursor: pointer; white-space: nowrap; }
#mlAiTopicsToggle:hover { background: #eef8fb; border-color: #73dce2; }
#mlAiTopicsToggle:focus-visible { outline: 2px solid #fbbc05; outline-offset: 2px; }
.ml-ai-quickprompts { flex: 0 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 82px; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 3px 11px 7px; scrollbar-width: thin; }
.ml-ai-quickprompts button[data-topic-extra="true"] { display: none; }
.ml-ai-quickprompts.is-expanded { max-height: 152px; }
.ml-ai-quickprompts.is-expanded button[data-topic-extra="true"] { display: block; }
.ml-ai-form { flex: 0 0 auto; }
.ml-ai-voice-status { flex: 0 0 auto; padding: 0 12px 5px; }
.ml-ai-disclaimer { flex: 0 0 auto; padding: 0 38px 9px 13px; font-size: 9px; line-height: 1.4; }
.ml-ai-resize { position: absolute; right: 5px; bottom: 3px; z-index: 3; display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 1px solid #d7e4ee; border-radius: 7px; background: rgba(255,255,255,.96); color: #315a77; cursor: nwse-resize; touch-action: none; box-shadow: 0 2px 7px rgba(7,23,47,.08); }
.ml-ai-resize svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ml-ai-resize:hover { color: #0b7187; border-color: #65d5df; background: #effbfc; }
.ml-ai-resize:focus-visible { outline: 3px solid #fbbc05; outline-offset: 2px; }
.ml-ai-panel.is-dragging, .ml-ai-panel.is-resizing { user-select: none; }
.ml-ai-panel.is-dragging .ml-ai-header { cursor: grabbing; }
@media(max-width:600px) {
  .ml-ai-panel { left: 8px; right: 8px; bottom: 73px; width: calc(100vw - 16px); height: min(740px, calc(100dvh - 84px)); min-width: 0; min-height: min(500px, calc(100dvh - 90px)); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .ml-ai-quickprompts { max-height: 78px; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ml-ai-quickprompts.is-expanded { max-height: 142px; }
  .ml-ai-topic-heading { gap: 4px; padding-inline: 10px; }
  .ml-ai-topic-heading-actions { gap: 5px; }
  .ml-ai-topic-heading-actions > span { max-width: 125px; font-size: 8px; }
  .ml-ai-disclaimer { font-size: 8.5px; padding-left: 10px; padding-right: 34px; }
  .ml-ai-voice-status { font-size: 8.5px; }
  .ml-ai-resize { width: 25px; height: 25px; }
}
@media(max-width:420px) {
  .ml-ai-panel { left: 6px; right: 6px; width: calc(100vw - 12px); }
  .ml-ai-topic-heading-actions > span { display: none; }
  .ml-ai-quickprompts { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: 76px; }
  .ml-ai-quickprompts.is-expanded { max-height: 138px; }
}
@media(prefers-reduced-motion:reduce) { .ml-ai-panel { scroll-behavior: auto; } }

/* v21: accessible voice-language selector and high-contrast permission guidance. */
.ml-ai-voice-language{width:86px;max-width:24vw;height:42px;flex:none;padding:0 5px;border:1px solid #cbd9e6;border-radius:12px;background:#f7fbff;color:#123b61;font-size:10px;font-weight:700;cursor:pointer}
.ml-ai-voice-language:focus-visible{outline:3px solid #fbbc05;outline-offset:2px}
.ml-ai-voice-status.is-error{margin:0 8px 7px;padding:8px 10px;border:1px solid #e8a39b;border-radius:8px;background:#fff4f2;color:#842d24;font-size:10.5px;line-height:1.45;font-weight:650;overflow-wrap:anywhere}
.ml-ai-voice-status.is-active{color:#136c59;font-weight:650}
@media(max-width:400px){.ml-ai-voice-language{width:58px;max-width:58px;padding:0 2px;font-size:9px}.ml-ai-voice-status.is-error{font-size:10px;padding:7px 8px}}
