/*
 * Button mixin- creates a button effect with correct
 * highlights/shadows, based on a base color.
 */
@mixin button( $button-color, $text-color: #fff ) {
	background: $button-color;
	border-color: $button-color;
	color: $text-color;

	&:hover,
	&:focus {
		background: lighten( $button-color, 3% );
		border-color: darken( $button-color, 3% );
		color: $text-color;
	}

	&:focus {
		box-shadow:
			0 0 0 1px #fff,
			0 0 0 3px $button-color;
	}

	&:active,
	&.active,
	&.active:focus,
	&.active:hover {
		background: darken( $button-color, 5% );
		border-color: darken( $button-color, 5% );
	}

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