/* Mwalimu-Swap assistant: original compact launcher, restrained support panel. */
#assistBtn{
  position:fixed;right:18px;bottom:18px;width:56px;height:56px;border-radius:999px;
  background:#111;color:#fff;display:grid;place-items:center;
  font-family:Inter,Arial,sans-serif;font-weight:700;font-size:22px;cursor:pointer;z-index:9998;
  box-shadow:0 8px 24px rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.12);
  transition:transform .15s ease,background .15s ease
}
#assistBtn:hover{transform:translateY(-1px);background:#242424}
#assistBtn:focus-visible,#assistClose:focus-visible,#assistSend:focus-visible,#assistInput:focus-visible{outline:2px solid #a58a60;outline-offset:3px}
#assistBox{
  position:fixed;right:18px;bottom:86px;width:380px;max-width:calc(100vw - 28px);
  height:min(560px,74vh);max-height:calc(100dvh - 108px);min-height:280px;
  background:#fbfaf6;color:#252923;border:1px solid #ded9ce;border-radius:14px;z-index:9999;
  display:flex;flex-direction:column;overflow:hidden;box-shadow:0 18px 48px rgba(20,28,22,.2);
  font-family:Inter,Arial,sans-serif
}
.assist-head{
  display:flex;justify-content:space-between;align-items:center;gap:12px;flex:0 0 auto;
  min-height:58px;padding:12px 14px 12px 18px;border-bottom:1px solid #e7e2d8;
  background:#f4f1e9;color:#252923;font-family:Georgia,'Times New Roman',serif;
  font-size:16px;font-weight:600;line-height:1.25
}
.assist-head b{display:block;min-width:0;font-weight:600}
#assistClose{
  appearance:none;-webkit-appearance:none;flex:0 0 32px;width:32px;height:32px;margin:0;padding:0;
  display:grid;place-items:center;border:1px solid #d9d3c7;border-radius:50%;
  background:transparent;color:#4b5048;font:400 21px/1 Arial,sans-serif;cursor:pointer
}
#assistClose:hover{background:#eae6dc;border-color:#c8c0b1}
#assistMsgs{padding:17px;overflow:auto;flex:1;min-height:0;display:flex;flex-direction:column;gap:11px;background:#fbfaf6;overscroll-behavior:contain}
.a-msg{padding:11px 14px;border-radius:12px;font-size:13px;line-height:1.6;max-width:86%;font-family:Inter,Arial,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere}
.a-msg.bot{background:#f0eee7;border:1px solid #e6e1d6;align-self:flex-start;color:#292d27;border-bottom-left-radius:4px}
.a-msg.me{background:#31483b;color:#fff;align-self:flex-end;border-bottom-right-radius:4px;border:1px solid #31483b}
.assist-input-row{display:grid!important;grid-template-columns:minmax(0,1fr) 66px!important;align-items:center!important;gap:9px!important;flex:0 0 auto;padding:12px!important;border-top:1px solid #e7e2d8!important;background:#fff!important}
#assistInput{width:100%!important;min-width:0!important;height:42px!important;grid-column:1!important;border:1px solid #ded9ce!important;border-radius:7px!important;padding:0 12px!important;font:13px Inter,Arial,sans-serif!important;background:#fff!important;color:#252923!important;outline:none!important}
#assistInput::placeholder{color:#918e84}
#assistInput:focus{border-color:#71816f!important;box-shadow:0 0 0 2px rgba(83,100,81,.12)!important}
#assistSend{grid-column:2!important;width:66px!important;min-width:66px!important;height:42px!important;padding:0!important;border:1px solid #31483b!important;background:#31483b!important;color:#fff!important;border-radius:7px!important;font:600 12px Inter,Arial,sans-serif!important;cursor:pointer!important}
#assistSend:hover{background:#263b31!important}
#assistSend:active{transform:scale(.98)}
.assist-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;flex:0 0 auto;text-align:left;font:10px/1.4 Inter,Arial,sans-serif;color:#77766f;padding:9px 14px;border-top:1px solid #eeeae2;background:#f7f5ef}
.assist-foot a{color:#405744;font-weight:650;text-decoration:none;white-space:nowrap}
.assist-foot a:hover{text-decoration:underline;text-underline-offset:2px}
.a-msg.typing{opacity:.55;letter-spacing:.2em;animation:aBlink 1.1s infinite}
@keyframes aBlink{0%,100%{opacity:.25}50%{opacity:.8}}
.a-chips{display:flex;flex-wrap:wrap;gap:7px}
.a-chip{font:12px Inter,Arial,sans-serif;padding:7px 11px;border-radius:5px;border:1px solid #cfc8ba;background:#fff;color:#34483a;cursor:pointer;text-align:left}
.a-chip:hover{background:#f0eee7;border-color:#8a927f}
.a-links{display:flex;flex-wrap:wrap;gap:7px}
.a-link{font:600 12px Inter,Arial,sans-serif;padding:7px 11px;border-radius:5px;border:1px solid #31483b;background:#31483b;color:#fff;text-decoration:none}
.a-link:hover{background:#263b31}
.a-fb{font:11px Inter,Arial,sans-serif;color:#77766f}
.a-fb button{background:none;border:0;text-decoration:underline;cursor:pointer;color:#405744;font:inherit;padding:2px 6px}
html[data-theme="dark"] #assistBtn{background:#fff;color:#111;border-color:rgba(0,0,0,.08);box-shadow:0 8px 24px rgba(0,0,0,.45)}
html[data-theme="dark"] #assistBtn:hover{background:#ececec}
html[data-theme="dark"] #assistBox{background:#20231f;color:#eee9df;border-color:#45483e;box-shadow:0 18px 48px rgba(0,0,0,.55)}
html[data-theme="dark"] .assist-head{background:#292d27;color:#eee9df;border-color:#42473d}
html[data-theme="dark"] #assistClose{color:#eee9df;border-color:#55594e}
html[data-theme="dark"] #assistClose:hover{background:#3a4037}
html[data-theme="dark"] #assistMsgs{background:#20231f}
html[data-theme="dark"] .a-msg.bot{background:#2c3029;color:#eee9df;border-color:#45483e}
html[data-theme="dark"] .a-msg.me{background:#d6c29b;color:#20231f;border-color:#d6c29b}
html[data-theme="dark"] .assist-input-row{background:#292d27!important;border-color:#42473d!important}
html[data-theme="dark"] #assistInput{background:#20231f!important;color:#eee9df!important;border-color:#55594e!important}
html[data-theme="dark"] #assistInput::placeholder{color:#9c9b90}
html[data-theme="dark"] #assistSend{background:#d6c29b!important;color:#20231f!important;border-color:#d6c29b!important}
html[data-theme="dark"] .assist-foot{background:#292d27;color:#bdb8aa;border-color:#42473d}
html[data-theme="dark"] .assist-foot a{color:#e8ddc8}
html[data-theme="dark"] .a-chip{background:#292d27;color:#e8ddc8;border-color:#74694f}
html[data-theme="dark"] .a-chip:hover{background:#3b4037}
html[data-theme="dark"] .a-link{background:#d6c29b;color:#20231f;border-color:#d6c29b}
html[data-theme="dark"] .a-fb{color:#bdb8aa}
html[data-theme="dark"] .a-fb button{color:#e8ddc8}
@media(max-width:480px){
  #assistBox{right:12px;left:12px;bottom:82px;width:auto;max-width:none;height:min(560px,calc(100dvh - 104px));max-height:calc(100dvh - 104px);min-height:240px;border-radius:12px}
  #assistBtn{right:16px;bottom:16px;width:54px;height:54px}
  .assist-head{min-height:54px;padding:10px 12px 10px 15px}
  #assistMsgs{padding:13px;gap:9px}
  .assist-input-row{grid-template-columns:minmax(0,1fr) 62px!important;gap:7px!important;padding:10px!important}
  #assistSend{width:62px!important;min-width:62px!important}
  .assist-foot{padding:8px 11px}
}
@media(max-height:520px) and (max-width:700px){#assistBox{height:calc(100dvh - 92px);max-height:calc(100dvh - 92px);bottom:76px}}
@media(prefers-reduced-motion:reduce){#assistBtn,#assistBox,#assistMsgs{scroll-behavior:auto;transition:none}.a-msg.typing{animation:none}}
