/**
 * =============================================================================
 * Helpers
 * =============================================================================
 */
@mixin default-icon-font( $font_name ) {
    font-family: $font_name;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

}

@mixin default-button {

    cursor: pointer; display: inline-block; margin: 0; padding: 0; position: relative;
    text-align: center; text-decoration: none; vertical-align: middle; white-space: nowrap;
    -webkit-appearance: none; -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none;

    -webkit-transition: all .2s ease-out;
    -moz-transition: all .2s ease-out;
    -o-transition: all .2s ease-out;
    transition: all .2s ease-out;
    -webkit-transform: translate3d(0,0,0);
    -moz-transform: translate3d(0,0,0);
    -o-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);

    width: auto;
    height: auto;

    &::-moz-focus-inner    {
        border: 0;
        padding: 0;
    }

}

@mixin font-gradient-enable {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-background-clip: text;
    -moz-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/**
 * =============================================================================
 * Image replacement
 * =============================================================================
 */
@mixin helper-ir {
    background-color: transparent;
    background-repeat: no-repeat;
    display: block;
    text-align: left;
    text-indent: -9999px;
    overflow: hidden;
}

/**
 * =============================================================================
 * Truncate (3 dot cut text)
 * =============================================================================
 */
@mixin truncate( $truncation-boundary: 100% ) {
    max-width: $truncation-boundary;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/**
 * =============================================================================
 * Hover and focus
 * =============================================================================
 */
@mixin hover {

    &:hover,
    &:focus {
        @content;
        outline: 0;
    }

}

@mixin active {

    &:active {
        @content;
    }

}

/**
 * =============================================================================
 * Border radius
 * =============================================================================
 */
@mixin border-radius($value) {
    // -webkit-border-radius: $value;
    // -moz-border-radius: $value;
    border-radius: $value;
}

@mixin border($style,  $sides){

    @if ($style != "") {

        @if ($sides == "") {

            border: $style;

        } @else {

            @each $side in $sides {

               @if ($side == 'top' or
                    $side == 'right' or
                    $side == 'bottom' or
                    $side == 'left') {

                    border-#{$side}: $style;

                }

            }

        }

    }

}

/**
 * =============================================================================
 * Box shadow
 * =============================================================================
 */
@mixin box-shadow($value) {
    // -webkit-box-shadow: $value;
    // -moz-box-shadow: $value;
    box-shadow: $value;
}

/**
 * =============================================================================
 * Text shadow
 * =============================================================================
 */
@mixin text-shadow($value) {
    text-shadow: $value;
}

/**
 * =============================================================================
 * Rotate
 * =============================================================================
 */
@mixin rotate($value) {
    -webkit-transform: rotate($value);
    -moz-transform: rotate($value);
    transform: rotate($value);
}

/**
 * =============================================================================
 * Animation
 * =============================================================================
 */
@mixin transition_transform($duration: 300, $easing: ease-in-out ){
    -webkit-transition: -webkit-transform #{$duration}ms #{$easing};
    -moz-transition: -moz-transform #{$duration}ms #{$easing};
    -o-transition: -o-transform #{$duration}ms #{$easing};
    transition: transform #{$duration}ms #{$easing};
}

@mixin transition($property, $time, $easing) {

    -webkit-transition: $property $time $easing;
       -moz-transition: $property $time $easing;
        -ms-transition: $property $time $easing;
         -o-transition: $property $time $easing;
            transition: $property $time $easing;

}

// Transformations
@mixin rotate($degrees) {
  -webkit-transform: rotate($degrees);
     -moz-transform: rotate($degrees);
      -ms-transform: rotate($degrees);
       -o-transform: rotate($degrees);
          transform: rotate($degrees);
}
@mixin scale($ratio) {
  -webkit-transform: scale($ratio);
     -moz-transform: scale($ratio);
      -ms-transform: scale($ratio);
       -o-transform: scale($ratio);
          transform: scale($ratio);
}
@mixin translate($x, $y) {
  -webkit-transform: translate($x, $y);
     -moz-transform: translate($x, $y);
      -ms-transform: translate($x, $y);
       -o-transform: translate($x, $y);
          transform: translate($x, $y);
}
@mixin skew($x, $y) {
  -webkit-transform: skew($x, $y);
     -moz-transform: skew($x, $y);
      -ms-transform: skew($x, $y);
       -o-transform: skew($x, $y);
          transform: skew($x, $y);
}
@mixin translate3d($x, $y, $z) {
  -webkit-transform: translate3d($x, $y, $z);
     -moz-transform: translate3d($x, $y, $z);
      -ms-transform: translate3d($x, $y, $z);
       -o-transform: translate3d($x, $y, $z);
          transform: translate3d($x, $y, $z);
}

/**
 * =============================================================================
 * Opacity
 * =============================================================================
 */
@mixin opacity($opacity) {
    $opacity-ie: $opacity * 100;
    opacity: $opacity;
    filter: alpha(opacity=$opacity-ie);
}



@mixin wb-gradient-def {
    background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjElIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjA1Ii8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
    background: -webkit-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.05) 100%);
    background: -ms-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.05) 100%);
    background: linear-gradient(to bottom,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.05) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#0d000000',GradientType=0 );
}

/**
 * =============================================================================
 * Breakpoints mixins
 * =============================================================================
 */

// two mixins for same shit
@mixin bp($point) {
    @media all and (min-width: em($point, 16)) {
        @content;
    }
}
@mixin bp-min($point) {
    @media all and (min-width: em($point, 16)) {
        @content;
    }
}

@mixin bp-max($point) {
    @media all and (max-width: em($point - 1, 16)) {
        @content;
    }
}

@mixin bp-range($min-point, $max-point) {
    @media all and (min-width: em($min-point, 16)) and (max-width: em($max-point, 16)) {
        @content;
    }
}

@mixin landscape {
    @media all and (orientation: landscape) {
        @content;
    }
}
@mixin portrait {
    @media all and (orientation: portrait) {
        @content;
    }
}

@mixin bp-max-height($point) {
    @media screen and (max-height: em($point, 16)) {
        @content;
    }
}
@mixin bp-min-height($point) {
    @media screen and (min-height: em($point, 16)) {
        @content;
    }
}
