/* UX-001: Scroll-to-top (pub34) — TOP-Label; Alpha nur am Background */

.native-scroll-top {
  --nst-bottom: 4.5rem;
  --nst-bottom-near-footer: 7.5rem;

  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(var(--nst-bottom), env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 3.2rem;
  max-width: 3.6rem;
  height: 2.35rem;
  min-height: 2.35rem;
  margin: 0;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.45rem;
  background: rgba(42, 130, 201, 0.55) !important;
  background-color: rgba(42, 130, 201, 0.55) !important;
  color: #ffffff;
  font-family: var(--hit-font-body, "PT Sans", system-ui, sans-serif);
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    bottom 0.2s ease,
    background-color 0.15s ease,
    background 0.15s ease;
}

.native-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.native-scroll-top.is-near-footer {
  bottom: max(var(--nst-bottom-near-footer), env(safe-area-inset-bottom, 0px));
  background: rgba(42, 130, 201, 0.55) !important;
  background-color: rgba(42, 130, 201, 0.55) !important;
}

.native-scroll-top:hover {
  background: rgba(42, 130, 201, 0.92) !important;
  background-color: rgba(42, 130, 201, 0.92) !important;
  transform: none;
  box-shadow: none;
}

.native-scroll-top:focus {
  outline: none;
}

.native-scroll-top:focus-visible {
  background: rgba(42, 130, 201, 0.92) !important;
  background-color: rgba(42, 130, 201, 0.92) !important;
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 2px;
  transform: none;
  box-shadow: none;
}

.native-scroll-top:active {
  background: rgba(31, 103, 159, 0.96) !important;
  background-color: rgba(31, 103, 159, 0.96) !important;
  transform: none;
  box-shadow: none;
}

.native-scroll-top.is-near-footer:hover,
.native-scroll-top.is-near-footer:focus-visible {
  background: rgba(42, 130, 201, 0.92) !important;
  background-color: rgba(42, 130, 201, 0.92) !important;
}

.native-scroll-top__top {
  display: block;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  opacity: 1;
}

.native-scroll-top__label,
.native-scroll-top__icons,
.native-scroll-top__chevron {
  display: none;
}

@media (max-width: 767px) {
  .native-scroll-top {
    --nst-bottom: 5.5rem;
    --nst-bottom-near-footer: 8.5rem;
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    min-width: 3.2rem;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0.26rem 0.46rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .native-scroll-top {
    transition: none;
  }
}
