.sidebar-section {
  order: 1;
  flex: 20%;
  max-width: 20%;
  /* background-color: lightsalmon; */
  transition: all ease-out 0.5s;
  /* padding-top: 75px; */
}

@media (min-width:991px) and (max-width:1198px) {
  .sidebar-section {
    /* padding-top: 7rem !important; */
  }
}

.sidebar-holder {
  /* top: 10px; */
  position:sticky;
  max-width: 288px;
  background-color: #f9fafc;
  height: calc(100vh - 75px);
  /* overflow: hidden; */
  box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
  transition: all ease-out 0.3s;
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* Internet Explorer 10+ */

}

.sidebar-back-btn-wrapper{height: 45px; margin-bottom: -1px;}
.sidebar {
  background: #f9fafc;
  height: calc(100% - 45px);
  transition: all ease-out 0.3s;
  overflow-y: auto;
}

.sidebar-tree {
  padding-left: 1rem;
  position: relative;
  width: -webkit-max-content;
  width: -moz-max-content;
  width: max-content;
}

#search-box {
  margin-left: 5%;
  margin-right: 5%;
  width: -webkit-fill-available;
  height: 35px;
  padding-left: 15px;
  margin-top: 45px;
  margin-bottom: 10px;
  border-radius: 5px;
  background-color: #e5e9f2;
  transition: all 0.3s ease-out;
  border: 1px solid #c0ccda;
}

#search-box:focus {
  border: 1pt solid #248aaa;
  outline: none;
}

#list-heading {
  padding-left: 0px !important;
}

.tree,
.tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree li {
  margin: 0;
  padding: 0.2rem 1em;
  line-height: 2em;
  color: #3c4858;
  position: relative;
}

.tree li a {
  text-decoration: none;
  color: #131313;
  transition: all 0.3s ease-out;
}

.tree li a.active {
  display: inline;
  color: #e5e9f2;
  /* font-weight: 700; */
  padding: 5px 10px;
  border-radius: 2px;
  /* box-shadow: 1px 1px 2px silver; */
  background: #3c4858;

}

.tree li a.active:hover {
  margin-left: 1px;
  transition: all 0.3s ease-out;
  background: #248aaa;
  color: #e5e9f2;
}

.tree li a:hover {
  margin-left: 1px;
  color: #2098d1;
  transition: all 0.3s ease-out;
}

.tree i {
  color: #3c4858;
  font-size: 12px;
  margin-right: 5px;
}

.tree .shift-right {
  margin-left: 5px;
}

.tree .active,
.tree .active > ul {
  display: block;
}

.subtree {
  padding-left: 0.7rem;
}

.subtree:before {
  content: "";
  display: block;
  width: 0;
  position: absolute;
  top: 2.5rem;
  left: 1.5rem;
  bottom: 0.9rem;
  border-left: 1px solid;
}

.subtree ul,
ul > ul {
  position: relative;
  padding-left: 0.5rem;
  display: none;
}

.subtree ul:before {
  content: "";
  display: block;
  width: 0;
  position: absolute;
  top: -10px;
  left: 0.3rem;
  bottom: 0.9rem;
  border-left: 1px solid;
}

.subtree li:before {
  content: "";
  display: block;
  width: 20px;
  height: 0;
  border-top: 1px solid;
  margin-top: -1px;
  position: absolute;
  top: 18px;
  left: -3px;
}

.subtree li:last-child:before {
  background: #f9fafc;
  height: auto;
  top: 1.1rem;
  bottom: 0;
}

a.focused {
  color: #2098d1 !important;
}

/* ============= Device specific fixes ======= */

/* Large screens such as TV */
@media only screen and (min-width: 1824px) {
  .sidebar-section {
    flex: 18%;
    max-width: 18%;
  }
  .sidebar-holder {
    max-width: 100%;
  }
}
/* Extra large devices (large desktops, 1200px and up) */

@media (max-width: 1400px) {
  .sidebar-holder {
    max-width: 100%;
  }
}

@media (max-width: 1200px) {
  .sidebar-tree {
    /* margin-left: 1rem; */
  }
}

