// Curated icons list
// Font files generated with http://fontello.com
$icons-font: "font-awesome" !default;
$icons-font-file: "../assets/icons/" + $icons-font + "/font/storefront-icons";

// Optional backport for '.fa-*' icon class names
$icons-fa-backport: true !default;
$icons-base-selector: "i[class^=\"i-\"], i[class*=\" i-\"]";
@if ($icons-fa-backport) {
  $icons-base-selector: $icons-base-selector + ", i[class^=\"fa-\"], i[class*=\" fa-\"]";
}

@font-face {
  font-family: "Storefront Icons";
  src: url($icons-font-file + ".woff2") format("woff2"),
       url($icons-font-file + ".woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

// Generic icons core
#{$icons-base-selector} {
  font-family: "Storefront Icons";
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  text-decoration: inherit;
  font-variant: normal;
  text-transform: none;
  line-height: 1em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

$icons-content: () !default;
$icons-content: map-merge(
  (
    // Brands
    "facebook": '\f09a',
    "facebook-f": '\f39e',
    "facebook-messenger": '\f39f',
    "youtube": '\f167',
    "instagram": '\f16d',
    "windows": '\f17a',
    "google": '\f1a0',
    "tiktok": '\e800',
    "linkedin": '\f08c',
    "twitter": '\f099',
    "whatsapp": '\f232',
    "pinterest": '\f0d2',
    "telegram": '\f2c6',
    // Solid
    "search": '\f002',
    "heart": '\f004',
    "user": '\f007',
    "check": '\f00c',
    "times": '\f00d',
    "home": '\f015',
    "lock": '\f023',
    "barcode": '\f02a',
    "tag": '\f02b',
    "print": '\f02f',
    "edit": '\f044',
    "play": '\f04b',
    "forward": '\f04e',
    "chevron-left": '\f053',
    "chevron-right": '\f054',
    "times-circle": '\f057',
    "check-circle": '\f058',
    "question-circle": '\f059',
    "info-circle": '\f05a',
    "arrow-left": '\f060',
    "arrow-right": '\f061',
    "arrow-up": '\f062',
    "arrow-down": '\f063',
    "plus": '\f067',
    "gift": '\f06b',
    "exclamation-triangle": '\f071',
    "chevron-up": '\f077',
    "chevron-down": '\f078',
    "shopping-cart": '\f07a',
    "phone": '\f095',
    "credit-card": '\f09d',
    "filter": '\f0b0',
    "copy": '\f0c5',
    "bars": '\f0c9',
    "truck": '\f0d1',
    "sort": '\f0dc',
    "envelope": '\f0e0',
    "bell": '\f0f3',
    "history": '\f1da',
    "wifi": '\f1eb',
    "shopping-bag": '\f290',
    "shopping-basket": '\f291',
    "hashtag": '\f292',
    "percent": '\f295',
    "user-circle": '\f2bd',
    "trash-alt": '\f2ed',
    "stopwatch": '\f2f2',
    "sign-out-alt": '\f2f5',
    "pencil-alt": '\f303',
    "ruler": '\f545',
    "exchange-alt": '\f362',
    "shield-alt": '\f3ed',
    "shipping-fast": '\f48b',
    "comment-dots": '\f4ad',
    "money-check": '\f53c',
    "receipt": '\f543',
    "store": '\f54e',
    "map-marked-alt": '\f5a0',
    "blog": '\f781',
  ),
  $icons-content
);

@each $icon-name, $content in $icons-content {
  $icon-selector: ".i-" + $icon-name + ":before";
  @if (str-index($icon-name, '-alt')) {
    // '.i-*' without '-alt' suffix
    // '-alt' suffix is used for FA backport only
    $icon-selector: ".i-" + str-slice($icon-name, 1, -5) + ":before";
  }
  @if ($icons-fa-backport) {
    $icon-selector: $icon-selector + ", .fa-" + $icon-name + ":before";
  }
  #{$icon-selector} {
    content: $content;
  }
}
