/* Support extends the existing MathWave palette; Dots has its own application shell. */
.support-widget,.dots-body { --sp-paper:var(--paper,#f2f7fb);--sp-surface:var(--surface,#fff);--sp-alt:var(--surface-alt,#ebf3f9);--sp-ink:var(--ink,#13283b);--sp-muted:var(--ink-muted,#52677a);--sp-line:var(--rule,#dae5ee);--sp-action:var(--action,#1a72c0);--sp-tint:var(--accent-tint,#e0effb);--sp-accent:var(--accent-deep,#125089);--sp-danger:var(--danger,#c0283a);font-family:'Nunito Sans','Segoe UI',sans-serif;color:var(--sp-ink);font-size:14px;line-height:1.5; }
.support-widget *, .dots-body * { box-sizing:border-box; }
.support-widget [hidden],.dots-body [hidden] { display:none!important; }
.support-widget button,.dots-body button,.support-widget textarea,.dots-body input,.dots-body textarea { font:inherit; }
.support-widget button,.dots-body button { cursor:pointer; }
.support-widget button:disabled,.dots-body button:disabled { opacity:.55;cursor:wait; }
.support-widget :focus-visible,.dots-body :focus-visible { outline:2px solid var(--sp-action);outline-offset:3px; }
.support-widget ::selection,.dots-body ::selection { background:var(--sp-tint);color:var(--sp-ink); }
.support-widget svg,.dots-body svg { width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0; }
.support-sr { position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }
.support-launcher { position:fixed;right:24px;bottom:22px;display:flex;align-items:center;gap:10px;min-height:48px;padding:11px 17px;background:var(--sp-action);color:#fff;border:0;border-radius:12px;box-shadow:0 6px 20px #12345130;z-index:220; }
.support-launcher:hover,.support-send:hover { filter:brightness(.92); }
.support-badge { display:inline-grid;place-items:center;min-width:23px;height:23px;padding:0 5px;border-radius:6px;background:#fff;color:#125089;font-weight:800; }
.support-panel { position:fixed;right:24px;bottom:82px;width:390px;height:min(650px,calc(100dvh - 110px));display:flex;flex-direction:column;background:var(--sp-surface);border-radius:16px;box-shadow:0 12px 48px #13283b40;overflow:hidden;z-index:221; }
.support-heading { display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid var(--sp-line);background:var(--sp-surface);flex-shrink:0; }
.support-heading>div:first-child { flex:1;min-width:0; }
.support-heading h2 { font-family:'M PLUS Rounded 1c','Nunito Sans',sans-serif;font-size:19px;font-weight:700;line-height:1.3;margin:0;overflow-wrap:anywhere; }
.support-heading p { color:var(--sp-muted);font-size:12px;margin:4px 0 0; }
.support-icon { display:grid;place-items:center;width:40px;height:40px;border:0;background:transparent;color:var(--sp-muted);border-radius:8px;flex-shrink:0;padding:8px; }
.support-icon:hover,.support-text-button:hover { background:var(--sp-alt); }
.support-notice { padding:10px 20px;color:var(--sp-muted);font-size:12px;background:var(--sp-alt); }
.support-history { flex:1;min-height:0;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:16px;scrollbar-width:thin;scrollbar-color:var(--sp-line) transparent; }
.support-empty { margin:auto 0;text-align:center;color:var(--sp-muted);padding:24px 4px; }
.support-empty h3 { font-size:17px;color:var(--sp-ink);margin:0 0 10px; }
.support-empty p { margin:0; }
.support-message { align-self:flex-start;max-width:88%;min-width:90px; }
.support-message.is-mine { align-self:flex-end; }
.support-message-body { background:var(--sp-alt);padding:10px 13px;border-radius:12px 12px 12px 3px;white-space:pre-wrap;overflow-wrap:anywhere; }
.support-message.is-mine .support-message-body { background:var(--sp-tint);border-radius:12px 12px 3px 12px; }
.support-message-author { font-size:11px;color:var(--sp-muted);margin:0 2px 4px; }
.support-message-meta { display:flex;justify-content:flex-end;gap:8px;color:var(--sp-muted);font-size:11px;margin-top:4px;font-variant-numeric:tabular-nums; }
.support-message-files { display:flex;flex-direction:column;gap:8px;margin-top:8px; }
.support-file-link { display:block;color:var(--sp-accent);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere; }
.support-file-link img { display:block;max-width:100%;max-height:210px;object-fit:contain;border-radius:7px;margin-bottom:5px; }
.support-composer { border-top:1px solid var(--sp-line);padding:12px 16px 10px;background:var(--sp-surface);flex-shrink:0;margin:0; }
.support-composer textarea { width:100%;display:block;resize:vertical;min-height:68px;max-height:150px;border:1px solid var(--sp-line);border-radius:8px;background:var(--sp-paper);color:var(--sp-ink);padding:10px 12px;font-size:14px;line-height:1.5;caret-color:var(--sp-action); }
.support-composer textarea::placeholder,.dots-search::placeholder { color:var(--sp-muted);opacity:1; }
.support-composer-actions { display:flex;align-items:center;gap:10px;margin-top:10px; }
.support-attach { display:flex;align-items:center;gap:5px;min-height:40px;color:var(--sp-accent);cursor:pointer;margin:0;font-weight:600; }
.support-attach svg { width:19px;height:19px; }
.support-attach:has(+ input:focus-visible) { outline:2px solid var(--sp-action);outline-offset:3px;border-radius:6px; }
.support-limit { font-size:10px;color:var(--sp-muted);flex:1; }
.support-send { border:0;border-radius:8px;background:var(--sp-action);color:#fff;min-height:40px;padding:9px 15px;font-weight:700; }
.support-send-arrow { display:none; }
.support-send-hint { color:var(--sp-muted);font-size:10px;margin:5px 0 0;text-align:right; }
.support-selected { display:flex;flex-wrap:wrap;gap:6px; }
.support-selected button { display:flex;align-items:center;gap:5px;max-width:100%;font-size:12px;overflow-wrap:anywhere;margin-top:8px;border:1px solid var(--sp-line);border-radius:6px;padding:5px 8px;background:var(--sp-alt);color:var(--sp-ink); }
.support-selected button svg { width:14px;height:14px; }
.support-error { margin:8px 0 0;color:var(--sp-danger);font-size:13px; }
.support-text-button { color:var(--sp-accent);border:0;background:transparent;padding:8px 10px;border-radius:8px;font-weight:600;min-height:40px; }
.support-load-more { display:block;align-self:center;border:0;background:transparent;color:var(--sp-accent);font-size:12px;padding:6px 10px; }
/* Dots: a plain agent console. System font, native controls, linear content. */
.dots-body { --sp-paper:#fff;--sp-surface:#fff;--sp-alt:#fff;--sp-ink:#111;--sp-muted:#444;--sp-line:#ccc;--sp-action:#111;--sp-tint:#eee;--sp-accent:#0645ad;--sp-danger:#a00000;margin:0;padding:12px;font-family:system-ui,sans-serif;font-size:14px;line-height:1.4; }
.dots-body button { color:#111;background:#eee;border:1px solid #777;border-radius:2px;box-shadow:none;min-height:32px;padding:4px 8px;filter:none;font-weight:400; }
.dots-body button:hover { background:#ddd;filter:none; }
.dots-body input,.dots-body textarea { color:#111;background:#fff;border:1px solid #777;border-radius:0;font-size:14px;padding:6px; }
.dots-body h1,.dots-body h2,.dots-body h3 { font-family:inherit;font-size:16px;line-height:1.4;margin:12px 0 8px; }
.dots-top { display:flex;align-items:center;gap:16px;flex-wrap:wrap;border-bottom:1px solid #ccc;padding-bottom:8px;margin-bottom:12px; }
.dots-account { display:flex;align-items:center;gap:10px;margin-left:auto; }
.dots-workspace { display:grid;grid-template-columns:240px minmax(0,1fr);gap:12px;align-items:start; }
.dots-sidebar { grid-column:1;grid-row:1 / span 2;position:sticky;top:8px;max-height:calc(100dvh - 24px);overflow:auto; }
.dots-list-heading { display:flex;align-items:center;gap:8px; }
.dots-search { width:100%;margin-bottom:8px; }
.dots-filters { display:flex;gap:4px;flex-wrap:wrap;margin-bottom:8px; }
.dots-filters .is-active { font-weight:700;text-decoration:underline; }
.dots-body .dots-thread { display:block;width:100%;text-align:left;background:#fff;margin-bottom:6px;padding:8px; }
.dots-body .dots-thread.is-active { border:2px solid #111;padding:7px; }
.dots-thread-head,.dots-thread-head>span,.dots-thread time,.dots-thread-preview,.dots-thread-foot>span { display:block;overflow-wrap:anywhere; }
.dots-thread-name { font-weight:700; }
.dots-thread-preview { margin:5px 0; }
.dots-thread time,.dots-thread-foot { font-size:12px;color:#444; }
.dots-thread-count { font-weight:700; }
.dots-poll { font-size:12px; }
.dots-conversation { grid-column:2;min-width:0; }
.dots-body .support-heading { padding:0 0 8px;flex-wrap:wrap;background:#fff; }
.dots-body .support-heading h2 { margin:0;font-family:inherit;font-size:16px; }
.dots-body .support-heading p { margin:2px 0 0;font-size:14px; }
.dots-body .support-thread-status { font-size:14px; }
.dots-body .support-history { display:block;max-height:55dvh;overflow:auto;padding:8px 0; }
.dots-body .support-message,.dots-body .support-message.is-mine { max-width:none;margin:0;padding:8px 0;border-bottom:1px solid #ddd; }
.dots-body .support-message-body,.dots-body .support-message.is-mine .support-message-body { background:none;border-radius:0;padding:0; }
.dots-body .support-message-author { font-size:14px;font-weight:700;margin:0 0 4px; }
.dots-body .support-message-meta { justify-content:flex-start;font-size:12px; }
.dots-body .support-composer { padding:8px 0;background:#fff; }
.dots-body .support-composer textarea { width:100%;min-height:70px;max-height:180px; }
.dots-body .support-composer-actions { justify-content:flex-start;flex-wrap:wrap; }
.dots-body .support-attach { min-height:32px;font-weight:400;color:#0645ad;text-decoration:underline; }
.dots-body .support-attach svg { display:none; }
.dots-body .support-limit { font-size:12px;flex:initial; }
.dots-body .support-send-hint { text-align:left;font-size:12px; }
.dots-tools { grid-column:2;min-width:0;border-top:1px solid #ccc;padding-top:8px; }
.dots-tools dl { display:grid;grid-template-columns:160px minmax(0,1fr);gap:4px 12px;margin:0; }
.dots-tools dd { margin:0;overflow-wrap:anywhere; }
.dots-tools p,.dots-tools ol { font-size:14px; }
.dots-tools details { margin:8px 0; }
.dots-tools summary { cursor:pointer; }
.dots-tools textarea { width:100%;min-height:200px;resize:vertical; }
.dots-tools-actions { display:flex;gap:6px;flex-wrap:wrap;margin-top:6px; }
.dots-global-error { margin-top:12px;padding:8px;border:1px solid #a00000; }
.dots-login { max-width:360px; }
.dots-login label { display:block;margin:12px 0 4px; }
.dots-login input:not([type=hidden]) { display:block;width:100%; }
.dots-login button { margin-top:12px; }
@media(max-width:760px) {
  .support-launcher{bottom:calc(82px + env(safe-area-inset-bottom,0px));right:14px;min-height:44px;padding:10px 13px;font-size:12px;gap:7px;z-index:220}
  .support-launcher svg{width:19px;height:19px}.support-panel{right:10px;left:10px;width:auto;bottom:calc(138px + env(safe-area-inset-bottom,0px));height:min(610px,calc(100dvh - 154px));border-radius:14px}
  .support-heading{padding:14px 16px}.support-heading h2{font-size:18px}.support-history{padding:16px;gap:14px}.support-composer{padding:10px 12px}.support-composer textarea{font-size:16px;min-height:62px}.support-limit{display:none}.support-composer-actions{justify-content:space-between}.support-attach,.support-send{min-height:44px}.support-send-hint{display:none}.support-notice{padding:8px 16px}
  .dots-body { padding:8px; }.dots-workspace { display:block; }.dots-sidebar { position:static;max-height:35dvh;border-bottom:1px solid #ccc;margin-bottom:12px; }.dots-conversation { margin-bottom:12px; }.dots-body button { min-height:40px; }.dots-body input,.dots-body textarea { font-size:16px; }.dots-tools dl { grid-template-columns:110px minmax(0,1fr); }.dots-account>span { display:none; }
}
@media(max-height:600px) and (max-width:760px) { .support-panel{bottom:10px;height:calc(100dvh - 20px);z-index:450}.support-notice{display:none}.support-composer textarea{min-height:45px}.support-heading{padding:8px 12px} }
