/* B"H */
/* /style/heichelos/revamped-partials/sidebar.css */
/* All laws governing the sidebar and its divine function. */

.heichel-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
    align-self: start;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    overflow-x: visible;
    transition: opacity 0.2s ease-out, visibility 0.2s;
    visibility: visible;
    opacity: 1;

    /* --- B"H - INTENSE BORDER --- */
    border-left: var(--border-thick);
    padding-left: 2rem;
    background: rgba(0,0,0,0.02);
}

#sidebar-title { font-size: 1.2rem; margin: 0; }
#author-name a { color: var(--color-primary); }

.editor-controls-area, .editors-section {
    border: var(--border-ui);
    background: rgba(0,0,0,0.02);
}
.controls-header, .editors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    padding: 1rem;
    border-bottom: var(--border-ui);
}
.controls-arrow { transition: transform 0.2s; }
.controls-arrow::before { content: '▶'; }
.controls-arrow.expanded::before { content: '▼'; }

.controls-container, .editors-holder {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}
.controls-container.expanded, .editors-holder.extended {
    max-height: 500px;
    padding: 1rem;
}
.posts-controls, .series-controls { display: flex; flex-direction: column; gap: 10px; }

/* --- SIDEBAR COLLAPSE LOGIC --- */
.heichel-page-container.sidebar-collapsed .main-content-wrapper {
    grid-template-columns: 1fr 0;
    gap: 2rem 0;
}
.heichel-page-container.sidebar-collapsed .heichel-sidebar {
    /* opacity: 0; */
    /* visibility: hidden; */
    padding-left: 0;
    /* height: 100px; */
}
/* B"H --- RE-FORGED SIDEBAR TOGGLE --- */
.sidebar-toggle {
    position: fixed; /* B"H - Anchor to viewport */
    bottom: 1rem;
    left: 1rem;
    z-index: 1001;
    
    /* B"H - New Neo-brutalist style from screenshot */
    all: unset;
    position: absolute;
    right: 370px;
    /* margin-left: -50px; */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    float: right;
    width: 50px; /* Square */
    height: 50px;
    background: var(--bg-surface);
    border: var(--border-thick); /* Use thick border */
    color: var(--color-ink);
    font-size: 24px;
    font-weight: bold;
    box-shadow: var(--shadow-ui);
    transition: all 0.1s ease-out;
}

.heichel-page-container.sidebar-collapsed .sidebar-toggle {
    right:0px;
}
.sidebar-toggle:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
    background: var(--color-accent);
}
.sidebar-toggle:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}
