/* BeTheme #back_to_top - TFL dashboard restyle (do not fork BeTheme) */

a#back_to_top.button.footer_button {
  width: 44px;
  height: 44px;
  padding: 0 !important;
  margin-left: 0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--tfld-accent, #18c7c3) 42%, transparent) !important;
  background:
    radial-gradient(120% 80% at 28% 0%, color-mix(in srgb, var(--tfld-accent, #18c7c3) 22%, transparent), transparent 58%),
    rgba(11, 15, 23, 0.94) !important;
  background-color: rgba(11, 15, 23, 0.94) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 0 0 1px color-mix(in srgb, var(--tfld-accent, #18c7c3) 16%, transparent),
    0 8px 22px rgba(0, 0, 0, 0.42);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
  font-size: 20px !important;
  color: #fff !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #fff !important;
  overflow: hidden;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.3s ease-in-out;
}

/* Restore BeTheme icon-up-open-big; drop the faint CSS border-chevron */
a#back_to_top.button.footer_button::before {
  content: none !important;
  display: none !important;
}

a#back_to_top.button.footer_button > i {
  display: inline-block !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-size: 1em !important;
  line-height: 1 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  transform: none !important;
  speak: never;
}

a#back_to_top.button.footer_button > i::before {
  display: block !important;
  margin: 0 !important;
  width: 1em !important;
  line-height: 1 !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

a#back_to_top.button.footer_button:hover,
a#back_to_top.button.footer_button:focus,
a#back_to_top.button.footer_button:focus-visible,
a#back_to_top.button.footer_button.focus {
  background:
    radial-gradient(120% 80% at 28% 0%, color-mix(in srgb, var(--tfld-accent, #18c7c3) 34%, transparent), transparent 58%),
    rgba(11, 15, 23, 0.98) !important;
  background-color: rgba(11, 15, 23, 0.98) !important;
  border-color: color-mix(in srgb, var(--tfld-accent, #18c7c3) 62%, transparent) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px color-mix(in srgb, var(--tfld-accent, #18c7c3) 26%, transparent),
    0 12px 28px rgba(0, 0, 0, 0.50),
    0 0 0 1px color-mix(in srgb, var(--tfld-accent, #18c7c3) 18%, transparent);
  transform: translateY(-2px);
  opacity: 1;
  outline: none;
}

a#back_to_top.button.footer_button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--tfld-accent, #18c7c3) 70%, transparent);
  outline-offset: 3px;
}

/* Sticky scroll: keep BeTheme fade-in; ensure lift doesn't fight opacity */
a#back_to_top.button.footer_button.sticky.scroll:hover,
a#back_to_top.button.footer_button.sticky.scroll:focus,
a#back_to_top.button.footer_button.sticky.scroll.focus {
  opacity: 1;
}

@media (max-width: 820px) {
  a#back_to_top.button.footer_button {
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    width: 40px;
    height: 40px;
    font-size: 18px !important;
  }
  #Content {
    padding-bottom: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  a#back_to_top.button.footer_button {
    transition: opacity 0.3s ease-in-out;
  }

  a#back_to_top.button.footer_button:hover,
  a#back_to_top.button.footer_button:focus,
  a#back_to_top.button.footer_button:focus-visible,
  a#back_to_top.button.footer_button.focus {
    transform: none;
  }
}
