/*
 * Dashicons mixin
 * use: @include dashicons( '\f140' );
 */
@mixin dashicons( $icon ) {
	content: $icon;
	font: normal 20px/1 'dashicons';
	speak: none;
	display: block;
	padding: 0;
	text-indent: 0;
	text-align: center;
	position: relative;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-decoration: none !important;
}

/*
 * Button mixin- creates 3d-ish button effect with correct 
 * highlights/shadows, based on a base color.
 */
@mixin button( $button-color, $text-color: white ) {
	background: $button-color;
	border-color: darken( $button-color, 10% );
	color: $text-color;
	-webkit-box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15);
	box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15);
	text-shadow: 0 -2px 2px darken( $button-color, 15% ), 2px 0 2px darken( $button-color, 15% ), 0 2px 2px darken( $button-color, 15% ), -2px 0 2px darken( $button-color, 15% );  

	&:hover,
	&:focus {
		background: darken( $button-color, 8% );
		border-color: darken( $button-color, 15% );
		color: $text-color;
		-webkit-box-shadow: inset 0 1px 0 lighten( $button-color, 10% ), 0 1px 0 rgba(0,0,0,.15);
		box-shadow: inset 0 1px 0 lighten( $button-color, 10% ), 0 1px 0 rgba(0,0,0,.15);
	}

	&:active {
		background: darken( $button-color, 8% );
		border-color: darken( $button-color, 15% );
		color: $text-color;
		-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
	 	box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
	}

	&[disabled],
	&:disabled,
	&.button-primary-disabled {
		color: hsl( hue( $button-color ), 10%, 80% ) !important;
		background: darken( $button-color, 8% ) !important;
		border-color: darken( $button-color, 15% ) !important;
		text-shadow: none !important;
	}
}

@mixin boxinset( $shadow: $link-focus, $inset-shadow: white ) {
	-webkit-box-shadow: inset 0 0 0 3px $inset-shadow,inset 0 0 0 7px $shadow !important;
	box-shadow: inset 0 0 0 3px $inset-shadow,inset 0 0 0 7px $shadow !important;
}

@mixin focusshadow( $shadow: $link-focus, $inset-shadow: white ) {
	-webkit-box-shadow: inset 0 0 2px 3px $inset-shadow,inset 0 0 0 7px $shadow !important;
    box-shadow: inset 0 0 2px 3px $inset-shadow,inset 0 0 0 7px $shadow !important;
}

@mixin tinybox( $shadow: $link-focus, $inset-shadow: white ) {
	-webkit-box-shadow: 0 0 0 1px $inset-shadow,0 0 0 2px $shadow !important;
	box-shadow: 0 0 0 1px $inset-shadow, 0 0 0 2px $shadow !important;
}
