/* Sidebar Css Start Here */
#sidebar {
  box-sizing: border-box;
  height: 100vh;
  width: 200px;
  padding: 0.25rem;
  background-color: var(--base-clr);
  border-right: 1px solid var(--line-clr);
  position: sticky;
  top: 0;
  align-self: start;
  transition: 300ms ease-in-out;
  overflow: hidden;
  text-wrap: nowrap;
}

#sidebar.close {
  padding: 0.25rem;
  width: 55px;
}

#sidebar ul {
  list-style: none;
}

#sidebar>ul>li:first-child {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

#sidebar ul li.active a {
  color: var(--accent-clr);

  svg {
    fill: var(--accent-clr);
  }
}

#sidebar a,
#sidebar .dropdown-btn,
#sidebar .logo {
  border-radius: .5em;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text-clr);
  display: flex;
  align-items: center;
  gap: 1em;
}

.dropdown-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

#sidebar svg {
  flex-shrink: 0;
  fill: var(--text-clr);
}

#sidebar a span,
#sidebar .dropdown-btn span {
  flex-grow: 1;
}

#sidebar a:hover,
#sidebar .dropdown-btn:hover {
  background-color: var(--hover-clr);
}

#sidebar .sub-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: 300ms ease-in-out;

  >div {
    overflow: hidden;
  }
}

#sidebar .sub-menu.show {
  grid-template-rows: 1fr;
}

.dropdown-btn svg {
  transition: 200ms ease;
}

.rotate svg:last-child {
  rotate: 180deg;
}

#sidebar .sub-menu a {
  padding-left: 2em;
}

#toggle-btn {
  margin-left: auto;
  padding: 0.75rem;
  border: none;
  border-radius: .5rem;
  background: none;
  cursor: pointer;

  svg {
    transition: rotate 150ms ease;
  }
}

#toggle-btn:hover {
  background-color: var(--hover-clr);
}

@media(max-width: 800px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }

  #sidebar {
    height: 50px;
    width: 100% !important;
    border-right: none;
    border-top: 1px solid var(--line-clr);
    padding: 0 !important;
    position: fixed;
    top: unset;
    bottom: 0;
    z-index:99;

    >ul {
      padding: 0;
      display: grid;
      grid-auto-columns: 60px;
      grid-auto-flow: column;
      align-items: center;
      overflow-x: scroll;
    }

    ul li {
      height: 100%;
    }

    ul a,
    ul .dropdown-btn {
      width: 50px;
      height: 50px;
      padding: 0;
      border-radius: 0;
      justify-content: center;
    }

    ul li span,
    ul li:first-child,
    .dropdown-btn svg:last-child {
      display: none;
    }

    ul li .sub-menu.show {
      position: fixed;
      bottom: 60px;
      left: 0;
      box-sizing: border-box;
      height: 60px;
      width: 100%;
      background-color: var(--hover-clr);
      border-top: 1px solid var(--line-clr);
      display: flex;
      justify-content: center;

      >div {
        overflow-x: auto;
      }

      li {
        display: inline-flex;
      }

      a {
        box-sizing: border-box;
        padding: 1em;
        width: auto;
        justify-content: center;
      }
    }
  }
}
@media screen and (max-width: 769px) {
    #sidebar.close {
        padding: 0.25rem;
        width: 100% !important;
    }
}