/* BRILL VAULT SCROLL FIX V1 */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden !important;
}

/*
 * Keep the Vault application locked to the viewport.
 * Only the main content column scrolls.
 */
#bv-final {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

/*
 * Critical fix:
 * allow the right/main side of BRILL VAULT to scroll vertically.
 */
#bv-final .bv-main {
    min-height: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
}

/*
 * Do not let inner views clip their content.
 */
#bv-final .bv-view {
    overflow: visible !important;
    min-height: auto !important;
    height: auto !important;
}

/*
 * Sidebar remains fixed inside the viewport.
 */
#bv-final .bv-sidebar {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Chromium scrollbar */
#bv-final .bv-main::-webkit-scrollbar,
#bv-final .bv-sidebar::-webkit-scrollbar {
    width: 7px;
}

#bv-final .bv-main::-webkit-scrollbar-track,
#bv-final .bv-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#bv-final .bv-main::-webkit-scrollbar-thumb,
#bv-final .bv-sidebar::-webkit-scrollbar-thumb {
    background: rgba(110, 145, 190, 0.22);
    border-radius: 999px;
}

#bv-final .bv-main::-webkit-scrollbar-thumb:hover,
#bv-final .bv-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 160, 225, 0.38);
}
