.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    transition: width 0.2s ease, min-width 0.2s ease;
    overflow: hidden;
    position: relative;
}

.sidebar:last-child {
    border-right: none;
    border-left: 1px solid var(--border);

    & .toggle {
        align-self: flex-start;
    }
}

.open {
    width: 260px;
    min-width: 260px;
}

.open[data-side="right"] {
    width: 30%;
    min-width: 30%;
}

.closed {
    width: 0;
    min-width: 0;
    border: none;
}

.toggleMobile {
    display: none;
}

@media (max-width: 1000px) {
    .toggleMobile {
        display: flex;
    }
}

@media (max-width: 1000px) {
    .mobileOverlay {
        position: fixed;
        top: 0;
        right: 0;
        height: 100dvh;
        z-index: 100;
        border-left: none;
    }

    .mobileOverlay.open {
        width: 100dvw;
        min-width: 0;
    }
}

.toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    align-self: flex-end;
    font-size: 11px;
    color: var(--text-muted);

    &:hover {
        color: var(--accent);
        background: var(--bg-hover);
    }
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
