/**
 * Listing "Back to top" button (Views/Shared/Travel/ScrollToTop/_ScrollToTop.cshtml).
 *
 * A pill fixed at the bottom centre of the viewport, on every screen size.
 * Hidden until js/common/travel/scroll-to-top.js adds .is-visible (scrolled
 * down, then scrolling back up). z-index 35 sits above page content but under
 * the sticky header (40) and drawers/modals.
 */

.ts-scroll-top {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: #2A2929;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 20px 0 rgb(0 0 0 / 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.ts-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.ts-scroll-top:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
}

@media (hover: hover) {
    .ts-scroll-top.is-visible:hover {
        transform: translate(-50%, -2px);
    }
}

@media (min-width: 1024px) {
    .ts-scroll-top {
        bottom: 24px;
        padding: 12px 22px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ts-scroll-top {
        transition: none;
    }
}
