/* Unified floating dock: Scroll-to-top + Telegram feedback (@BranhamRuBot) */
#bsDock.bs-dock{
  --bsd-bg:var(--rd-surface,rgba(255,255,255,.92));
  --bsd-fg:var(--rd-text,#1e293b);
  --bsd-bd:var(--rd-line,rgba(15,23,42,.12));
  --bsd-sh:var(--rd-shadow,0 8px 24px rgba(15,23,42,.14));
  position:fixed;
  right:max(14px,env(safe-area-inset-right,0px));
  bottom:calc(var(--bs-dock-b,16px) + env(safe-area-inset-bottom,0px));
  z-index:900;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  pointer-events:none;
  transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .25s ease,bottom .25s ease;
}
#bsDock.bs-dock.is-tucked{
  opacity:.28;
  transform:translateY(10px) scale(.9);
}
#bsDock.bs-dock:hover,#bsDock.bs-dock:focus-within{
  opacity:1;
  transform:none;
}
#bsDock .bs-dock-btn,
#bsDock #up-button,
#bsDock #open-chat{
  pointer-events:auto;
  position:relative;
  inset:auto;
  margin:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:42px;
  min-width:42px;
  width:auto;
  border-radius:999px;
  border:1px solid var(--bsd-bd);
  background:var(--bsd-bg);
  color:var(--bsd-fg)!important;
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  backdrop-filter:saturate(180%) blur(14px);
  box-shadow:var(--bsd-sh);
  text-decoration:none!important;
  cursor:pointer;
  padding:0;
  font:600 13.5px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  transition:transform .2s,box-shadow .2s,background-color .2s,padding .25s,opacity .2s;
}
#bsDock .bs-dock-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(15,23,42,.22);
}
#bsDock .bs-dock-btn:active{transform:scale(.94)}
#bsDock .bs-dock-btn:focus-visible{outline:2px solid var(--rd-accent,#2f6bff);outline-offset:2px}
#bsDock .bs-dock-btn::after{content:"";position:absolute;inset:-3px}

#bsDock #up-button.bs-dock-up{
  width:42px;
  opacity:0;
  transform:translateY(8px) scale(.85);
  pointer-events:none;
}
#bsDock #up-button.bs-dock-up.show{
  opacity:1;
  transform:none;
  pointer-events:auto;
}
#bsDock #up-button.bs-dock-up svg{
  width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;
}

#bsDock #open-chat.bs-dock-tg{padding:0 9px;gap:0}
#bsDock .bs-dock-ico{
  width:24px;height:24px;border-radius:50%;
  background:linear-gradient(135deg,#2aabee,#229ed9);
  color:#fff;display:inline-grid;place-items:center;flex:none;
  box-shadow:0 2px 6px rgba(34,158,217,.35);
}
#bsDock .bs-dock-ico svg{width:14px;height:14px;fill:currentColor;transform:translateX(-1px)}
#bsDock .bs-dock-lbl{
  display:inline-block;
  max-width:0;
  overflow:hidden;
  white-space:nowrap;
  opacity:0;
  font-size:13px;
  transition:max-width .28s cubic-bezier(.2,.8,.2,1),opacity .2s,margin .25s;
}
@media (hover:hover) and (min-width:768px){
  #bsDock #open-chat.bs-dock-tg:hover,
  #bsDock #open-chat.bs-dock-tg:focus-visible{padding:0 14px 0 9px}
  #bsDock #open-chat.bs-dock-tg:hover .bs-dock-lbl,
  #bsDock #open-chat.bs-dock-tg:focus-visible .bs-dock-lbl{max-width:160px;opacity:1;margin-left:8px}
}
@media (max-width:767.98px),(pointer:coarse){
  #bsDock.bs-dock{right:max(12px,env(safe-area-inset-right,0px));--bs-dock-b:12px}
  #bsDock .bs-dock-btn,#bsDock #up-button,#bsDock #open-chat{height:40px;min-width:40px}
  #bsDock #up-button.bs-dock-up{width:40px}
  #bsDock #open-chat.bs-dock-tg{padding:0 8px}
  #bsDock .bs-dock-lbl{display:none}
}
body.has-audio-bar #bsDock.bs-dock,#bsDock.bs-dock.is-lifted{--bs-dock-b:98px}
@media (prefers-reduced-motion:reduce){#bsDock.bs-dock,#bsDock .bs-dock-btn,#bsDock .bs-dock-lbl{transition:none!important}}
@media print{#bsDock.bs-dock{display:none!important}}
