/* AIPRO NEURO — ИИ-чат виджет (Этап 2B) */
#aiChatBtn{position:fixed;right:22px;bottom:22px;z-index:180;display:inline-flex;align-items:center;gap:10px;background:#151517;color:#fff;border-radius:100px;padding:13px 20px;font-size:13px;font-weight:700;box-shadow:0 12px 34px #0003;transition:transform .2s}
#aiChatBtn:hover{transform:translateY(-2px)}
.ai-chat-dot{width:8px;height:8px;border-radius:50%;background:#58e08f;box-shadow:0 0 0 4px #58e08f33}
#aiChatPanel{position:fixed;right:22px;bottom:22px;z-index:181;width:min(400px,calc(100vw - 32px));height:min(620px,calc(100vh - 44px));background:#fff;border:1px solid #e4e4e9;border-radius:22px;box-shadow:0 30px 80px #0004;display:flex;flex-direction:column;overflow:hidden}
.ai-chat-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;background:radial-gradient(circle at 70% 20%,#534478,#191722 70%);color:#fff}
.ai-chat-head b{font-size:14px}
.ai-chat-head small{display:block;font-size:10px;color:#c2bcd3;margin-top:2px}
.ai-chat-close{background:#ffffff26;color:#fff;width:28px;height:28px;border-radius:50%;font-size:18px;line-height:1}
.ai-chat-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#f7f7fa}
.ai-msg{max-width:82%;padding:10px 13px;border-radius:15px;font-size:13px;line-height:1.5;white-space:normal;word-wrap:break-word}
.ai-bot{align-self:flex-start;background:#fff;border:1px solid #ececf0;color:#1d1d1f;border-bottom-left-radius:5px}
.ai-user{align-self:flex-end;background:#151517;color:#fff;border-bottom-right-radius:5px}
.ai-note{align-self:center;background:#e9f8f0;color:#2f8a5f;font-size:11px;border-radius:20px;padding:7px 14px;text-align:center;max-width:95%}
.ai-typing{display:flex;gap:4px;align-items:center}
.ai-typing span{width:7px;height:7px;border-radius:50%;background:#bdbcc6;animation:aiBlink 1.2s infinite}
.ai-typing span:nth-child(2){animation-delay:.2s}.ai-typing span:nth-child(3){animation-delay:.4s}
@keyframes aiBlink{0%,60%,100%{opacity:.3}30%{opacity:1}}
.ai-chat-foot{border-top:1px solid #ececf0;padding:12px;background:#fff}
.ai-chat-row{display:flex;align-items:flex-end;gap:8px}
#aiChatInput{flex:1;border:1px solid #dddde4;border-radius:14px;padding:11px 13px;font-size:13px;resize:none;max-height:120px;line-height:1.4;font-family:inherit;color:#1d1d1f;background:#fff}
#aiChatInput.grown{border-radius:14px}
.ai-chat-mic,.ai-chat-send{width:42px;height:42px;border-radius:12px;font-size:17px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center}
.ai-chat-mic{background:#f0f0f3;color:#4a4a52}
.ai-chat-mic.rec{background:#f96167;color:#fff;animation:aiPulse 1s infinite}
@keyframes aiPulse{50%{box-shadow:0 0 0 7px #f9616733}}
.ai-chat-send{background:var(--purple,#7562e6);color:#fff}
.ai-chat-actions{margin-top:9px;text-align:center}
.ai-chat-op{background:transparent;color:#7562e6;font-size:11px;font-weight:600;text-decoration:underline}
.ai-cta-wrap{display:flex;justify-content:center}
.ai-cta{background:var(--purple,#7562e6);color:#fff;border-radius:12px;padding:11px 16px;font-size:12px;font-weight:700;max-width:90%}
@media(max-width:520px){#aiChatPanel{right:8px;bottom:8px;width:calc(100vw - 16px);height:calc(100vh - 16px);border-radius:16px}#aiChatBtn{right:14px;bottom:14px}}
