/* @author Bilal Cinarli */

/** -------------------------------------------
    Arrow
    ------------------------------------------- **/
@mixin arrow ($color, $size, $direction: top, $el: ':after'){
	$_color: nth($color, 1);
	$_size: nth($size, 1);
	
	$_border-side: "border-bottom-color";
	
	@if length($color) == 2 {
		$_size2: $_size;
		
		@if length($size) == 2 {
			$_size2: nth($size, 2);
		}
		
		@include arrow(nth($color, 2), $_size2, $direction, ':before');
	}
	
	@if $direction == "right" {
		$_border-side: "border-left-color";
	}
	
	@else if $direction == "bottom" {
		$_border-side: "border-top-color";
	}
	
	@else if $direction == "left" {
		$_border-side: "border-right-color";
	}
	
	&#{$el} {
		content: "";
		position: absolute;
		width: 0;
		height: 0;
		border: solid transparent;
        #{$_border-side}: $_color;
        border-width: $_size;
		pointer-events: none;
	}
}