// Cachet fonts
// 400 - book
// 500 - medium
// 700 - bold
@mixin cachet($font-weight: 400) {
  font-family: $font-family-sans-serif;
  font-weight: $font-weight;
}

@mixin cachet-book() {
  font-family: "Cachet", "Cachet W01 Book", Verdana, sans-serif;
  font-weight: 400;
}


// read more link
@mixin read-more-link() {
  a {
    font-size: 15px;
    display: inline-block;
    vertical-align: top;
    position: relative;

    &:after {
      content: '>';
      display: inline-block;
      vertical-align: text-top;
      font-size: inherit;
      line-height: inherit;
      padding: 0 0 0 2px;
    }
  }
}

/**
 * Rem-converter mixin to convert px to rem
 *
 * Usages
 * @include rem(padding-bottom, 20px);
 *
 */
@mixin rem($property, $values) {
  $px: (); /* 3 */
  $rem: (); /* 3 */

  @each $value in $values {
    /* 4 */

    @if $value == 0 or $value == auto {
      /* 5 */
      $px: append($px, $value);
      $rem: append($rem, $value);
    } @else {
      $unit: unit($value); /* 6 */
      $val: parseInt($value); /* 6 */

      @if $unit == 'px' {
        /* 7 */
        $px: append($px, $value);
        $rem: append($rem,  ($val * 0.1 + rem));
      }

      @if $unit == 'rem' {
        /* 7 */
        $px: append($px,  ($val * 10 + px));
        $rem: append($rem, $value);
      }
    }
  }

  @if $px == $rem {
    /* 8 */
    #{$property}: $px; /* 9 */
  } @else {
    #{$property}: $px; /* 9 */
    #{$property}: $rem; /* 9 */
  }
}

@mixin text-shadow($size: 1px, $color: #000) {
  text-shadow: $size $size 0 $color, (-$size) $size 0 $color, (-$size) (-$size) 0 $color, $size (-$size) 0 $color, 0 0 10px $color;
}

@mixin underline() {
  text-decoration: underline;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.3em;
}
