
:root {
    --primary-color: #625BFE;
    --primary-color-dark: #7771F6;    
    --button-color: #5433FF;
    --button-color-shadow: #5433FF30;
    --text-color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  font-family: Mulish, sans-serif;
}

.background {
    content: "";
    position: absolute;
    height: 100vh;
    width: 100vw;
    display: grid;
    place-items: center;
    opacity: 0.5;
    background-size: 100%;
    background-repeat: no-repeat;
    background-size: auto;
}

nav {
    position: sticky;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: var(--primary-color);
    width: 18rem;
    padding: 1.8rem 0.85rem;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: width 0.5s ease-in-out;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}


.sidebar-top {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.sidebar-top .logo {
  position: relative;
  width: 3.37rem;
  margin-right: 1.45rem;
  left: -0.125rem;
}

.sidebar-top h2 {
  padding-left: 0.5rem;
  font-weight: 600;
  font-size: 1.4rem;
}

.expand-btn {
  position: absolute;
  top: 50%;
  width: 2.8125rem;
  height: 2.8125rem;
  display: grid;
  place-items: center;
  background-color: var(--button-color);
  border-radius: 0.375rem;
  cursor: pointer;
  right: -3rem;
  transform: translateY(-50%) translateX(-0.5rem);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  box-shadow: 0 3px 10px -3px var(--button-color-shadow);
}


nav:hover .expand-btn,
.expand-btn.hovered {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: all;
}

.sidebar-links ul {
  list-style-type: none;
  position: relative;
 
}

.sidebar-links li {
  position: relative;
}

.sidebar-links li a {
  padding: 0.75rem;
  color: var(--text-color);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  height: 3.5rem;
  text-decoration: none;
  color: var(--text-color);
}

.icon {
  display: flex;
  align-items: center;
}

.icon img {
  width: 1.625rem;
  height: 1.625rem;
  margin: auto;
}

.sidebar-links .link {
  margin-left: 2.5rem;
}

.sidebar-links .active {
  width: 100%;
  text-decoration: none;
  background-color: var(--primary-color-dark);
  transition: all 100ms ease-in;
  border-radius: 0.625rem;
}

body.collapsed nav {
  width: 5rem;
}

body.collapsed .hide {
  opacity: 0;
  pointer-events: none;
  transition-delay: 0s;
}

body.collapsed .expand-btn img {
  transform: rotate(-180deg);
}

