#wm-page-scroll {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #9adbe4;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(23, 74, 126, 0.22);
}

#wm-page-scroll .wm-scroll-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  box-sizing: border-box;
  font: inherit;
  line-height: 1;
  color: #174A7E;
  background: #ffffff;
  border: 1px solid #9adbe4;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#wm-page-scroll .wm-scroll-button:hover:not(:disabled) {
  background: #D2F9F6;
  border-color: #6FC9D6;
  color: #174A7E;
}

#wm-page-scroll .wm-scroll-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #174A7E;
}

#wm-page-scroll .wm-scroll-button:disabled {
  opacity: 0.4;
  cursor: default;
}

#wm-page-scroll .wm-scroll-button svg {
  display: block;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

@media (max-width: 480px) {
  #wm-page-scroll {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

body:has(dialog[open]) #wm-page-scroll,
html:has(:fullscreen) #wm-page-scroll {
  display: none;
}

/* Keeps the fixed pill from covering the last line of footer text. */
body > footer::after {
  content: '';
  display: block;
  height: 80px;
}

@media print {
  #wm-page-scroll {
    display: none !important;
  }

  body > footer::after {
    display: none !important;
  }
}

@media (max-width: 1099px), (hover: none), (pointer: coarse) {
  #wm-page-scroll {
    display: none !important;
  }

  body > footer::after {
    display: none !important;
  }
}
