﻿
/*****************************************************************************
    ScrollTop
*****************************************************************************/

.scrolltop-bo {
    position: fixed;
    inset-inline-end: 2rem;
    inset-block-end: calc(1rem + env(safe-area-inset-bottom, 0));
    z-index: 1000;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: var(--bo-bg-darkblue);
    color: var(--bo-bg-neutral);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(.94);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease, box-shadow .22s ease;
}

    .scrolltop-bo.visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

@media (hover: hover) and (pointer: fine) {
    .scrolltop-bo:hover {
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
        transform: translateY(-1px) scale(1.02);
    }
}

.scrolltop-bo:active {
    transform: translateY(0) scale(.98);
}

.scrolltop-bo:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .scrolltop-bo {
        transition: none;
        transform: none;
    }

        .scrolltop-bo.visible {
            transform: none;
        }
}

@media (max-width: 576px) {
    .scrolltop-bo {
        inset-inline-end: 1rem;
        inset-block-end: calc(3rem + env(safe-area-inset-bottom, 0));
        width: 56px;
        height: 56px;
    }
}
