/* ==========================================================================
   BACK TO TOP
   Fades in after scrolling 200px (where scroll-driven animations are
   supported, otherwise always visible). Smooth scroll via html, see style.css.
   ========================================================================== */

/* no paint containment, because it would clip the tooltip. */
.back-to-top {
    contain: layout style;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-white);
}

.back-to-top img {
    display: block;
    width: 4rem;
    height: 4rem;
    transform: rotate(180deg);
}

@media (min-width: 890px) {

    .back-to-top {
        right: 5rem;
        bottom: 5rem;
    }

    .back-to-top img {
        width: 5rem;
        height: 5rem;
    }
}

@supports (animation-timeline: scroll()) {

    .back-to-top {
        animation: back-to-top-fade linear both;
        animation-timeline: scroll();
        animation-range: 0 200px;
    }
}

@keyframes back-to-top-fade {

    from {
        opacity: 0;
        visibility: hidden;
    }

    to {
        opacity: 1;
        visibility: visible;
    }
}
