/**
* Mixin to media.
*/
@mixin fit-object($fit: cover, $position: center center) {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: $position;
}

@mixin backgrd($img: '', $size: cover) {
  @if ($img != '') {
    background-image: url($img);
  }

  background-repeat: no-repeat;
  background-position: center;
  background-size: $size;
}

@mixin maskimg($img: none, $size: 1em) {
  @if ($img != '') {
    mask-image: url($img);
  }

  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  background-color: currentColor;
  block-size: $size;
  inline-size: $size;
  flex-shrink: 0;
}

@mixin icon-left($img: none, $size: 1em) {
  &::before {
    @if ($img != '') {
      content: '';
    }
    @include maskimg($img, $size)
  }
}

@mixin icon-right($img: none, $size: 1em) {
  &::after {
    @if ($img != '') {
      content: '';
    }
    @include maskimg($img, $size)
  }
}

@mixin icon($img: none, $size: 1em) {
  &::after {
    @if ($img != '') {
      content: '';
    }
    @include maskimg($img, $size)
  }
}

@mixin ai-icon {
  position: absolute;
  content: '';
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  @include backgrd('@/Images/icons/label-ai-transparent.svg');
}
