/* Neal Roofing — back-to-top button (location pages + /locations hub).
   Self-contained. Pair with back-to-top.js. No libraries. */
.nr-btt{
  --nr-btt-navy:rgb(0,35,80);
  --nr-btt-blue:rgb(5,132,254);
  position:fixed;
  z-index:40;
  /* Clear mobile sticky call bars / chat widgets (~64–72px) + safe-area */
  right:max(16px,env(safe-area-inset-right,0px));
  bottom:max(96px,calc(80px + env(safe-area-inset-bottom,0px)));
  width:48px;height:48px;min-width:44px;min-height:44px;
  padding:0;margin:0;border:0;border-radius:999px;
  background:var(--nr-btt-navy);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  box-shadow:0 8px 24px rgba(0,35,80,.28);
  cursor:pointer;-webkit-tap-highlight-color:transparent;
  opacity:0;visibility:hidden;pointer-events:none;
  transform:translateY(8px);
  transition:opacity .2s ease,visibility .2s ease,transform .2s ease,background-color .15s ease,box-shadow .15s ease;
}
.nr-btt.is-visible{opacity:1;visibility:visible;pointer-events:auto;transform:none}
.nr-btt:hover,.nr-btt:focus-visible{background:var(--nr-btt-blue)}
.nr-btt:focus{outline:none}
.nr-btt:focus-visible{
  outline:3px solid var(--nr-btt-blue);
  outline-offset:3px;
  box-shadow:0 8px 24px rgba(5,132,254,.35);
}
.nr-btt svg{width:22px;height:22px;display:block;pointer-events:none}
/* St. Petersburg's mobile bar is two lines ("Calls answered 24/7"), about 108px.
   The default 96px offset overlaps it. Lift only that case. */
@media (max-width:700px){
  body:has(.mcta .calls-247) .nr-btt{
    bottom:max(124px,calc(112px + env(safe-area-inset-bottom,0px)));
  }
}
@media (min-width:701px){
  .nr-btt{
    right:max(24px,env(safe-area-inset-right,0px));
    bottom:max(24px,env(safe-area-inset-bottom,0px));
  }
}
@media (prefers-reduced-motion:reduce){
  .nr-btt{transition:none}
}
