@import '../../../../bootstrap/less/labels';

//
// Labels
// --------------------------------------------------

.label {
  display: inline-block;
  font-size: @label-font-size;
  padding: @label-padding-vertical @label-padding-horizontal;
  white-space: normal;

  button& {
    border: none;
  }

  &:focus {
    outline-offset: 0;
  }
}

// Text muted and faded in labels
.label .text-muted {
  color: fade(@label-color, percentage(alpha(@text-muted)));
}

.label .text-faded {
  color: fade(@label-color, percentage(alpha(@text-faded)));
}

// Text muted and faded in muted labels
.label[class*='muted'] .text-muted {
  color: fade(@label-secondary-color, percentage(alpha(@text-muted)));
}

.label[class*='muted'] .text-faded {
  color: fade(@label-secondary-color, percentage(alpha(@text-faded)));
}

// Colors
.label-default {
  .label-variant(@label-default-color, @label-default-bg);
}

.label-primary {
  .label-variant(@label-primary-color, @label-primary-bg);
}

.label-secondary {
  .label-variant(@label-secondary-color, @label-secondary-bg);
}

.label-success {
  .label-variant(@label-success-color, @label-success-bg);
}

.label-info {
  .label-variant(@label-info-color, @label-info-bg);
}

.label-warning {
  .label-variant(@label-warning-color, @label-warning-bg);
}

.label-danger {
  .label-variant(@label-danger-color, @label-danger-bg);
}


// Labels with equal length sides (i.e. rounded square)
.label.label-fixed-ratio {
  display: inline-block;
  vertical-align: middle;
  padding: 0;
  height: @label-fixed-ratio-size;
  width: @label-fixed-ratio-size;
  line-height: @label-fixed-ratio-size;
  font-size: inherit;
  border-radius: @label-fixed-ratio-radius;

  // Redefine empty state for specificity
  &:empty {
    display: none;
  }
}

// Circular labels (extends .label-fixed-ratio)
.label.label-circle {
  border-radius: 50%;
}
