/**
 * Original code from WooCommerce
 * @link https://github.com/woothemes/woocommerce/blob/master/assets/css/_mixins.scss
 */

/**
 * Deprecated
 * Fallback for bourbon equivalent
 */
@mixin clearfix() {
  *zoom: 1;

  &:before,
  &:after {
    content: " ";
    display: table;
  }

  &:after {
    clear: both;
  }
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius($radius: 4px) {
  border-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_right($radius: 4px) {
  border-top-right-radius: $radius;
  border-bottom-right-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_left($radius: 4px) {
  border-top-left-radius: $radius;
  border-bottom-left-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_bottom($radius: 4px) {
  border-bottom-left-radius: $radius;
  border-bottom-right-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin border_radius_top($radius: 4px) {
  border-top-left-radius: $radius;
  border-top-right-radius: $radius;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin opacity( $opacity: 0.75 ) {
  opacity: $opacity;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin box_shadow($shadow_x: 3px, $shadow_y: 3px, $shadow_rad: 3px, $shadow_in: 3px, $shadow_color: #888) {
  box-shadow: $shadow_x $shadow_y $shadow_rad $shadow_in $shadow_color;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin inset_box_shadow($shadow_x: 3px, $shadow_y: 3px, $shadow_rad: 3px, $shadow_in: 3px, $shadow_color: #888) {
  box-shadow: inset $shadow_x $shadow_y $shadow_rad $shadow_in $shadow_color;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin text_shadow($shadow_x: 3px, $shadow_y: 3px, $shadow_rad: 3px, $shadow_color: #fff) {
  text-shadow: $shadow_x $shadow_y $shadow_rad $shadow_color;
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin vertical_gradient($from: #000, $to: #fff) {
  background-color: $from;
  background: -webkit-linear-gradient($from, $to);
}

/**
 * Deprecated
 * Vendor prefix no longer required.
 */
@mixin transition($selector: all, $animation: ease-in-out, $duration: .2s) {
  transition: $selector $animation $duration;
}

/**
 * Deprecated
 * Use bourbon mixin instead `@include transform(scale(1.5));`
 */
@mixin scale($ratio: 1.5) {
  -webkit-transform: scale($ratio);
  transform: scale($ratio);
}

/**
 * Deprecated
 * Use bourbon mixin instead `@include box-sizing(border-box);`
 */
@mixin borderbox() {
  box-sizing: border-box;
}

@mixin darkorlighttextshadow($a, $opacity: .8) {
  @if lightness($a) >= 65% {
    @include text_shadow(0, -1px, 0, rgba(0, 0, 0, $opacity));
  } @else {
    @include text_shadow(0, 1px, 0, rgba(255, 255, 255, $opacity));
  }
}