/* Collapsible Filter Sidebar */
#changelist {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

#changelist-form {
    flex: 1;
    min-width: 0;
    margin-right: 0 !important;
    /* Flex handles this */
}

#changelist-filter {
    flex: 0 0 240px;
    /* Default expanded width */
    width: 240px !important;
    background: #f8f9fa;
    border-left: 1px solid #ddd;
    margin: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    position: relative;
    float: none !important;
}

#changelist-filter.collapsed {
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    background: #34495e !important;
    border: none !important;
    overflow: hidden !important;
}

#changelist-filter h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin: 0;
    background: #79aec8;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

#changelist-filter.collapsed h2 {
    background: transparent !important;
    padding: 0 !important;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 12px;
    font-size: 16px;
    width: 30px !important;
    height: auto !important;
    min-height: 200px;
    margin: 60px 0 0 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#changelist-filter.collapsed h2 span {
    display: block;
    width: 30px;
    text-align: center;
}

#changelist-filter .filter-toggle {
    cursor: pointer;
    background: #3498db;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: none;
    transition: all 0.2s ease;
    z-index: 10;
}

#changelist-filter .filter-toggle:hover {
    background: #2980b9;
    transform: scale(1.1);
}

#changelist-filter.collapsed .filter-toggle {
    position: absolute;
    top: 15px;
    left: 3px;
}

#changelist-filter.collapsed>*:not(h2) {
    display: none !important;
}

/* Ensure results expand to fill space */
.filtered #changelist-form {
    margin-right: 0 !important;
}