/* IPad Pro */
@media (max-width: 1024px) {
  .sidebar-section {
    flex: 20%;
    max-width: 100% !important;
    /* min-height: 100vh; */
    transition: all ease-out 0.3s;
  }
  .sidebar-holder {
    position: -webkit-sticky;
    /* position: static;
    top: 2.5rem; */
    width: 100%;
    /* max-height: calc(100vh - 2.5rem); */
    /* height: auto; */
  }

  .sidebar-section.hide {
    flex: 30%;
    max-width: 30%;
    margin-right: 0.5rem;
    transition: all ease-out 0.3s;
  }
}

/*  Large devices (desktops, 992px and up) */

@media (max-width: 992px) {
}

/* Medium devices (tablets, 768px and up) */

@media only screen and (max-width: 768px) {
  .sidebar-section {
    flex: 100%;
    max-width: 100%;
    /* min-height: 100vh; */
    transition: all ease-out 0.3s;
  }
  .sidebar-holder {
    /* position: -webkit-sticky;
    position: sticky;
    top: 2.5rem;
    width: 100%;
    height: auto !important; */
    /* position: -webkit-sticky; */
    /* position: sticky; */
    /* top: 2.5rem; */
    /* width: 100%; */
    height: auto !important;
    position: fixed;
    left: 0;
    top: 4rem;
    width: 100%;
    z-index: 99999;
    margin: 0px;
    /* padding-top: 0.4rem; */
    color: #1e293b;
    background-color: #ffffff;
    transition: all ease-out .3s;
  }

  .sidebar-section.hide {
    flex: 40%;
    max-width: 40%;
    margin-right: 0.5rem;
    transition: all ease-out 0.3s;
  }
}

/* Small devices (landscape phones, 576px and up) */

@media only screen and (max-width: 576px) {
  .sidebar-section {
    width: 100%;
    /* min-height: 100vh;
    max-height: 100vh; */
    max-width: 100%;
    transition: all ease-out 0.5s;
  }

  .sidebar-section.hide {
    margin-top: 2rem;
    position: relative;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    flex: none;
    max-height: 300vh;
    max-width: 100%;
    transition: all ease-out 0.5s;
  }

  .sidebar-holder {
    max-height: 100vh;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    overflow: hidden;
    max-width: 100%;
    transition: all ease-out 0.5s;
  }

  .sidebar-section.hide .sidebar-holder {
    max-height: 200vh;
    transition: all ease-out 0.5s;
  }

  .sidebar {
    position: relative;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    max-height: -webkit-fit-content;
    max-height: -moz-fit-content;
    max-height: 480px;
    width: 100vw;
    min-height: 0;
    overflow:scroll;
    transition: all ease-out 0.5s;
  }

  .sidebar-tree {
    margin-left: 0rem;
    /* max-height: 0; */
    transition: all 0.5s ease-out;
  }
  .sidebar-section.hide .sidebar-tree {
    max-height: 200vh;
    transition: all 0.5s ease-out;
  }
}

@media only screen and (min-width: 991px) {
.sidebar-section.collapse.navbar-collapse {
		display: block !important;
	}
}

@media only screen and (max-width: 768px) {
  .sidebar,.sidebar-tree {
    max-height: 480px;
    overflow:scroll;
  }

}
/* .sidebar-section.navbar-collapse.collapse.show {
  margin-top: 4rem;
} */

@media only screen and (max-width: 991px) {
  .sidebar-po-fix {
    position: relative !important;
    width: 100% !important;
    margin: auto;
}
}

@media only screen and (max-width: 768px){
.sidebar-po-fix.sidebar-section.navbar-collapse.collapse {
    /* position: sticky; */
    /* top: 2.5rem; */
    /* width: 100%; */
    height: auto !important;
    position: fixed !important;
    left: 0;
    top: 4rem;
    width: 100% !important;
    z-index: 99999;
    margin: 0px;
    /* padding-top: 0.4rem; */
    color: #1e293b;
    background-color: #ffffff;
    transition: all ease-out .3s;
}
}