.Overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 100;

  &_show {
    opacity: 1;
    pointer-events: all;
  }
}

.Sidebar {
  position: fixed;
  top: 0;
  left: rem(-280px);
  width: rem(280px);
  height: 100%;
  background: #fff;
  padding: rem(40px) rem(20px);
  box-shadow: rem(-4px) 0 rem(10px) rgba(0, 0, 0, 0.1);
  transition: 0.35s ease;
  z-index: 120;

  display: flex;
  flex-direction: column;
  gap: rem(20px);

  &_open {
    left: 0;
  }

  nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  a {
    text-decoration: none;
    font-family: $font-roboto;
    font-weight: 400;
    font-size: rem(16px);
    line-height: 100%;
    color: #333333;
    transition: 0.2s;

    &:hover {
      opacity: 0.6;
    }
  }
}

/* --- multi-level menu --- */
.Menu {
  list-style: none;
  padding: 0;
  margin: 0;

  &_level_1 {
    padding-left: rem(15px);
  }
  &_level_2 {
    padding-left: rem(30px);
  }
}

.MenuItem {
  margin-bottom: rem(8px);

  .MenuTitle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: rem(4px) 0;
    font-family: $font-roboto;
    font-weight: 400;
    font-size: rem(16px);
    line-height: 130%;
    color: #333333;
    transition: .2s;

    &:hover {
      opacity: 0.6;
    }
  }

  .Arrow {
    width: rem(8px);
    height: rem(8px);
    border-top: 2px solid #222;
    border-right: 2px solid #222;
    transform: rotate(45deg);
    transition: 0.25s ease;
    margin-left: rem(8px);

    &_open {
      transform: rotate(135deg);
    }
  }

  /* submenu animation */
  .Submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;

    &_open {
      max-height: rem(500px); // достаточно, чтобы влезли элементы
    }
  }
}

