//
// Buttons
// --------------------------------------------------


// Base styles
// --------------------------------------------------

.bs-example {
	
	> .btn, 
	> .make-switch, 
	> .btn-group {
		margin-top: 4px;
		margin-bottom: 4px;
		margin-right: 9px;
	}
	
	&.bs-baseline-top {
		
		.btn, .btn-group {
			vertical-align: top !important;
		}
	}
}

// Core styles
.btn {
  display: inline-block;
  margin-bottom: 0; // For input.btn
  font-weight: @btn-font-weight;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
  border: 1px solid transparent;
  white-space: nowrap;
  .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
  .user-select(none);

  &:focus {
    .tab-focus();
  }

  &:hover,
  &:focus {
    color: @btn-default-color;
    text-decoration: none;
    outline: none;
  }

  &:active,
  &.active {
    outline: none;
    background-image: none;
    .box-shadow(inset 0 0px 7px rgba(0,0,0,.225));
    .box-shadow(inset 0 0px 4px rgba(0,0,0,.20));
  }

  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    cursor: not-allowed;
    pointer-events: none; // Future-proof disabling of clicks
    .opacity(.65);
    .box-shadow(none);
  }

  &.btn-icon {
  	position: relative;
  	
  	i {
	  	position: absolute;
	  	right: 0;
	  	top: 0;
	  	height: 100%;
  	}
  }
}

// Alternate buttons
// --------------------------------------------------

.btn-default {
  .button-variant(@btn-default-color; @secondary_background_color; @btn-default-border);
}
.btn-primary {
  .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
}
.btn-blue {
	.button-variant(#FFF, #0072bc, #0072bc);
}
.btn-red {
	.button-variant(#FFF, #d42020, #d42020);
}
.btn-orange {
	.button-variant(#FFF, #ff9600, #ff9600);
}
.btn-gold {
	.button-variant(#846e20, #fcd036, #fcd036);
}
.btn-black {
	.button-variant(#FFF, #000000, #000000);
}
.btn-white {
	.button-variant(@main_color, #FFF, #FFF);
	border-color: @default;
}
.btn-warning {
  .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
}
.btn-danger {
  .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
}
.btn-success, .btn-green {
  .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
}
.btn-info {
  .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
}


// Link buttons
// -------------------------

// Make a button look and behave like a link
.btn-link {
  color: @link-color;
  font-weight: normal;
  cursor: pointer;
  border-radius: 0;

  &,
  &:active,
  &[disabled],
  fieldset[disabled] & {
    background-color: transparent;
    .box-shadow(none);
  }
  &,
  &:hover,
  &:focus,
  &:active {
    border-color: transparent;
  }
  &:hover,
  &:focus {
    color: @link-hover-color;
    text-decoration: underline;
    background-color: transparent;
  }
  &[disabled],
  fieldset[disabled] & {
    &:hover,
    &:focus {
      color: @btn-link-disabled-color;
      text-decoration: none;
    }
  }
}


// Button Sizes
// --------------------------------------------------

.btn-lg {
  // line-height: ensure even-numbered height of button next to large input
  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
}
.btn-sm,
.btn-xs {
  // line-height: ensure proper height of button next to small input
  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}
.btn-xs {
  padding: 1px 5px;
}


// Block button
// --------------------------------------------------

.btn-block {
  display: block;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

// Vertically space out multiple block buttons
.btn-block + .btn-block {
  margin-top: 5px;
}

// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
  &.btn-block {
    width: 100%;
  }
}
