/*
 * Sidebar
 */

/* Hide for mobile, show later */

html,
body {
  overflow-x: hidden; /* Prevent scroll on narrow devices */
}

.sidebar {
    overflow-x: hidden;
}

@media (min-width: 768px) {
     .sidebar {  
        top: 56px;
        overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
        position: absolute;
        bottom: 61px;
        left: 0;
        z-index: -1000;
        display: block;
        padding: 20px;
        background-color: #f5f5f5;
        border-right: 1px solid #eee;
      }
}

@media (min-width: 992px) {
    .sidebar {
        top: 71px;
    }
}

@media (min-width: 1200px) {
    .sidebar {
        top: 86px;
    }
}

/* Sidebar navigation */
.nav-sidebar {
      margin-right: -21px; /* 20px padding + 1px border */
      margin-bottom: 20px;
      margin-left: -20px;
}
.nav-sidebar > li > a {
      padding-right: 20px;
      padding-left: 20px;
}
    .nav-sidebar > .active > a {
        color: #fff;
        background-color: #428bca;
    }

    /*
 * Off Canvas
 * --------------------------------------------------
 */
@media screen and (max-width: 767px) {
  .row-offcanvas {
    position: relative;
    -webkit-transition: all .25s ease-out;
       -moz-transition: all .25s ease-out;
            transition: all .25s ease-out;
  }

  .row-offcanvas-right {
    right: 0;
  }

  .row-offcanvas-left {
    left: 0;
  }

  .row-offcanvas-right
  .sidebar-offcanvas {
    right: -50%; /* 6 columns */
  }

  .row-offcanvas-left
  .sidebar-offcanvas {
    left: -50%; /* 6 columns */
  }

  .row-offcanvas-right.active {
    right: 50%; /* 6 columns */
  }

  .row-offcanvas-left.active {
    left: 50%; /* 6 columns */
  }

  .sidebar-offcanvas {
    position: absolute;
    display: block;
    top: 0;
    width: 50%; /* 6 columns */
  }
}

@media screen and (max-width: 500px) {
    .sidebar-offcanvas {
    width: 75%; 
  }
  .row-offcanvas-right
  .sidebar-offcanvas {
    right: -75%; /* 6 columns */
  }

  .row-offcanvas-left
  .sidebar-offcanvas {
    left: -75%; /* 6 columns */
  }

  .row-offcanvas-right.active {
    right: 75%; /* 6 columns */
  }

  .row-offcanvas-left.active {
    left: 75%; /* 6 columns */
  }