.rgba_bg(@color: @white, @alpha: 1) {
  background: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);}

.custom-scrollbar(@width, @height, @thumb-bg, @track-bg: transparent, @border-bg: transparent) {
  &::-webkit-scrollbar {
    width: @width;
    height: @height;
  }

  &::-webkit-scrollbar-track {
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    border: 10px solid @gray-3;
    background: @thumb-bg;
    background-clip: padding-box;
  }

  &::-webkit-scrollbar-thumb:hover{
    background: @mediatool-brand;
    border-radius: 10px;
    border: 10px solid @mediatool-brand;
    background-clip: padding-box;
  }
}

.scrollbar {
  .custom-scrollbar(
    @scrollbar-width,
    @scrollbar-height,
    @scrollbar-thumb-color,
    @scrollbar-track-background,
    @scrollbar-border-background
  )
}

.scrollbar2(@color) {
  .custom-scrollbar(15px, 15px, fade(@color, 20%))
}

.for (@list, @code) {
  & {
    .loop(@i:1) when (@i =< length(@list)) {
      @value: extract(@list, @i);
      @index: @i - 1;
      @code();

      .loop(@i + 1);
    }

    .loop();
  }
}
