/* === Mobile Filter Toggle Optimization === */

@media (max-width: 991px) {
    /* 1. Show the filter toggle button which was hidden in theme.css */
    .tvcms-left-column-wrapper {
        display: inline-block !important;
        margin-right: 10px;
        vertical-align: middle;
    }

    .tv-left-pannal-btn-wrapper {
        cursor: pointer;
        display: flex;
        align-items: center;
        background-color: #CF0000;
        padding: 5px 10px;
        border-radius: 5px;
        color: #ffffff;
    }

    .tv-left-pannal-btn-wrapper svg {
        margin-right: 5px;
    }

    .tv-left-pannal-btn-wrapper span {
        font-size: 12px;
        text-transform: uppercase;
        font-weight: 600;
    }

    /* 2. Transform #left-column into a slide-in panel */
    #left-column {
        display: block !important; /* Override theme.css display:none */
        position: fixed !important;
        left: -320px !important; /* Hide off-screen */
        top: 0 !important;
        width: 300px !important;
        height: 100vh !important;
        z-index: 1050 !important; /* Above other elements */
        background: #ffffff !important;
        overflow-y: auto !important;
        transition: left 0.3s ease-in-out !important;
        padding: 20px !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2) !important;
        margin: 0 !important;
    }

    /* 3. Show panel when .open class is added */
    #left-column.open {
        left: 0 !important;
    }

    /* 4. Ensure close button is visible and styled */
    .tvleft-column-remove {
        display: block !important;
        text-align: right;
        margin-bottom: 15px;
    }

    .tvleft-column-close-btn {
        width: 30px;
        height: 30px;
        display: inline-block;
        position: relative;
        cursor: pointer;
    }

    .tvleft-column-close-btn:before,
    .tvleft-column-close-btn:after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background: #333;
        top: 14px;
        left: 5px;
    }

    .tvleft-column-close-btn:before { transform: rotate(45deg); }
    .tvleft-column-close-btn:after { transform: rotate(-45deg); }

    /* 5. Backdrop fix - make sure it covers everything */
    .modal-backdrop.fade.in {
        z-index: 1040 !important;
    }
}
