/**
 * @file
 * Back-to-top button for publication pages.
 */

.c-back-to-top {
  position: fixed;
  inset-inline-end: 1.5rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  border: none;
  border-radius: 50%;
  background: var(--main-nav-bg-color, #201c40);
  color: var(--color-black);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body:has(sa11y-control-panel) .c-back-to-top {
  inset-inline-end: 5rem;
}

.c-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.c-back-to-top:hover,
.c-back-to-top:focus-visible {
  background: var(--color-primary-dark, #161328);
  color: var(--color-white);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
