
/* color properties */

body.dark {
    --scrollbar-bg-color:     #555555cc;
    --scrollbar-thumb-color:  #777777dc;
    --scrollbar-hover-color:  #8a8a8adf;
    --scrollbar-drag-color:   #999999ec;
    --scrollbar-button-color: #555555ff;
    --scrollbar-button-arrow-color: #b6b6b6ff;
    --scrollbar-button-hover-color: #666666ff;
}

body.light {
    --scrollbar-bg-color:     #e6e6e6cc;
    --scrollbar-thumb-color:  #999999dc;
    --scrollbar-hover-color:  #8a8a8adf;
    --scrollbar-drag-color:   #777777ec;
    --scrollbar-button-color: #e6e6e6ff;
    --scrollbar-button-arrow-color: #8a8a8aff;
    --scrollbar-button-hover-color: #cececeff;
}


/* This is needed, so that the scrollbar can look transparent: */
body {
  overflow: overlay;
}

/* general scrollbar styling */

body::-webkit-scrollbar {
    width: 0;
}


/* normal style */


body.scrollbar-visible::-webkit-scrollbar {
    width: 5px;
}

body.scrollbar-visible::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color);
}


/* hover style */

body.scrollbar-hover::-webkit-scrollbar {
    width: 12px;
}

body.scrollbar-hover::-webkit-scrollbar-track {
    background: var(--scrollbar-bg-color);
}

body.scrollbar-hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color);
}

body.scrollbar-hover::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-hover-color);
}

body.scrollbar-hover::-webkit-scrollbar-thumb:active {
    background: var(--scrollbar-drag-color);
}


/* Scrollbar buttons */

/* Uncomment this to keep a margin for the buttons when they aren't shown:
body::-webkit-scrollbar-button {
    width: auto;
}*/

body.scrollbar-hover::-webkit-scrollbar-button:vertical:start:decrement {
    background:
        linear-gradient(120deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(240deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(  0deg, var(--scrollbar-button-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}

body.scrollbar-hover::-webkit-scrollbar-button:vertical:end:increment {
    background:
        linear-gradient(300deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient( 60deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(180deg, var(--scrollbar-button-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}

body.scrollbar-hover::-webkit-scrollbar-button:horizontal:end:increment {
    background:
        linear-gradient(210deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(330deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient( 90deg, var(--scrollbar-button-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}

body.scrollbar-hover::-webkit-scrollbar-button:horizontal:start:decrement {
    background:
        linear-gradient( 30deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(150deg, var(--scrollbar-button-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(270deg, var(--scrollbar-button-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}

body.scrollbar-hover::-webkit-scrollbar-button:vertical:start:decrement:hover {
    background:
        linear-gradient(120deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(240deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(  0deg, var(--scrollbar-button-hover-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}

body.scrollbar-hover::-webkit-scrollbar-button:vertical:end:increment:hover {
    background:
        linear-gradient(300deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient( 60deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(180deg, var(--scrollbar-button-hover-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}

body.scrollbar-hover::-webkit-scrollbar-button:horizontal:end:increment:hover {
    background:
        linear-gradient(210deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(330deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient( 90deg, var(--scrollbar-button-hover-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}

body.scrollbar-hover::-webkit-scrollbar-button:horizontal:start:decrement:hover {
    background:
        linear-gradient( 30deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(150deg, var(--scrollbar-button-hover-color) 40%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(270deg, var(--scrollbar-button-hover-color) 30%, rgba(0, 0, 0, 0) 31%);
    background-color: var(--scrollbar-button-arrow-color);
}