/* Up/down buttons at the bottom right (scroll-ui.js): shown while the page scrolls, gone
   3 seconds after it stops. They replace the back-to-top arrow at the end of the footer. */
.wi-updown {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.wi-updown.show {
  opacity: 1;
  visibility: visible;
}
.wi-updown button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background-color: var(--main);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.wi-updown button:hover {
  background-color: #006b65;
}
.wi-updown button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}
.wi-updown button:disabled {
  opacity: 0.45;
  cursor: default;
}
.wi-updown svg {
  width: 14px;
  height: 14px;
}
@media (max-width: 500px) {
  .wi-updown {
    right: 12px;
    bottom: 12px;
  }
  .wi-updown button {
    width: 32px;
    height: 32px;
  }
}

footer #toTop {
  display: none;
}

/* Small header (#head.small, set by custom.js and scroll-ui.js): the theme moves it up with
   margin-top: -60px. That jumped, because #head's transition (menu.css) did not include
   margin-top, while the logo inside slid for 0.3s. Both now use the same duration and curve,
   so they move as one (the logo's background-size/-position change keeps it in place while
   the header moves). Not translate/transform: that would make #head the frame of the fixed
   "Jetzt anfragen" button inside it, which then sat at the top of the header. */
#head .nav-brand a,
#head.small .nav-brand a {
  transition: background-size .35s cubic-bezier(.4, 0, .2, 1), background-position .35s cubic-bezier(.4, 0, .2, 1), margin-top .35s cubic-bezier(.4, 0, .2, 1);
}
#head #nav-toggle {
  transition: top .35s cubic-bezier(.4, 0, .2, 1);
}
@media (prefers-reduced-motion: reduce) {
  #head,
  #head .nav-brand a,
  #head #nav-toggle {
    transition: none;
  }
}
