/* =========================================
   SCROLL TO TOP
========================================= */

.scroll-to-top {
    position: fixed;

    right: 25px;
    bottom: 20px;

    width: 110px;
    height: 110px;

    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 99999;

    transition:
        opacity .35s ease,
        visibility .35s ease,
        transform .3s ease;
}


/* =========================================
   SHOW BUTTON AFTER SCROLL
========================================= */

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================
   STEAM
========================================= */

.scroll-to-top .scroll-steam {
    position: absolute;

    left: 50%;
    bottom: -4px;

    width: 145px;
    height: auto;

    display: block;

    object-fit: contain;

    opacity: 0;
    visibility: hidden;

    transform:
        translateX(-50%)
        translateY(12px)
        scale(.92);

    transform-origin: center bottom;

    z-index: 1;

    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease,
        transform .35s ease;
}


/* =========================================
   ROCKET
========================================= */

.scroll-to-top .scroll-rocket {
    position: relative;

    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    object-fit: contain;

    background: transparent;

    border: none;
    outline: none;
    box-shadow: none;

    z-index: 2;

    pointer-events: none;

    transition:
        transform .3s ease;
}


/* =========================================
   HOVER
   ROCKET + STEAM
========================================= */

.scroll-to-top:hover .scroll-steam {
    opacity: 1;
    visibility: visible;

    transform:
        translateX(-50%)
        translateY(0)
        scale(1);
}

.scroll-to-top:hover .scroll-rocket {
    transform: translateY(-5px);
}

.scroll-to-top:hover {
    background: transparent;
    border: none;
    box-shadow: none;

    transform: translateY(-6px);
}


/* =========================================
   CLICK / ACTIVE
   ROCKET + STEAM
========================================= */

.scroll-to-top.active .scroll-steam {
    opacity: 1;
    visibility: visible;

    transform:
        translateX(-50%)
        translateY(0)
        scale(1);
}

.scroll-to-top.active .scroll-rocket {
    transform: translateY(-5px);
}


/* =========================================
   CLICK
========================================= */

.scroll-to-top:active {
    transform: translateY(-2px) scale(.97);
}


/* =========================================
   FOCUS
========================================= */

.scroll-to-top:focus,
.scroll-to-top:focus-visible {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .scroll-to-top {
        right: 12px;
        bottom: 12px;

        width: 85px;
        height: 85px;
    }

    .scroll-to-top .scroll-steam {
        width: 115px;
        bottom: -3px;
    }
}