/*
Layer: 04-components
Datei: back-to-top.css
*/

/* ======================================================
   Back to Top Button
   Kleiner Pfeil-Button unten rechts zum schnellen
   Zurückspringen an den Seitenanfang.
   ====================================================== */

.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1450;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e2a3c;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background 0.15s ease;
  box-shadow: 0 4px 12px rgba(14, 42, 60, 0.35);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #0066b3;
  border-color: rgba(255, 255, 255, 0.25);
  outline: none;
}

.back-to-top:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.4);
}

/* Leicht nach oben versetzt, wenn Scroll-Rail sichtbar ist */
body.has-scroll-rail .back-to-top {
  bottom: 1.75rem;
  right: 1.75rem;
}

/* Auf sehr kleinen Screens etwas kleiner */
@media (max-width: 480px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 18px;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Ausblenden auf Druck */
@media print {
  .back-to-top {
    display: none !important;
  }
}
