@mixin popup($useViewportSize: false, $setBgColor: false) {
  position: fixed;
  top: 0;
  left: 0;

  @if ($useViewportSize) {
    width: 100vw;
    height: 100vh;
  } @else {
    width: 100%;
    height: 100%;
  }

  visibility: hidden;
  &.is_active {
    visibility: visible;
  }

  &_front {
    position: relative;
    z-index: 1;
  }

  &_background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

  @if ($setBgColor) {
    &_background {
      background-color: rgba(black, 0.3);
    }
  }
}