/**
 * Landing overlay scrollbar: the native one reserves a gutter the page background
 * never reaches, so on fine pointers it is replaced by a thumb drawn over content.
 */

html.has-landing-scrollbar {
    --scrollbar-gutter-end: 0px;
    scrollbar-gutter: auto;
    scrollbar-width: none;
}

html.has-landing-scrollbar body {
    scrollbar-width: none;
}

html.has-landing-scrollbar::-webkit-scrollbar,
html.has-landing-scrollbar body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.landing-scrollbar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-scroll-header, 9000) + 1);
    width: 12px;
    pointer-events: none;
}

.landing-scrollbar[hidden] {
    display: none;
}

.landing-scrollbar__thumb {
    position: absolute;
    top: 0;
    right: 3px;
    width: 6px;
    min-height: 32px;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    pointer-events: auto;
    cursor: default;
    transition:
        width var(--transition-fast, 150ms) ease,
        background-color var(--transition-fast, 150ms) ease;
    will-change: transform;
}

.landing-scrollbar__thumb:hover,
.landing-scrollbar.is-dragging .landing-scrollbar__thumb {
    width: 8px;
    background: var(--scrollbar-thumb-hover);
}

html.has-landing-scrollbar.is-landing-scrollbar-dragging,
html.has-landing-scrollbar.is-landing-scrollbar-dragging * {
    cursor: default !important;
    user-select: none !important;
}

body.landing-mobile-nav-open .landing-scrollbar {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .landing-scrollbar__thumb {
        transition: none;
    }
}
