/* COGSUN back-to-top: warm-white circle + deep-olive up arrow + olive scroll-progress ring.
   Matches the site palette (cream #fffdf7 / cream border #e3dbc8 / deep olive #3a4a2a).
   Overrides Avada's default #toTop black square. The ring/arrow are injected as SVG by totop.js. */
#toTop.fusion-top-top-link,
#toTop.fusion-top-top-link.fusion-to-top-active {
  position: fixed !important;
  right: 24px !important;
  bottom: 30px !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  line-height: 1 !important;
  background: #fffdf7 !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: 0 3px 14px rgba(58, 74, 42, .20) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity .25s ease, visibility .25s ease, transform .15s ease !important;
  z-index: 100050 !important;
  padding: 0 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#toTop.fusion-top-top-link.cg-totop-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
#toTop.fusion-top-top-link:hover { transform: translateY(-2px) !important; background: #fffdf7 !important; box-shadow: 0 5px 18px rgba(58, 74, 42, .26) !important; }

/* hide the theme's default icon glyph; SVG supplies both ring and arrow */
#toTop.fusion-top-top-link.cg-totop::before,
#toTop.fusion-top-top-link.cg-totop::after { content: none !important; display: none !important; }

#toTop .cg-totop-svg {
  position: absolute;
  top: 0; left: 0;
  width: 52px; height: 52px;
  pointer-events: none;
}

@media (max-width: 768px) {
  /* Avada hides the whole container on small screens - keep our button visible */
  .to-top-container { display: block !important; }
  #toTop.fusion-top-top-link.cg-totop { right: 14px !important; bottom: 20px !important; }
}
