diff --git a/frontend/js/assistant.js b/frontend/js/assistant.js index 49be345..563f034 100644 --- a/frontend/js/assistant.js +++ b/frontend/js/assistant.js @@ -186,7 +186,10 @@ if (document.getElementById('asst-style')) return; var s = document.createElement('style'); s.id = 'asst-style'; s.textContent = [ - '.asst-root{position:fixed;left:18px;bottom:18px;z-index:8500;font-family:Manrope,system-ui,sans-serif;}', + '.asst-root{position:fixed;left:18px;bottom:18px;z-index:8500;font-family:Manrope,system-ui,sans-serif;transition:left .28s cubic-bezier(.4,0,.2,1);}', + // в приложении сдвигаем правее сайдбара (230/62px), чтобы не перекрывать профиль в сайдбаре + '.app-layout ~ .asst-root{left:248px;}', + '.app-layout.sb-collapsed ~ .asst-root{left:80px;}', '.asst-fab{width:54px;height:54px;border-radius:50%;border:none;background:#fff;cursor:pointer;padding:4px;', ' box-shadow:0 8px 24px rgba(139,92,246,.32);transition:transform .15s;position:relative;display:block;}', '.asst-fab:hover{transform:translateY(-2px) scale(1.04);}', @@ -215,7 +218,8 @@ '.asst-ans-q{font-weight:700;color:#0F172A;margin-bottom:2px;}', '.asst-ans-link{display:inline-block;margin-top:4px;color:#9B5DE5;font-weight:700;font-size:.78rem;text-decoration:none;}', '.asst-empty{font-size:.82rem;color:#8a94a6;padding:6px 0;}', - '@media(max-width:640px){.asst-root{left:12px;bottom:72px;}.asst-fab{width:48px;height:48px;}}', + // на мобиле сайдбар — выезжающая шторка, контент во всю ширину → к левому краю + '@media(max-width:768px){.asst-root,.app-layout ~ .asst-root,.app-layout.sb-collapsed ~ .asst-root{left:12px;bottom:18px;}.asst-fab{width:48px;height:48px;}}', ].join(''); document.head.appendChild(s); }