.discovery-sidebar {
    width: 250px;
}
.discovery-sidebar-trigger {
    display: none;
}

.discovery-sidebar h2 {
    margin-top: 0;
}
.discovery-sidebar h2 .version {
    font-size: 12px;
    font-weight: normal;
    display: inline-block;
    margin-left: 1ex;
}
.discovery-sidebar .view-tree .view-link {
    color: inherit;
    text-decoration-color: #8888;
}
.discovery-sidebar .view-tree .view-link:hover {
    text-decoration-color: currentColor;
}

.view-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}
.view-sidebar > .view-header {
    padding: 4px 16px 6px;
    margin: 0;
}
.view-sidebar > .view-tree {
    flex: 1;
    overflow: auto;
    padding: 0 12px 8px;
}
.view-sidebar > .view-tree .view-pill-badge {
    --discovery-view-badge-color: light-dark(#dfd16c, #6e6523);
    vertical-align: top;
    margin-left: 1ex;
}

@media (width < 768px) {
    .discovery-sidebar {
        position: fixed;
        transform: translate(-100%);
        height: 100dvh;
        z-index: 10000;
        background: var(--discovery-background-color);
        background-image: linear-gradient(to right, rgba(105,105,105,.1), rgba(105,105,105,.1));
        width: 350px;
        max-width: 100dvw;
        transition: transform .1s ease-in;
    }
    .discovery-sidebar-trigger.opened ~ .discovery-sidebar {
        transform: none;
        transition: transform .25s ease-in-out;
    }

    .discovery-sidebar-trigger {
        display: block;
        position: fixed;
        z-index: 10001;
        top: 8px;
        left: 0;
        width: 32px;
        aspect-ratio: 1/1;
        display: flex;
        border: none;
        align-items: center;
        align-content: center;
        border-radius: 0 4px 4px 0;
        background-color: var(--discovery-background-color);
        background-image: linear-gradient(to right, rgba(105,105,105,.1), rgba(105,105,105,.1));
        outline: .5px solid light-dark(#ccc, #555);
        cursor: pointer;
        transition: left .1s ease-in;
    }
    .discovery-sidebar-trigger.opened {
        border-radius: 4px;
        background-image: none;
        left: calc(min(350px, 100dvw) - 41px);
        transition: left .25s ease-out;
    }
    .discovery-sidebar-trigger::before {
        content: '';
        display: block;
        height: 12px;
        width: 14px;
        background-image: linear-gradient(to bottom, #888, #888 2px, transparent 0px);
        background-size: 100% 5px;
        margin: auto;
        transition: transform .1s ease-out;
    }
    .discovery-sidebar-trigger.opened::before {
        height: 16px;
        width: 16px;
        background-size: 100%;
        background-image:
            linear-gradient(to bottom, transparent 7px, #888 7px, #888 9px, transparent 0px),
            linear-gradient(to right, transparent 7px, #888 7px, #888 9px, transparent 0px);
        transform: rotate(45deg);
        transition-duration: .5s;
    }
}
