/* v517T — Useful Guide floating contact hard lock
   Root fix: the Useful Guide cluster had several older floating-contact layers fighting each other.
   This final layer is attached to every Useful Guide/UG resource page via .ug-floating-safe-v517T
   and forces a single non-overlapping layout for WhatsApp, Telegram, and Need Help. */

body.ug-floating-safe-v517T{
  --ug-float-edge:16px;
  --ug-needhelp-width:146px;
  --ug-needhelp-height:44px;
  --ug-icon-size:42px;
  --ug-icon-gap:12px;
  --ug-bottom:16px;
  --ug-dock-left-of-chat:calc(var(--ug-float-edge) + var(--ug-needhelp-width) + 16px);
  padding-bottom:calc(112px + env(safe-area-inset-bottom, 0px)) !important;
}

body.ug-floating-safe-v517T .vge-chatbot-root:not(.is-open){
  position:fixed !important;
  right:var(--ug-float-edge) !important;
  left:auto !important;
  bottom:calc(var(--ug-bottom) + env(safe-area-inset-bottom, 0px)) !important;
  top:auto !important;
  transform:none !important;
  z-index:10090 !important;
}

body.ug-floating-safe-v517T .vge-chatbot-root:not(.is-open) .vge-chatbot-launcher{
  width:var(--ug-needhelp-width) !important;
  min-width:var(--ug-needhelp-width) !important;
  max-width:var(--ug-needhelp-width) !important;
  height:var(--ug-needhelp-height) !important;
  min-height:var(--ug-needhelp-height) !important;
  max-height:var(--ug-needhelp-height) !important;
  padding:0 13px !important;
  border-radius:999px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  white-space:nowrap !important;
}

body.ug-floating-safe-v517T .vge-chatbot-root:not(.is-open) .vge-chatbot-launcher span:last-child{
  display:inline !important;
}

body.ug-floating-safe-v517T .vge-chatbot-root:not(.is-open) .vge-chatbot-launcher-icon{
  width:24px !important;
  min-width:24px !important;
  height:24px !important;
  min-height:24px !important;
  font-size:12px !important;
}

body.ug-floating-safe-v517T .vge-quick-contact-dock-v419G{
  position:fixed !important;
  right:var(--ug-dock-left-of-chat) !important;
  left:auto !important;
  top:auto !important;
  bottom:calc(var(--ug-bottom) + env(safe-area-inset-bottom, 0px)) !important;
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:var(--ug-icon-gap) !important;
  width:auto !important;
  min-width:0 !important;
  max-width:calc(100vw - var(--ug-dock-left-of-chat) - 12px) !important;
  height:auto !important;
  padding:0 !important;
  margin:0 !important;
  transform:none !important;
  z-index:10085 !important;
  pointer-events:auto !important;
}

body.ug-floating-safe-v517T .vge-quick-contact-item-v419G{
  flex:0 0 var(--ug-icon-size) !important;
  width:var(--ug-icon-size) !important;
  min-width:var(--ug-icon-size) !important;
  max-width:var(--ug-icon-size) !important;
  height:var(--ug-icon-size) !important;
  min-height:var(--ug-icon-size) !important;
  max-height:var(--ug-icon-size) !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:0 !important;
  padding:0 !important;
  margin:0 !important;
  overflow:visible !important;
}

body.ug-floating-safe-v517T .vge-quick-contact-label-v419G{
  display:none !important;
}
body.ug-floating-safe-v517T .vge-quick-contact-item-v419G > a.whatsapp-float,
body.ug-floating-safe-v517T .vge-quick-contact-item-v419G > a.telegram-float,
body.ug-floating-safe-v517T .vge-quick-contact-item-v419G > .whatsapp-float,
body.ug-floating-safe-v517T .vge-quick-contact-item-v419G > .telegram-float{
  position:relative !important;
  inset:auto !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  left:auto !important;
  transform:none !important;
  flex:0 0 var(--ug-icon-size) !important;
  width:var(--ug-icon-size) !important;
  min-width:var(--ug-icon-size) !important;
  max-width:var(--ug-icon-size) !important;
  height:var(--ug-icon-size) !important;
  min-height:var(--ug-icon-size) !important;
  max-height:var(--ug-icon-size) !important;
  padding:0 !important;
  margin:0 !important;
  border-radius:999px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
}

body.ug-floating-safe-v517T .whatsapp-text,
body.ug-floating-safe-v517T .telegram-text{
  display:none !important;
}

body.ug-floating-safe-v517T .whatsapp-icon,
body.ug-floating-safe-v517T .telegram-icon{
  width:23px !important;
  min-width:23px !important;
  max-width:23px !important;
  height:23px !important;
  min-height:23px !important;
  max-height:23px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  font-size:12px !important;
  margin:0 !important;
}

/* Hard fallback if the JS dock has not run yet: direct body anchors are spaced manually. */
body.ug-floating-safe-v517T > a.whatsapp-float,
body.ug-floating-safe-v517T > a.telegram-float{
  position:fixed !important;
  top:auto !important;
  left:auto !important;
  bottom:calc(var(--ug-bottom) + env(safe-area-inset-bottom, 0px)) !important;
  width:var(--ug-icon-size) !important;
  min-width:var(--ug-icon-size) !important;
  max-width:var(--ug-icon-size) !important;
  height:var(--ug-icon-size) !important;
  min-height:var(--ug-icon-size) !important;
  max-height:var(--ug-icon-size) !important;
  padding:0 !important;
  margin:0 !important;
  transform:none !important;
  border-radius:999px !important;
  z-index:10085 !important;
  overflow:hidden !important;
}

body.ug-floating-safe-v517T > a.telegram-float{ right:var(--ug-dock-left-of-chat) !important; }
body.ug-floating-safe-v517T > a.whatsapp-float{ right:calc(var(--ug-dock-left-of-chat) + (var(--ug-icon-size) + var(--ug-icon-gap)) * 2) !important; }

@media (max-width: 760px){
  body.ug-floating-safe-v517T{
    --ug-float-edge:8px;
    --ug-needhelp-width:118px;
    --ug-needhelp-height:42px;
    --ug-icon-size:38px;
    --ug-icon-gap:8px;
    --ug-bottom:8px;
    padding-bottom:calc(138px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.ug-floating-safe-v517T .vge-quick-contact-dock-v419G{
    right:8px !important;
    bottom:calc(58px + env(safe-area-inset-bottom, 0px)) !important;
    max-width:calc(100vw - 16px) !important;
  }

  body.ug-floating-safe-v517T > a.telegram-float{ right:8px !important; bottom:calc(58px + env(safe-area-inset-bottom, 0px)) !important; }
body.ug-floating-safe-v517T > a.whatsapp-float{ right:100px !important; bottom:calc(58px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (min-width: 761px) and (max-width: 1180px){
  body.ug-floating-safe-v517T{
    --ug-float-edge:12px;
    --ug-needhelp-width:132px;
    --ug-icon-size:40px;
    --ug-icon-gap:10px;
    --ug-bottom:14px;
  }
}
