/* Updated floating-sidebar-style.css */

#floating-sidebar-wrapper {
    position: fixed;
    width: 300px;
    max-width: 90%;
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
}

#floating-sidebar {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 80vh;
}

#floating-sidebar-toggle {
    display: none;
    position: absolute;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    right: -40px;
    top: 50%;
    height: auto;
    white-space: nowrap;
}

@media (min-width: 1025px) {
    #floating-sidebar-wrapper {
        top: 100px;
        right: 20px;
        transform: translateX(0);
    }
    
    #floating-sidebar .widget_seo101_toc_widget {
        display: block !important;
        opacity: 1 !important;
    }
}

@media (max-width: 1024px), (orientation: landscape) {
    #floating-sidebar-wrapper {
        left: 0;
        transform: translateX(-100%);
        top: 50%;
        margin-top: -40vh;
    }

    #floating-sidebar-wrapper.open {
        transform: translateX(0);
    }

    #floating-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #floating-sidebar .widget_seo101_toc_widget {
        position: static !important;
        left: auto !important;
        opacity: 1 !important;
        width: 100% !important;
        max-height: none !important;
    }
    
    #sidebar .widget_seo101_toc_widget {
        display: none !important;
    }
}