/* Окно ИИ-помощника внизу страницы. Свои классы botk-, ничего общего с блоками сайта. */
.botk-launcher{
  position:fixed;right:20px;bottom:20px;z-index:9000;
  width:56px;height:56px;border-radius:50%;border:0;padding:0;cursor:pointer;
  background:#e8e9f0;color:#08080a;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 30px rgba(0,0,0,.45),0 2px 6px rgba(0,0,0,.3);
  transition:transform .18s cubic-bezier(.22,1,.36,1),box-shadow .18s;
  margin:0 0 env(safe-area-inset-bottom,0) 0;
}
.botk-launcher:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(0,0,0,.5)}
.botk-launcher:active{transform:translateY(0) scale(.97)}
.botk-launcher:focus-visible{outline:2px solid #e8e9f0;outline-offset:3px}
.botk-launcher svg{width:26px;height:26px;display:block}
.botk-launcher[hidden]{display:none}
.botk-launcher .botk-dot{
  position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;
  background:#08080a;
}
.botk-launcher.botk-ready .botk-dot{display:none}

.botk-panel{
  position:fixed;right:20px;bottom:88px;z-index:9001;
  width:372px;max-width:calc(100vw - 40px);
  height:min(560px,calc(100vh - 120px));
  background:#101014;color:#e8e9f0;
  border:1px solid rgba(255,255,255,.12);border-radius:18px;
  box-shadow:0 24px 60px rgba(0,0,0,.6);
  display:flex;flex-direction:column;overflow:hidden;
  font-family:inherit;
  opacity:0;transform:translateY(10px) scale(.99);pointer-events:none;
  transition:opacity .18s ease-out,transform .22s cubic-bezier(.22,1,.36,1);
}
.botk-panel[data-open="1"]{opacity:1;transform:none;pointer-events:auto}
.botk-panel[hidden]{display:none}

.botk-head{
  display:flex;align-items:center;gap:10px;padding:12px 10px 12px 16px;
  border-bottom:1px solid rgba(255,255,255,.1);background:#16161b;flex:none;
}
.botk-head-t{flex:1;min-width:0}
.botk-head-t b{display:block;font-size:16px;font-weight:600;line-height:1.25;letter-spacing:-.01em}
.botk-head-t span{display:block;font-size:14px;color:#9a9dab;line-height:1.3;margin-top:2px}
.botk-x{
  flex:none;width:40px;height:40px;border-radius:10px;border:0;background:transparent;
  color:#e8e9f0;cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background .15s;
}
.botk-x:hover{background:rgba(255,255,255,.08)}
.botk-x:focus-visible{outline:2px solid #e8e9f0;outline-offset:2px}

.botk-log{
  flex:1;overflow-y:auto;overscroll-behavior:contain;padding:16px;
  display:flex;flex-direction:column;gap:10px;scrollbar-width:thin;
}
.botk-msg{
  max-width:86%;padding:10px 13px;border-radius:14px;font-size:16px;line-height:1.45;
  white-space:pre-wrap;overflow-wrap:anywhere;
  animation:botk-in .18s ease-out both;
}
.botk-msg.botk-bot{
  align-self:flex-start;background:#1d1d24;border:1px solid rgba(255,255,255,.08);
  border-bottom-left-radius:5px;
}
.botk-msg.botk-bot a{
  color:#e8e9f0;text-decoration:underline;text-underline-offset:2px;
  word-break:break-word;
}
.botk-msg.botk-bot a:hover{color:#fff}
.botk-msg.botk-me{
  align-self:flex-end;background:#e8e9f0;color:#08080a;border-bottom-right-radius:5px;
}
.botk-note{
  align-self:center;font-size:14px;color:#9a9dab;text-align:center;
  line-height:1.4;max-width:90%;padding:2px 0;
}
.botk-note a{color:#e8e9f0;text-decoration:underline;text-underline-offset:2px}
@keyframes botk-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.botk-typing{align-self:flex-start;display:flex;gap:4px;padding:13px 14px;background:#1d1d24;
  border:1px solid rgba(255,255,255,.08);border-radius:14px;border-bottom-left-radius:5px}
.botk-typing i{width:6px;height:6px;border-radius:50%;background:#9a9dab;animation:botk-blink 1.05s infinite}
.botk-typing i:nth-child(2){animation-delay:.16s}
.botk-typing i:nth-child(3){animation-delay:.32s}
@keyframes botk-blink{0%,60%,100%{opacity:.28;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}

.botk-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 10px;flex:none}
.botk-chip{
  border:1px solid rgba(255,255,255,.16);background:transparent;color:#e8e9f0;
  font:inherit;font-size:14px;line-height:1;padding:9px 11px;border-radius:999px;
  cursor:pointer;transition:background .15s,border-color .15s;
}
.botk-chip:hover{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.3)}
.botk-chips[hidden]{display:none}

.botk-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px 12px;flex:none;
  border-top:1px solid rgba(255,255,255,.1);background:#16161b}
.botk-in{
  flex:1;min-height:42px;max-height:120px;resize:none;border-radius:11px;
  border:1px solid rgba(255,255,255,.14);background:#0d0d11;color:#e8e9f0;
  font:inherit;font-size:16px;line-height:1.35;padding:10px 12px;margin:0;
  overflow-y:auto;
}
.botk-in::placeholder{color:#7c7f8c}
.botk-in:focus{outline:none;border-color:rgba(255,255,255,.4)}
.botk-send{
  flex:none;width:42px;height:42px;border-radius:11px;border:0;cursor:pointer;
  background:#e8e9f0;color:#08080a;display:flex;align-items:center;justify-content:center;
  transition:opacity .15s,transform .15s;
}
.botk-send:hover{transform:translateY(-1px)}
.botk-send:disabled{opacity:.45;cursor:default;transform:none}
.botk-send:focus-visible{outline:2px solid #e8e9f0;outline-offset:2px}
.botk-send svg{width:20px;height:20px}
.botk-foot{flex:none;text-align:center;font-size:14px;color:#7c7f8c;padding:0 14px 10px;background:#16161b;line-height:1.42}
.botk-foot a{color:#9a9dab;text-decoration:underline;text-underline-offset:2px}
.botk-foot a:hover{color:#e8e9f0}

@media (max-width:560px){
  .botk-launcher{right:14px;bottom:14px;width:52px;height:52px}
  .botk-panel{
    right:0;left:0;bottom:0;top:0;width:auto;max-width:none;height:auto;
    border-radius:0;border:0;
  }
  .botk-head{padding-top:calc(12px + env(safe-area-inset-top,0))}
  .botk-form{padding-bottom:calc(12px + env(safe-area-inset-bottom,0))}
  .botk-msg{max-width:90%;font-size:16px}
}
@media (prefers-reduced-motion:reduce){
  .botk-launcher,.botk-panel,.botk-msg,.botk-send{transition:none;animation:none}
  .botk-typing i{animation:none;opacity:.6}
}
