html:has(body.hdv2-client-shell) {
    scrollbar-width: none;
}

html:has(body.hdv2-client-shell)::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
}

.hdv2-page-scrollbar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 10px;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.hdv2-page-scrollbar.is-visible {
    opacity: 1;
    pointer-events: auto;
}

body.hdv2-modal-open .hdv2-page-scrollbar,
html.hdv2-modal-open .hdv2-page-scrollbar,
body.hdv2-sheet-open .hdv2-page-scrollbar,
html.hdv2-sheet-open .hdv2-page-scrollbar,
body.hdv2-cah-sheet-open .hdv2-page-scrollbar,
body.hdv2-rescue-confirm-open .hdv2-page-scrollbar {
    opacity: 0 !important;
    pointer-events: none !important;
}

.hdv2-page-scrollbar__thumb {
    position: absolute;
    top: 0;
    left: 2px;
    right: 2px;
    min-height: 2.5rem;
    border-radius: 999px;
    background: hsl(220 10% 45% / 0.35);
    cursor: grab;
    touch-action: none;
}

.hdv2-page-scrollbar__thumb:hover,
.hdv2-page-scrollbar.is-dragging .hdv2-page-scrollbar__thumb {
    background: hsl(220 10% 40% / 0.55);
}

.hdv2-page-scrollbar.is-dragging .hdv2-page-scrollbar__thumb {
    cursor: grabbing;
}

:root[data-hdv2-theme="dark"] .hdv2-page-scrollbar__thumb {
    background: hsl(220 5% 70% / 0.28);
}

:root[data-hdv2-theme="dark"] .hdv2-page-scrollbar__thumb:hover,
:root[data-hdv2-theme="dark"] .hdv2-page-scrollbar.is-dragging .hdv2-page-scrollbar__thumb {
    background: hsl(220 5% 80% / 0.42);
}

@media (pointer: coarse) {
    .hdv2-page-scrollbar {
        width: 6px;
    }

    .hdv2-page-scrollbar.is-visible {
        opacity: 0;
        pointer-events: none;
    }

    .hdv2-page-scrollbar.is-visible.is-active {
        opacity: 1;
    }

    .hdv2-page-scrollbar__thumb {
        left: 1px;
        right: 1px;
        min-height: 2rem;
    }
}

.hdv2-scrollbar-host {
    position: relative;
}

[data-hdv2-scrollbar] {
    scrollbar-width: none;
}

[data-hdv2-scrollbar]::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.hdv2-scrollbar {
    position: absolute;
    right: 2px;
    width: 8px;
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.hdv2-scrollbar.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.hdv2-scrollbar__thumb {
    position: absolute;
    top: 0;
    left: 1px;
    right: 1px;
    border-radius: 999px;
    background: hsl(220 10% 45% / 0.38);
    cursor: grab;
    touch-action: none;
}

.hdv2-scrollbar__thumb:hover,
.hdv2-scrollbar.is-dragging .hdv2-scrollbar__thumb {
    background: hsl(220 10% 40% / 0.6);
}

.hdv2-scrollbar.is-dragging .hdv2-scrollbar__thumb {
    cursor: grabbing;
}

:root[data-hdv2-theme="dark"] .hdv2-scrollbar__thumb {
    background: hsl(220 5% 75% / 0.3);
}

:root[data-hdv2-theme="dark"] .hdv2-scrollbar__thumb:hover,
:root[data-hdv2-theme="dark"] .hdv2-scrollbar.is-dragging .hdv2-scrollbar__thumb {
    background: hsl(220 5% 85% / 0.45);
}
