@use "sass:math";

@mixin blur-bg($color: var(--theme-bg), $opacity: 0.75) {

  &:before,
  &:after {
    content: ' ';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }

  &:before {
    background: $color;
    opacity: $opacity;
  }

  &:after {
    backdrop-filter: blur(8px);
  }
}

@mixin blur-bg-light {
  @include blur-bg(var(--theme-bg), 0.3);
}

.leave-without-saving {
  @include blur-bg;
  position: fixed;
  z-index: calc(var(--z-modal) + 1);
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  &__template {
    position: relative;
    z-index: 1;
  }

  .btn {
    margin-right: var(--base);
  }
}
