#cfs-sidebar {
    position: fixed;
    top: 60px;
    right: 0;
    width: 300px;
    max-width: 90vw;
    height: 70vh;
    z-index: 9999;
    background: #fff;
    border-left: 2px solid #ddd;
    box-shadow: 0 8px 24px 0 rgba(54, 61, 77, 0.24), 0 1.5px 8px 0 rgba(0,0,0,0.14);
    border-radius: 5px;
    transition: transform 0.3s, right 0.3s;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: visible; /* Ensure the toggle can "stick out" */
}

#cfs-sidebar.cfs-collapsed {
    transform: translateX(265px); /* 300px sidebar - 35px tab */
}

#cfs-sidebar.cfs-right #cfs-toggle {
    left: -35px;
    border-radius: 5px 0 0 5px;
}

#cfs-sidebar #cfs-toggle {
    position: absolute;
    top: 50%;
    left: -35px;
    transform: translateY(-50%);
    width: 35px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.7em;
    box-shadow: 0 2px 8px rgba(54, 61, 77, 0.20);
    transition: background 0.2s;
    padding: 0;
    border-radius: 5px 0 0 5px;
    outline: none;
    z-index: 10000; /* Make sure it's above the sidebar */
}

#cfs-sidebar #cfs-toggle:hover {
    background: #444;
}

#cfs-sidebar-content {
    overflow-y: auto;
    width: 100%;
    padding: 20px 15px 15px 15px;
}

.cfs-widget {
    margin-bottom: 24px;
}

.cfs-widget-title {
    margin-top: 0;
    font-size: 1.1em;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #cfs-sidebar {
        width: 90vw;
        max-width: 100vw;
        height: 60vh;
    }
    #cfs-sidebar.cfs-collapsed {
        transform: translateX(85vw); /* 90vw sidebar - 35px tab */
    }
    #cfs-sidebar #cfs-toggle {
        height: 48px;
        font-size: 1.4em;
    }
}