/* ==========================================================================
   Scroll to top
   Styles the Astra scroll-to-top button rendered by
   template-parts/scroll-to-top.php (child override).

   Astra's addon JS writes display:none / display:block straight onto the
   element's style attribute, so the box cannot be a flex container — an
   inline style outranks any rule here short of !important, and !important
   would pin the button permanently visible. The chevron is therefore centred
   with absolute positioning against the button, which Astra already sets to
   position: fixed. No padding maths, and it holds at every breakpoint.
   ========================================================================== */

#ast-scroll-top {
  /* Astra's addon CSS already sets this; repeated so the centring below does
     not silently depend on it. */
  position: fixed;
  width: 48px;
  height: 48px;
  padding: 0;
  background-color: var(--burnt-orange);
  border-radius: var(--radius-8);
  color: var(--white);
}

#ast-scroll-top svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  /* Overrides Astra's own translate/rotate on the icon it normally renders. */
  transform: translate(-50%, -50%);
}

@media (max-width: 1179px) {
  #ast-scroll-top {
    width: 40px;
    height: 40px;
  }

  #ast-scroll-top svg {
    width: 22px;
    height: 22px;
  }

  .ast-scroll-to-top-right {
    right: 20px;
    bottom: 20px;
  }
}

@media (max-width: 767px) {
  #ast-scroll-top {
    width: 32px;
    height: 32px;
  }

  #ast-scroll-top svg {
    width: 20px;
    height: 20px;
  }
}
