﻿/* 
    Sometimes the sub menus get too large for the page and prevent the menu from scrolling, limiting functionality
    A quick fix is to change .side-menu to 

    -> position:absolute
    
    and uncomment the code below.
    You also need to uncomment 
    
    -> <div class="absolute-wrapper"> </div> in the html file

    you also need to tweek the animation. Just uncomment the code in that section
    --------------------------------------------------------------------------------------------------------------------
    If you want to make it really neat i suggest you look into an alternative like http://areaaperta.com/nicescroll/
    This will allow the menu to say fixed on body scoll and scoll on the side bar if it get to large
*/
/*.absolute-wrapper{
    position: fixed;
    width: 300px;
    height: 100%;
    background-color: #f8f8f8;
    border-right: 1px solid #e7e7e7;
}*/

#bodyPage {
    margin-top: 20px;
    margin-left: 30px;
    margin-right: 30px;
}

.bodyAjust {
    padding-top: 50px;
    padding-bottom: 20px;
    padding-left: 155px;
    margin-bottom: 35px;
    margin-right: 0px !important;
}

.bodyNotAjust {
    padding-top: 60px;
    margin-top: 20px;
    margin-bottom: 35px;
}

.side-footer {
    padding-left: 0px;
    position: fixed;
    bottom: 0px;
    left: 0px;
    border: solid 1px #e7e7e7;
    width: 170px;
}

.side-menu {
    padding-top: 30px;
    padding-bottom: 20px;
    position: fixed;
    overflow: auto;
    width: 170px;
    height: 100%;
    background-color: #f8f8f8;
    border-right: 1px solid #e7e7e7;
}

    .side-menu .navbar {
        border: none;
        padding-bottom: 85px;
    }

    .side-menu .navbar-header {
        width: 100%;
        border-bottom: 1px solid #e7e7e7;
    }

    .side-menu .navbar-nav .active a {
        background-color: transparent;
        margin-right: -1px;
        border-right: 5px solid #e7e7e7;
    }

    .side-menu .navbar-nav li {
        display: block;
        width: 100%;
        border-bottom: 1px solid #e7e7e7;
    }

        .side-menu .navbar-nav li a {
            padding: 10px;
        }

            .side-menu .navbar-nav li a .glyphicon {
                padding-right: 10px;
            }

    .side-menu #dropdown {
        border: 0;
        margin-bottom: 0;
        border-radius: 0;
        background-color: transparent;
        box-shadow: none;
    }

        .side-menu #dropdown li a {
            padding-left: 15px;
        }

        .side-menu #dropdown .caret {
            float: right;
            margin: 9px 5px 0;
        }

        .side-menu #dropdown .indicator {
            float: right;
        }

        .side-menu #dropdown > a {
            border-bottom: 1px solid #e7e7e7;
        }

        .side-menu #dropdown .panel-body {
            padding: 0;
            background-color: #f3f3f3;
        }

            .side-menu #dropdown .panel-body .navbar-nav {
                width: 100%;
            }

                .side-menu #dropdown .panel-body .navbar-nav li {
                    padding-left: 15px;
                    border-bottom: 1px solid #e7e7e7;
                }

                    .side-menu #dropdown .panel-body .navbar-nav li:last-child {
                        border-bottom: none;
                    }

            .side-menu #dropdown .panel-body .panel > a {
                margin-left: -20px;
                padding-left: 35px;
            }

            .side-menu #dropdown .panel-body .panel-body {
                margin-left: -15px;
            }

                .side-menu #dropdown .panel-body .panel-body li {
                    padding-left: 30px;
                }

                    .side-menu #dropdown .panel-body .panel-body li:last-child {
                        border-bottom: 1px solid #e7e7e7;
                    }



    .side-menu .brand-name-wrapper {
        min-height: 50px;
    }

        .side-menu .brand-name-wrapper .navbar-brand {
            display: block;
        }

/* Main body section */
.side-body {
    margin-left: 310px;
}

@media (max-width: 768px) {
    .bodyAjust {
        padding-left: 160px;
        margin-top: 20px;
        margin-bottom: 35px;
    }

    .side-menu-container > .navbar-nav {
        /* Add position:absolute for scrollable menu -> see top comment */
        position: fixed;
        left: 20px;
        width: 170px;
        top: 43px;
        height: 100%;
        border-right: 1px solid #e7e7e7;
        background-color: #f8f8f8;
    }

    .side-footer {
        padding-left: 0px;
        position: fixed;
        bottom: 0px;
        left: 0px;
        border: solid 1px #e7e7e7;
        width: 175px;
    }

    .side-menu .navbar-nav li {
        display: block;
        width: 100%;
        border-bottom: 1px solid #e7e7e7;
    }

    .side-menu #dropdown .panel-body .navbar-nav {
        width: 100%;
    }
}
