/* Помощник БАГУЛ: плавающая кнопка и окно чата. Цвета только из tokens.css. */
.bot-launcher{position:fixed;right:24px;bottom:24px;z-index:900;display:flex;align-items:center;gap:10px;height:56px;padding:0 20px 0 16px;border:1px solid var(--green);border-radius:999px;background:var(--green);color:var(--bg);font-family:var(--font-body);font-size:.9375rem;font-weight:600;cursor:pointer;box-shadow:0 14px 34px -14px color-mix(in srgb,var(--green) 70%,transparent);transition:transform .25s ease,box-shadow .25s ease,opacity .25s ease}
.bot-launcher:hover{transform:translateY(-2px)}
.bot-launcher:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.bot-launcher svg{flex-shrink:0}
.bot-launcher.is-hidden{opacity:0;pointer-events:none;transform:translateY(12px)}
.bot-teaser{position:fixed;right:24px;bottom:92px;z-index:900;display:flex;align-items:flex-start;gap:10px;max-width:300px;padding:12px 36px 12px 12px;border:1px solid var(--green);border-radius:14px 14px 4px 14px;background:var(--panel);color:var(--ink);font-size:.875rem;line-height:1.45;box-shadow:0 22px 50px -18px #000,0 0 0 4px color-mix(in srgb,var(--green) 14%,transparent);opacity:0;transform:translateY(10px) scale(.96);transform-origin:bottom right;transition:opacity .3s ease,transform .35s cubic-bezier(.2,.8,.2,1.2);pointer-events:none}
.bot-teaser.is-shown{opacity:1;transform:none;pointer-events:auto;cursor:pointer}
.bot-teaser-avatar{width:36px;height:36px;border-radius:9px;flex-shrink:0}
.bot-teaser-text{display:flex;flex-direction:column;gap:3px}
.bot-teaser-text strong{font-size:.9375rem}
.bot-teaser-text span{color:var(--ink-muted)}
.bot-teaser-text .bot-teaser-cta{align-self:flex-start;margin-top:6px;padding:7px 14px;border-radius:999px;background:var(--green);color:var(--bg);font-weight:600;font-size:.8125rem}
.bot-teaser-close{position:absolute;top:4px;right:4px;width:32px;height:32px;border:0;background:transparent;color:var(--ink-muted);cursor:pointer;font-size:20px;line-height:1}
.bot-launcher.bot-attn:after{content:"";position:absolute;inset:-1px;border-radius:inherit;border:2px solid var(--green);opacity:0;pointer-events:none}
.bot-launcher{position:fixed}
@media (prefers-reduced-motion:no-preference){
  .bot-launcher.bot-attn:after{animation:bot-ring 2.4s ease-out infinite}
  .bot-teaser.is-shown .bot-teaser-avatar{animation:bot-wave 1.2s ease-in-out .4s 2}
}
@keyframes bot-ring{0%{opacity:.9;transform:scale(1)}80%,100%{opacity:0;transform:scale(1.35,1.6)}}
@keyframes bot-wave{0%,100%{transform:rotate(0)}25%{transform:rotate(-10deg)}75%{transform:rotate(10deg)}}

.bot-panel{position:fixed;right:24px;bottom:24px;z-index:901;display:flex;flex-direction:column;width:min(400px,calc(100vw - 32px));height:min(620px,calc(100dvh - 120px));border:1px solid var(--line);border-radius:14px;background:var(--bg);color:var(--ink);box-shadow:0 30px 70px -30px #000;overflow:hidden;opacity:0;transform:translateY(16px) scale(.98);transform-origin:bottom right;pointer-events:none;transition:opacity .25s ease,transform .3s cubic-bezier(.2,.7,.2,1)}
.bot-panel.is-open{opacity:1;transform:none;pointer-events:auto}
.bot-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;border-bottom:1px solid var(--line);background:var(--panel)}
.bot-avatar{width:38px;height:38px;border-radius:10px;flex-shrink:0}
.bot-title{margin:0;font-size:1rem;font-weight:600;line-height:1.2}
.bot-status{margin:2px 0 0;font-size:.75rem;color:var(--ink-muted);display:flex;align-items:center;gap:6px}
.bot-status:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--green)}
.bot-close{margin-left:auto;width:40px;height:40px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink);cursor:pointer;display:grid;place-items:center}
.bot-close:hover{border-color:var(--green)}

