.aside-popup {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  max-height: 100%;
  margin: 0;
  z-index: 100;
  transition: opacity 0.5s;
  overflow: hidden;
}

.wrapper {
  display: flex;
  align-items: flex-start;
  transition: background 0.5s;   
}

.window {
  position: relative;
  background: white;
  transform: translateX(0);
  min-height: 100vh;

  .windowActive & {
    box-shadow: 0 2px 30px 0 rgba(0, 0, 0, 0.15);
  }
}

.content {
  width: 100%;
  max-height: 100vh;
  overflow-y: scroll;
  margin-right: -20px;
}

:global(.fade-enter),
:global(.fade-leave-to) {
  opacity: 0;
  .window {
    transform: translateX(100%);
  }
}

:global(.fade-enter-active) {
  .window {
    transition: transform 0.6s;
  }
}
:global(.fade-leave-active) {
  .window {
    transition: transform 0.6s;
  }
}

.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 20, 28, 0.1);

  &.trans {
    opacity: 0;
  }
}

.scrolling-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;

  .visible & {
    overflow-y: auto;
  }
}

.in-deep {
  .back {
    opacity: 1;
  }
}

.nativeClose {
  position: absolute;
  right: 40px;
  top: 20px;
  z-index: 999;
  color: #1D1D1B;
  opacity: 0.5;
  cursor: pointer;

  &:hover {
    opacity: 1;
    color: env(--color-primary);
  }

  button {
    padding: 0;
    color: rgba(#1D1D1B, 0.5);
    transition: color 0.4s ease-in-out;

    &:hover {
      color: rgba(#1d1d1d, 1);
    }
  }
  .iconClose {
    font-size: 20px;
  }
}

.aside-close {
  position: relative;
  flex-grow: 2;
  height: 100%;
  cursor: pointer;
  transition: background 0.5s;
  min-height: 100vh;
  height: 100%;
  cursor: none !important;
  .visible &:hover {
    background: rgba(#1d1d1d, 0.05);

    .aside-close-icon {
      color: #fff;
      /* position: relative; */
      position: absolute;
      display: block;
      font-size: 40px;
    }
    & + .scrolling-container .wrapper {
      background: rgba(#1d1d1d, 0.05);
    }
  }
}

.aside-close-icon {
  size: 40px 40px;
  /* absolute: top 270px right 320px; */
  display: none;
}


.vb {
  &:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    right: 3px;
    background-color: rgba(0, 0, 0, 0.09);
    height: 100%;
    width: 6px;
    border-radius: 4px;
  }

  &:global(.vb-invisible):after {
    display: none;
  }

  & > :global(.vb-dragger) {
      z-index: 4;
      width: 6px;
      border-radius: 4px;
      top: 2px;
      right: 3px;
      cursor: pointer;
      & > :global(.vb-dragger-styler) {
        backface-visibility: hidden;
        transform: rotate3d(0,0,0,0);
        transition:
            background-color 200ms ease-out,
            margin 200ms ease-out,
            height 200ms ease-out;
        background-color: rgba(183, 183, 183, 0.7);
        border-radius: 20px;
        display: block;
        height: 100%;
      }
  }

  &:global(.vb-scrolling-phantom > .vb-dragger > .vb-dragger-styler) {
    background-color: rgba(183, 183, 183, 0.9);
  }

  & > :global(.vb-dragger:hover > .vb-dragger-styler) {
    background-color: rgba(183, 183, 183, 0.9);
  }

  &:global(.vb-dragging > .vb-dragger > .vb-dragger-styler) {
    background-color: rgba(183, 183, 183, 0.9);
  }
}

:global(.cssscrollbar) .vb > :global(.vb-content) {
  width: 100% !important;
  position: relative;
  /* box-sizing: border-box !important */
}

:global(.cssscrollbar) .vb :global(.vb-content::-webkit-scrollbar) {
  display: none !important;
}

:global(.no-cssscrollbar) .vb :global(.vb-content){
  scrollbar-width: none;
}

:global(.dir--rtl) {
  .wrapper {
    /* flex-direction: row-reverse; */
  }
  .container {
    padding-right: 30px !important;
  }

  .content :global(.vb > .vb-dragger) {
    right: 0px;
  }
  
  .content :global(.vb:after) {
    right: 0px;
  }

  .aside-close {
    transform: translateX(0%);
  }
  .window {
    transform: translateX(0);
  }
  :global(.fade-enter),
  :global(.fade-leave-to) {
    opacity: 0;
    .window {
      transform: translateX(-20%);
    }
  } 

  .nativeClose {
    right: initial;
    left: 40px;
  }


  /* .aside-close {
    transform: translateX(-71.45%);
  }
  .window {
    transform: translateX(140%);
  }
  :global(.fade-enter),
  :global(.fade-leave-to) {
    opacity: 0;
    .window {
      transform: translateX(0);
    }
  }  */

}
