@mixin invisible_text($icon-size: $font-size) {
  font-size: 1px;
  color: transparent;
  width: 20px;
  margin: 0 3px;
  height: 20px;
  overflow: hidden;
  display: block;
  float: left;
  &:before {
    font-size: $icon-size;
    color: $link-color;
  }
  &:hover {
    &:before {
      color: $link-color-hover;
    }
  }
}

@mixin base_icon($char) {
  font-family: "icomoon";
  font-size: 1em;
  content: $char;
  white-space: nowrap;
  line-height: 1em;
}
@mixin icon($char:"", $style:"before"){
  @if $style == "before" {
    &:before {
      @include base_icon($char);
    }
  }
  @if $style == "after" {
    &:after {
      @include base_icon($char);
    }
  }
}

.contenttype-blog,
.contenttype-blogcategory {
  @include icon($char: "< ");
}
.contenttype-book {
  @include icon($char: "? ");
}
.contenttype-textblock,
.contenttype-paragraph,
.contenttype-graphicblock,
.contenttype-htmlblock {
  @include icon($char: "I ");
}
.contenttype-contact,
.contenttype-ftw_contact,
.contenttype-member {
  @include icon($char: "\\ ");
}
.contenttype-poodle {
  @include icon($char: "a ");
}
.contenttype-document,
.contenttype-contentpage,
.contenttype-page {
  @include icon($char: " ");
}
.contenttype-meeting-item {
  @include icon($char: "K ");
}
.contenttype-billboardcategory,
.contenttype-newsfolder,
.contenttype-eventfolder,
.contenttype-homefolder,
.contenttype-tabbedviewfolder,
.contenttype-folder {
  @include icon($char: "] ");
}
.contenttype-banner {
  @include icon($char: "X ");
}
.contenttype-link {
  @include icon($char: " ");
}
.link-mailto a,
.contenttype-ftw_mail,
.contenttype-mail {
  @include icon($char: ". ");
}
.contenttype-news {
  @include icon($char: "a ");
}
.contenttype-news-item {
  @include icon($char: "a ");
}
.contenttype-event,
.contenttype-plone-app-event-dx-event,
.contenttype-eventpage,
.contenttype-meeting {
  @include icon($char: "e ");
}
.contenttype-ticket,
.contenttype-poiissue,
.contenttype-task {
  @include icon($char: "8 ");
}
.contenttype-workspace {
  @include icon($char: "% ");
}
.contenttype-remark {
  @include icon($char: "E ");
}
.contenttype-billboardad {
  @include icon($char: ": ");
}
.contenttype-ticket-box {
  @include icon($char: "F ");
}
.contenttype-chapter {
  @include icon($char: "# ");
}
.contenttype-table {
  @include icon($char: "L ");
}
.contenttype-classificationitem {
  @include icon($char: " ");
}
.contenttype-blogentry {
  @include icon($char: "N ");
}
.contenttype-formfolder {
  @include icon($char: " ");
}
.contenttype-subsite {
  @include icon('Y ');
}
.contenttype-listingblock {
  @include icon('I ');
}
.contenttype-addressblock {
  @include icon('I ');
}
.contenttype-refegovservice {
  @include icon(' ');
}
.contenttype-shopitemblock {
  @include icon('H ');
}
.contenttype-collection {
  @include icon($char: "F ");
}

/* ftw.shop */
.contenttype-supplier {
  @include icon($char: "8 ");
}
.contenttype-shopcategory {
  @include icon($char: "7 ");
}
.contenttype-shopitem {
  @include icon($char: "H ");
}


/* only show sprites in factory menu for file and image */
body.template-create_from_template .contenttype-image,
#plone-contentmenu-factories li a.contenttype-image span {
  @include icon($char: "X ");
}
body.template-create_from_template .contenttype-file,
#plone-contentmenu-factories li a.contenttype-file span {
  @include icon($char: "_ ");
}

/* no images in navigation */
dl.portletNavigationTree img {
  display: none;
}
#column-navigation .portletNavigationTree a {
  background-image: none;
}

a[target="_blank"],
#portal-topactions ul a[target="_blank"],
span.link-external a,
a.external-link {
  @include icon("j ");
}
#portal-topactions ul a[target="_blank"]:before {
  color: $link-color;
}

.to_top a {
  @include icon($char: " ", $style: "after");
}

.portletContextNavigation .parent a {
  @include icon($char: " k", $style: "after");
}

#portal-globalnav > li > .wrapper a {
  @include icon($char: " ", $style: "after");
  &:after {
    font-size: 0.75em;
  }
}

.LSBox:before {
  content: "";
  position: absolute;
  font-family: "icomoon";
  right: 0.4em;
  top: 0.4em;
  color: $link-color;
}

#toggle_slidenavi {
  @include icon($char: "");
}
#toggle_usermenu {
  @include icon($char: "");
}
#toggle_search {
  @include icon($char: "");
}

#slider-panes .sliderPane .prev {
  @include icon($char: "");
  &:before {
    font-size: 1.75em;
    vertical-align: middle;
  }
}
#slider-panes .sliderPane .next {
  @include icon($char: "", $style: "after");
  &:after {
    font-size: 1.75em;
    vertical-align: middle;
  }
}
.portlet.portletCollection.newsTemplate a.RssLink {
  @include icon($char:'G');
  @include invisible_text($icon-size: 16px);
  float: right;
}


/* @group document actions */

#document-action-print a {
  @include icon($char: "5 ");
}
#document-action-watch a {
  @include icon($char: "C ");
}
#document-action-addtofavourites a {
  @include icon($char: "* ");
}
#document-action-addtofavorites a {
  @include icon($char: "* ");
}
#document-actions #document-action-pdf a {
  @include icon($char: '" ');
}
#document-actions #document-action-reader a {
  @include icon($char: "` ");
}

#document-actions #document-action-print a,
#document-actions #document-action-watch a,
#document-actions #document-action-addtofavourites a,
#document-actions #document-action-addtofavorites a,
#document-actions #document-action-pdf a,
#document-actions #document-action-reader a {
  @include invisible_text($icon-size: 20px);
}

/* @end */