.bot-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.bot-msg{max-width:88%;padding:10px 13px;border-radius:14px;font-size:.9375rem;line-height:1.55;animation:bot-in .3s ease-out both;white-space:pre-line}
.bot-msg.from-bot{align-self:flex-start;background:var(--panel);border:1px solid var(--line);border-bottom-left-radius:4px}
.bot-msg.from-user{align-self:flex-end;background:var(--green-deep);color:var(--ink);border-bottom-right-radius:4px}
.bot-msg a{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.bot-typing{align-self:flex-start;display:flex;gap:4px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;border-bottom-left-radius:4px;background:var(--panel)}
.bot-typing span{width:6px;height:6px;border-radius:50%;background:var(--ink-muted);animation:bot-dot 1s ease-in-out infinite}
.bot-typing span:nth-child(2){animation-delay:.15s}.bot-typing span:nth-child(3){animation-delay:.3s}

.bot-cards{align-self:stretch;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;animation:bot-in .3s ease-out both}
.bot-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--panel);display:flex;flex-direction:column}
.bot-card img{width:100%;aspect-ratio:1.5;object-fit:cover;display:block;background:var(--bg)}
.bot-card-body{padding:10px;display:flex;flex-direction:column;gap:4px;flex:1}
.bot-card-name{margin:0;font-family:var(--font-display);font-size:1.0625rem}
.bot-card-price{margin:0;font-size:.8125rem;color:var(--ink-muted)}
.bot-card-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:6px}
.bot-card-actions button{flex:1 1 auto;white-space:nowrap;min-height:34px;padding:0 6px;border-radius:6px;font-size:.75rem;font-weight:600;cursor:pointer;border:1px solid var(--line);background:transparent;color:var(--ink)}
.bot-card-actions button.primary{background:var(--green);border-color:var(--green);color:var(--bg)}

.bot-chips{display:flex;flex-wrap:wrap;gap:6px;padding:4px 14px 10px}
.bot-chips button{min-height:36px;padding:6px 12px;border:1px solid color-mix(in srgb,var(--green) 60%,var(--line));border-radius:999px;background:transparent;color:var(--ink);font-size:.8125rem;cursor:pointer;transition:background-color .2s,border-color .2s;animation:bot-in .3s ease-out both}
.bot-chips button:hover,.bot-chips button:focus-visible{background:color-mix(in srgb,var(--green) 18%,transparent);border-color:var(--green)}

.bot-form{display:flex;gap:8px;padding:10px 12px 12px;border-top:1px solid var(--line);background:var(--panel)}
.bot-form input{flex:1;min-width:0;height:44px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font:inherit;font-size:16px}
.bot-form input:focus{outline:none;border-color:var(--green)}
.bot-form button{width:44px;height:44px;border:0;border-radius:10px;background:var(--green);color:var(--bg);cursor:pointer;display:grid;place-items:center;flex-shrink:0}
.bot-note{margin:0;padding:0 14px 10px;font-size:.6875rem;color:var(--ink-muted);background:var(--panel)}

@keyframes bot-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes bot-dot{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}

@media (max-width:600px){
  .bot-launcher{right:16px;bottom:16px;width:56px;height:56px;padding:0;justify-content:center}
  .bot-launcher .bot-launcher-text{display:none}
  .bot-launcher.is-scrolling{opacity:0;pointer-events:none;transform:translateY(10px)}
  .bot-teaser-close{width:40px;height:40px;top:2px;right:2px}
  .bot-teaser{right:16px;left:16px;bottom:80px;max-width:none;font-size:.9375rem;padding:14px 40px 14px 14px}
  .bot-teaser-text .bot-teaser-cta{font-size:.875rem;padding:9px 16px}
  .bot-panel{right:0;bottom:0;width:100vw;height:min(88dvh,680px);border-radius:16px 16px 0 0;border-bottom:0}
}
@media (prefers-reduced-motion:reduce){
  .bot-msg,.bot-cards,.bot-chips button{animation:none}
  .bot-typing span{animation:none;opacity:.6}
}

/* Компьютер: круглая кнопка в правом поле, подпись выезжает при наведении (правка 14.10.2026) */
@media (min-width:601px){
  .bot-launcher{right:16px;bottom:20px;height:56px;min-width:56px;padding:0 17px;gap:0;justify-content:flex-start;overflow:hidden}
  .bot-launcher .bot-launcher-text{max-width:0;opacity:0;white-space:nowrap;transition:max-width .35s ease,opacity .25s ease,margin .35s ease}
  .bot-launcher:hover .bot-launcher-text,.bot-launcher:focus-visible .bot-launcher-text{max-width:180px;opacity:1;margin-left:10px}
  .bot-launcher.is-scrolling{opacity:0;pointer-events:none;transform:translateY(10px)}
  .bot-teaser{right:16px;bottom:88px}
}
