@use "sass:map";
@use "sass:meta";
@use "sass:string";
/* Custom icons */

@font-face {
  font-family: 'custom-icons';
  src:  url('fonts/custom-icons.eot');
  src:  url('fonts/custom-icons.eot') format('embedded-opentype'),
    url('fonts/custom-icons.ttf') format('truetype'),
    url('fonts/custom-icons.woff') format('woff'),
    url('fonts/custom-icons.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

$ci-icons: (
  awareness: '\e900',
  businessman: '\e901',
  information: '\e902',
  list-1: '\e903',
  sale: '\e904',
  armor: '\e905',
  chat: '\e906',
  list: '\e907',
  network: '\e908',
  offer: '\e909',
  reaction: '\e90a',
  add: '\e90b',
  appointment: '\e90c',
  desk: '\e90d',
  file: '\e90e',
  premium: '\e90f',
  team: '\e910',
  beer: '\e911',
  networking: '\e912',
  receipt: '\e913',
  robot: '\e914',
  team-1: '\e915',
  croupier: '\e916',
  learning: '\e917',
  review: '\e918',
  surf: '\e919',
  document: '\e91a',
  code: '\e91b',
  hat: '\e91c',
  beer1: '\e91d',
  alien: '\e91e',
  add-user: '\e91f',
  feedback: '\e920',
  globe: '\e921',
  bubble-add: '\e922'
);

%ci,
[class^='ci-']::before,
[class*=' ci-']::before,
[class^='children-ci-'] *::before,
[class*=' children-ci-'] *::before {
  display: inline-block;
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'custom-icons' !important;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  speak: none;
  text-align: center;
  text-decoration: inherit;
  width: 1em;
  
  /* For safety - reset parent styles, that can break glyph codes*/
  font-variant: normal;
  text-transform: none;

  /* Better Font Rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@function char($character-code) {
  @if meta.function-exists("selector-append") {
    @return string.unquote("\"\\#{$character-code}\"");
  }

  @if "\\#{'x'}" == "\\x" {
    @return string.slice("\x", 1, 1) + $character-code;
  }
  @else {
    @return #{"\"\\"}#{$character-code + "\""};
  }
}

@function ci($name) {
  @if map.has-key($ci-icons, $name) == false {
    @warn "Icon #{$name} not found.";
    @return "";
  }
  @return char(map.get($ci-icons, $name));
}

@each $key, $value in $ci-icons {
  .ci-#{$key}:before {
    content: char($value);
  }

  .children-ci-#{$key} *:before {
    content: char($value);
  }
}

@mixin ci($value) {
  &:before {
    @extend %ci;
    @extend .ci-#{$value};
  }
}

@mixin ci($value) {
  *:before {
    @extend %ci;
    @extend .children-ci-#{$value};
  }
}
