/**
 * @license
 * Copyright Logo Yazılım. All Rights Reserved.
 *
 * Save to the extent permitted by law, you may not use, copy, modify,
 * distribute or create derivative works of this material or any part
 * of it without the prior written consent of Logo Yazılım.
 * Any reproduction of this material must contain this notice.
 */
%icon {
  position: relative;

  &::before {
    text-align: center;
    vertical-align: middle;
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
  }

  &-left {
    &::before {
      left: 0;
      right: auto;
      margin: 0;
      top: size(-1px);
    }
  }

  &-right {
    &::before {
      left: auto;
      right: 0;
      margin: 0;
    }

    &-outline {
      &::before {
        right: 0;
        margin: 0;
      }
    }
  }
}

@each $size, $map in get("size") {
  %icon-#{$size} {
    // width: size(map_get($map, icon-container));
    width: auto;
    min-width: size(map_get($map, icon-container));

    &::before {
      width: size(map_get($map, icon-container));
      height: size(map_get($map, height));
      line-height: size(map_get($map, height));
      -webkit-mask-size: size(map_get($map, icon-size));
      mask-size: size(map_get($map, icon-size));
      font-size: size(map_get($map, icon-size));
    }

    &-left {
      padding-left: size(map_get($map, icon-container)) !important;

      &::before {
        width: size(map_get($map, icon-container)) !important;
        margin: 0;
      }
    }

    &-right {
      padding-right: size(map_get($map, icon-container)) !important;

      &::before {
        width: size(map_get($map, icon-container)) !important;
        margin: 0;
      }
    }
  }
}
