/* Services/UIComponent/Button */

/*
Important: those classes and less are deprecated. Relevant Button less has been moved
the respective place in UI src/UI/templates/default/Button/button.less

Do NOT add any code here.

@Todo: This code needs to be (re)-moved. Are gradient-button btn-info and btn-link needed anymore?
*/

.gradient-button(@color, @borderColor, @startColor, @endColor, @startPercent, @endPercent, @degradeColor: @startColor) {
	color: @color;
	border-color: @borderColor;
	background-color: @degradeColor;
	#gradient > .vertical(@startColor, @endColor, @startPercent, @endPercent);
	.reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners

	&:hover {
		color: darken(@color, 10%);
		border-color: darken(@borderColor, 3%);
		background-color: lighten(@degradeColor, 2%);
		#gradient > .vertical(lighten(@startColor, 1%), lighten(@endColor, 1%), @startPercent, @endPercent);
		.reset-filter();
        .box-shadow(0 0 2px rgba(0, 0, 0, 0.2));
	}
	&:active {
		color: @color;
		border-color: darken(@borderColor, 1%);
		background-color: darken(@degradeColor, 1%);
		#gradient > .vertical(darken(@startColor, 1%), darken(@endColor, 1%), @startPercent, @endPercent);
		.reset-filter();
        .box-shadow(inset 0 2px 2px rgba(0, 0, 0, 0.05));
	}
}
/*
.btn-default, .open > .dropdown-toggle.btn-default {
	.gradient-button(@btn-default-color, @btn-default-border, @btn-default-bg, darken(@btn-default-bg, 5%), 0%, 100%);
}
*/

//overwrite buttons styles + add new one
//@color @background @border
.btn-info {
  .button-variant(@link-color; white; lighten(@link-color, 35%));
}
.btn-link {
  color: @link-color;
  border: 0 none;
  background-color: transparent;
  &:hover,
  &:focus,
  &:active {
	  color: @link-hover-color;
	  text-decoration: none;
	  background-color: transparent;
  }
}

/* old stuff */

input.ilSubmitInactive, input.ilSubmitInactive:hover, input.ilSubmitInactive:active,
a.ilSubmitInactive, a.ilSubmitInactive:hover , a.ilSubmitInactive:active {
	background-color: @il-disabled-btn-bg;
	border-color: @il-disabled-btn-border;
	color: @il-disabled-btn-color;
	cursor: default;
}

.split-btn ul {
	min-width: 180px
}

.split-btn-default {
	float: left
}

.btn-split.dropdown-toggle {
	border-left: 1px solid white;
	&:hover,
	&:focus,
	&:active {
		border-left: 1px solid white;
	}
}

button.btn:not(.btn-link) > span:first-child:not(:empty) {
	display: inline-block;
	min-width: @il-button-min-width;
	vertical-align: top;

	@media (max-width: @grid-float-breakpoint-max) {
			min-width: 0;
	}
}
