:root {
    --bsw-fader-bg: #07090d;
    --bsw-fader-panel: rgba(7, 9, 13, 0.82);
    --bsw-fader-slot: #10151b;
    --bsw-fader-cream: #ece2d7;
    --bsw-fader-red: #EB0101;
}

html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.bsw-scroll-fader {
    cursor: ns-resize;
    height: clamp(178px, 28vh, 246px);
    opacity: 0.92;
    pointer-events: auto;
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    z-index: 9999;
}

.bsw-scroll-fader[hidden] {
    display: none;
}

.bsw-scroll-fader__slot {
    backdrop-filter: blur(14px);
    background:
        linear-gradient(90deg, transparent 0 18px, rgba(236, 226, 215, 0.13) 18px 19px, var(--bsw-fader-red) 19px 27px, rgba(236, 226, 215, 0.13) 27px 28px, transparent 28px 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        var(--bsw-fader-panel);
    border: 1px solid rgba(236, 226, 215, 0.1);
    border-radius: 8px;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.7),
        0 10px 28px rgba(0, 0, 0, 0.42);
    height: 100%;
    left: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    width: 100%;
}

.bsw-scroll-fader__slot::before {
    background: repeating-linear-gradient(
        180deg,
        rgba(236, 226, 215, 0.28) 0 1px,
        transparent 1px 15px
    );
    content: "";
    inset: 18px 8px;
    opacity: 0.36;
    position: absolute;
}

.bsw-scroll-fader__slot::after {
    background:
        radial-gradient(circle at center, rgba(235, 1, 1, 0.92) 0 2px, transparent 3px),
        linear-gradient(180deg, transparent, rgba(235, 1, 1, 0.38), transparent);
    content: "";
    height: 48%;
    left: 50%;
    opacity: 0.38;
    position: absolute;
    top: var(--bsw-fader-progress, 0%);
    transform: translate(-50%, -50%);
    width: 10px;
}

.bsw-scroll-fader__cap {
    background:
        linear-gradient(180deg, #fff8f0 0%, var(--bsw-fader-cream) 42%, #b7aaa0 100%);
    border: 1px solid rgba(10, 16, 21, 0.86);
    border-radius: 5px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(236, 226, 215, 0.14),
        0 8px 18px rgba(0, 0, 0, 0.42);
    height: 34px;
    left: 50%;
    position: absolute;
    top: var(--bsw-fader-y, 17px);
    transform: translate(-50%, -50%);
    transition: box-shadow 0.18s ease, filter 0.18s ease;
    width: 36px;
}

.bsw-scroll-fader__cap::before {
    background: rgba(10, 16, 21, 0.78);
    border-radius: 999px;
    content: "";
    height: 3px;
    left: 6px;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.bsw-scroll-fader__cap::after {
    background: var(--bsw-fader-red);
    border-radius: 999px;
    bottom: 6px;
    box-shadow: 0 0 8px rgba(235, 1, 1, 0.32);
    content: "";
    height: 2px;
    left: 11px;
    position: absolute;
    right: 11px;
}

.bsw-scroll-fader:hover .bsw-scroll-fader__cap,
.bsw-scroll-fader:focus-visible .bsw-scroll-fader__cap,
.bsw-scroll-fader.is-dragging .bsw-scroll-fader__cap {
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 0 -1px 0 rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(235, 1, 1, 0.34),
        0 9px 22px rgba(0, 0, 0, 0.46),
        0 0 12px rgba(235, 1, 1, 0.14);
}

.bsw-scroll-fader:focus-visible {
    outline: 2px solid rgba(235, 1, 1, 0.7);
    outline-offset: 5px;
}

@media (max-width: 760px) {
    .bsw-scroll-fader {
        height: 160px;
        right: 8px;
        width: 38px;
    }

    .bsw-scroll-fader__cap {
        height: 30px;
        width: 30px;
    }
}
