/*!
 * # Semantic UI - Label
 * http://github.com/semantic-org/semantic-ui/
 *
 *
 * Copyright 2014 Contributors
 * Released under the MIT license
 * http://opensource.org/licenses/MIT
 *
 */


/*******************************
            Theme
*******************************/

@type    : 'element';
@element : 'label';

@import (multiple) '../../theme.config';

/*******************************
            Label
*******************************/

.ui.label {
  display: inline-block;
  vertical-align: @verticalAlign;
  line-height: 1;

  margin: @verticalMargin @horizontalMargin;

  background-color: @backgroundColor;
  border-color: @backgroundColor;

  background-image: @backgroundImage;

  padding: @verticalPadding @horizontalPadding;
  color: @labelTextColor;

  text-transform: @textTransform;
  font-weight: @fontWeight;

  border-radius: @borderRadius;
  box-sizing: border-box;
  transition: @transition;
}

.ui.label:first-child {
  margin-left: 0em;
}
.ui.label:last-child {
  margin-right: 0em;
}


/* Link */
a.ui.label {
  cursor: pointer;
}

/* Inside Link */
.ui.label a {
  cursor: pointer;
  color: inherit;
  opacity: @linkOpacity;
  transition: @linkTransition;
}
.ui.label a:hover {
  opacity: 1;
}

/* Icon */
.ui.label .icon {
  width: auto;
  margin: 0em @iconDistance 0em 0em;
}
/* Detail */
.ui.label .detail {
  display: inline-block;
  vertical-align: top;
  font-weight: @detailFontWeight;
  margin-left: @detailMargin;
  opacity: @detailOpacity;
}
.ui.label .detail .icon {
  margin: 0em @detailIconDistance 0em 0em;
}


/* Removable label */
.ui.label .close.icon,
.ui.label .delete.icon {
  cursor: pointer;
  margin-right: 0em;
  margin-left: @deleteMargin;
  opacity: @linkOpacity;
  transition: @deleteTransition;
}
.ui.label .delete.icon:hover {
  opacity: 1;
}

/*-------------------
       Group
--------------------*/

.ui.labels .label {
  margin: 0em @groupHorizontalMargin @groupVerticalMargin 0em;
}


/*-------------------
       Coupling
--------------------*/

/* Remove border radius on attached segment */
.ui.attached.segment > .ui.top.left.attached.label,
.ui.bottom.attached.segment > .ui.top.left.attached.label  {
  border-top-left-radius: 0;
}
.ui.attached.segment > .ui.top.right.attached.label,
.ui.bottom.attached.segment > .ui.top.right.attached.label  {
  border-top-right-radius: 0;
}
.ui.top.attached.segment > .ui.bottom.left.attached.label  {
  border-bottom-left-radius: 0;
}
.ui.top.attached.segment > .ui.bottom.right.attached.label  {
  border-bottom-right-radius: 0;
}

/* Padding on next content after a label */
.ui.top.attached.label:first-child + :not(.attached) {
  margin-top: @attachedSegmentPadding !important;
}
.ui.bottom.attached.label:first-child ~ :last-child:not(.attached) {
  margin-top: 0em;
  margin-bottom: @attachedSegmentPadding !important;
}


/*******************************
             Types
*******************************/

.ui.image.label {
  width: auto !important;
  margin-top: 0em;
  margin-bottom: 0em;
  max-width: 9999px;
  vertical-align: baseline;
  text-transform: none;

  background: @imageLabelBackground;
  padding: @imageLabelPadding;
  border-radius: @imageLabelBorderRadius;
  box-shadow: @imageLabelBoxShadow;
}

.ui.image.label img {
  display: inline-block;
  vertical-align: top;

  height: @imageLabelImageHeight;
  margin: @imageLabelImageMargin;
  border-radius: @imageLabelBorderRadius;
}

.ui.image.label .detail {
  background: @imageLabelDetailBackground;
  margin: @imageLabelDetailMargin;
  padding: @imageLabelDetailPadding;
  border-radius: 0em @imageLabelBorderRadius @imageLabelBorderRadius 0em;
}

/*-------------------
         Tag
--------------------*/

.ui.tag.labels .label,
.ui.tag.label {
  margin-left: 1em;
  position: relative;
  padding-left: @tagHorizontalPadding;
  padding-right: @tagHorizontalPadding;

  border-radius: 0em @borderRadius @borderRadius 0em;
}
.ui.tag.labels .label:before,
.ui.tag.label:before {
    position: absolute;
    transform: translateY(-50%) translateX(50%) rotate(-45deg);

    top: @tagTriangleTopOffset;
    right: @tagTriangleRightOffset;
    content: '';

    background-color: @backgroundColor;
    background-image: @backgroundImage;

    width: @tagTriangleSize;
    height: @tagTriangleSize;
    transition: @tagTransition;
}


.ui.tag.labels .label:after,
.ui.tag.label:after {
  position: absolute;
  content: '';
  top: 50%;
  left: -(@tagCircleSize / 2);

  margin-top: -(@tagCircleSize / 2);
  background-color: @tagCircleColor !important;
  width: @tagCircleSize;
  height: @tagCircleSize;

  box-shadow: @tagCircleBoxShadow;
  border-radius: @circularRadius;
}


/*-------------------
    Corner Label
--------------------*/

.ui.corner.label {
  position: absolute;
  top: 0em;
  right: 0em;
  margin: 0em;
  padding: 0em;
  text-align: center;

  width: @cornerTriangleSize;
  height: @cornerTriangleSize;
  z-index: @cornerTriangleZIndex;
  transition: @cornerTriangleTransition;
}

/* Icon Label */
.ui.corner.label{
  background-color: transparent !important;
}
.ui.corner.label:after {
  position: absolute;
  content: "";
  right: 0em;
  top: 0em;
  z-index: -1;

  width: 0em;
  height: 0em;
  background-color: transparent !important;

  border-top: 0em solid transparent;
  border-right: @cornerTriangleSize solid transparent;
  border-bottom: @cornerTriangleSize solid transparent;
  border-left: 0em solid transparent;

  border-right-color: inherit;
  transition: @cornerTriangleTransition;
}

.ui.corner.label .icon {
  position: relative;
  top: @cornerIconTopOffset;
  left: @cornerIconLeftOffset;
  font-size: @cornerIconSize;
  margin: 0em;
}

/* Left Corner */
.ui.left.corner.label,
.ui.left.corner.label:after {
  right: auto;
  left: 0em;
}
.ui.left.corner.label:after {
  border-top: @cornerTriangleSize solid transparent;
  border-right: @cornerTriangleSize solid transparent;
  border-bottom: 0em solid transparent;
  border-left: 0em solid transparent;

  border-top-color: inherit;
}
.ui.left.corner.label .icon {
  left: -@cornerIconLeftOffset;
}

/* Segment */
.ui.segment > .ui.corner.label {
  top: -1px;
  right: -1px;
}
.ui.segment > .ui.left.corner.label {
  right: auto;
  left: -1px;
}

/* Input */
.ui.input > .ui.corner.label {
  top: 1px;
  right: 1px;
}
.ui.input > .ui.right.corner.label {
  right: auto;
  left: 1px;
}


/*-------------------
       Ribbon
--------------------*/

.ui.ribbon.label {
  position: relative;
  margin: 0em;
  min-width: max-content;
  border-radius: 0em @borderRadius @borderRadius 0em;
  border-color: @ribbonShadowColor;
}

.ui.ribbon.label:after {
  position: absolute;
  content: '';

  top: 100%;
  left: 0%;
  background-color: transparent !important;

  border-style: solid;
  border-width: 0em @ribbonTriangleSize @ribbonTriangleSize 0em;
  border-color: transparent;
  border-right-color: inherit;

  width: 0em;
  height: 0em;
}

/* Right Ribbon */
.ui[class*="right ribbon"].label {
  text-align: left;
  transform: translateX(-100%);
  border-radius: @borderRadius 0em 0em @borderRadius;
  padding-left: @horizontalPadding;
}
.ui[class*="right ribbon"].label:after {
  left: auto;
  right: 0%;

  border-style: solid;
  border-width: @ribbonTriangleSize @ribbonTriangleSize 0em 0em;
  border-color: transparent;
  border-top-color: inherit;
}

/* Positioning */
.ui.ribbon.label {
  left: @ribbonOffset;
  margin-right: -@ribbonTriangleSize;
  padding-left: @ribbonDistance;
}
.ui[class*="right ribbon"].label {
  left: @rightRibbonOffset;
  padding-right: @ribbonDistance;
}


/* Inside Image */
.ui.image > .ribbon.label,
.ui.card .image > .ribbon.label {
  position: absolute;
  top: @ribbonImageTopDistance;
}
.ui.card .image > .ui.ribbon.label,
.ui.image > .ui.ribbon.label {
  left: @ribbonImageOffset;
  padding-left: @ribbonImageDistance;
}
.ui.card .image > .ui[class*="right ribbon"].label,
.ui.image > .ui[class*="right ribbon"].label {
  left: @rightRibbonImageOffset;
  padding-left: @horizontalPadding;
  padding-right: @ribbonImageDistance;
}


/*-------------------
      Attached
--------------------*/

.ui.top.attached.label,
.ui.attached.label {
  width: 100%;
  position: absolute;
  margin: 0em;
  top: 0em;
  left: 0em;

  padding: @attachedVerticalPadding @attachedHorizontalPadding;

  border-radius: @borderRadius @borderRadius 0em 0em;
}
.ui.bottom.attached.label {
  top: auto;
  bottom: 0em;
  border-radius: 0em 0em @borderRadius @borderRadius;
}

.ui.top.left.attached.label {
  width: auto;
  margin-top: 0em !important;
  border-radius: @borderRadius 0em @borderRadius 0em;
}

.ui.top.right.attached.label {
  width: auto;
  left: auto;
  right: 0em;
  border-radius: 0em @borderRadius 0em @borderRadius;
}
.ui.bottom.left.attached.label {
  width: auto;
  top: auto;
  bottom: 0em;
  border-radius: 0em @borderRadius 0em @borderRadius;
}
.ui.bottom.right.attached.label {
  top: auto;
  bottom: 0em;
  left: auto;
  right: 0em;
  width: auto;
  border-radius: @borderRadius 0em @borderRadius 0em;
}


/*******************************
             States
*******************************/

/*-------------------
      Disabled
--------------------*/

.ui.label.disabled {
  opacity: 0.5;
}

/*-------------------
        Hover
--------------------*/

a.ui.labels .label:hover,
a.ui.label:hover {
  background-color: @labelHoverBackgroundColor;
  border-color: @labelHoverBackgroundColor;

  background-image: @labelHoverBackgroundImage;
  color: @labelHoverTextColor;
}
.ui.labels a.label:hover:before,
a.ui.label:hover:before {
  background-color: @labelHoverBackgroundColor;
  background-image: @labelHoverBackgroundImage;
  color: @labelHoverTextColor;
}

/*-------------------
      Visible
--------------------*/

.ui.labels.visible .label,
.ui.label.visible {
  display: inline-block !important;
}

/*-------------------
      Hidden
--------------------*/

.ui.labels.hidden .label,
.ui.label.hidden {
  display: none !important;
}


/*******************************
           Variations
*******************************/


/*-------------------
       Colors
--------------------*/

/*--- Black ---*/
.ui.black.labels .label,
.ui.black.label {
  background-color: @black !important;
  border-color: @black !important;
  color: @invertedTextColor !important;
}
.ui.labels .black.label:before,
.ui.black.labels .label:before,
.ui.black.label:before {
  background-color: @black !important;
}
a.ui.black.labels .label:hover,
a.ui.black.label:hover {
  background-color: @blackHover !important;
  border-color: @blackHover !important;
}
.ui.labels a.black.label:hover:before,
.ui.black.labels a.label:hover:before,
a.ui.black.label:hover:before {
  background-color: @blackHover !important;
}
.ui.black.corner.label,
.ui.black.corner.label:hover {
  background-color: transparent !important;
}
.ui.black.ribbon.label {
  border-color: @blackRibbonShadow !important;
}

/*--- Blue ---*/
.ui.blue.labels .label,
.ui.blue.label {
  background-color: @blue !important;
  border-color: @blue !important;
  color: @invertedTextColor !important;
}
.ui.labels .blue.label:before,
.ui.blue.labels .label:before,
.ui.blue.label:before {
  background-color: @blue !important;
}
a.ui.blue.labels .label:hover,
.ui.blue.labels a.label:hover,
a.ui.blue.label:hover {
  background-color: @blueHover !important;
  border-color: @blueHover !important;
  color: @invertedTextColor !important;
}
.ui.labels a.blue.label:hover:before,
.ui.blue.labels a.label:hover:before,
a.ui.blue.label:hover:before {
  background-color: @blueHover !important;
}
.ui.blue.corner.label,
.ui.blue.corner.label:hover {
  background-color: transparent !important;
}
.ui.blue.ribbon.label {
  border-color: @blueRibbonShadow !important;
}

/*--- Green ---*/
.ui.green.labels .label,
.ui.green.label {
  background-color: @green !important;
  border-color: @green !important;
  color: @invertedTextColor !important;
}
.ui.labels .green.label:before,
.ui.green.labels .label:before,
.ui.green.label:before {
  background-color: @green !important;
}

a.ui.green.labels .label:hover,
a.ui.green.label:hover {
  background-color: @greenHover !important;
  border-color: @greenHover !important;
}
.ui.labels a.green.label:hover:before,
.ui.green.labels a.label:hover:before,
a.ui.green.label:hover:before {
  background-color: @greenHover !important;
}

.ui.green.corner.label,
.ui.green.corner.label:hover {
  background-color: transparent !important;
}
.ui.green.ribbon.label {
  border-color: @greenRibbonShadow !important;
}

/*--- Orange ---*/
.ui.orange.labels .label,
.ui.orange.label {
  background-color: @orange !important;
  border-color: @orange !important;
  color: @invertedTextColor !important;
}
.ui.labels .orange.label:before,
.ui.orange.labels .label:before,
.ui.orange.label:before {
  background-color: @orange !important;
}
a.ui.orange.labels .label:hover,
.ui.orange.labels a.label:hover,
a.ui.orange.label:hover {
  background-color: @orangeHover !important;
  border-color: @orangeHover !important;
  color: @invertedTextColor !important;
}
.ui.labels a.orange.label:hover:before,
.ui.orange.labels a.label:hover:before,
a.ui.orange.label:hover:before {
  background-color: @orangeHover !important;
}
.ui.orange.corner.label,
.ui.orange.corner.label:hover {
  background-color: transparent !important;
}
.ui.orange.ribbon.label {
  border-color: @orangeRibbonShadow !important;
}

/*--- Pink ---*/
.ui.pink.labels .label,
.ui.pink.label {
  background-color: @pink !important;
  border-color: @pink !important;
  color: @invertedTextColor !important;
}
.ui.labels .pink.label:before,
.ui.pink.labels .label:before,
.ui.pink.label:before {
  background-color: @pink !important;
}
a.ui.pink.labels .label:hover,
.ui.pink.labels a.label:hover,
a.ui.pink.label:hover {
  background-color: @pinkHover !important;
  border-color: @pinkHover !important;
  color: @invertedTextColor !important;
}
.ui.labels a.pink.label:hover:before,
.ui.pink.labels a.label:hover:before,
a.ui.pink.label:hover:before {
  background-color: @pinkHover !important;
}
.ui.pink.corner.label,
.ui.pink.corner.label:hover {
  background-color: transparent !important;
}
.ui.pink.ribbon.label {
  border-color: @pinkRibbonShadow !important;
}

/*--- Purple ---*/
.ui.purple.labels .label,
.ui.purple.label {
  background-color: @purple !important;
  border-color: @purple !important;
  color: @invertedTextColor !important;
}
.ui.labels .purple.label:before,
.ui.purple.labels .label:before,
.ui.purple.label:before {
  background-color: @purple !important;
}
a.ui.purple.labels .label:hover,
.ui.purple.labels a.label:hover,
a.ui.purple.label:hover {
  background-color: @purpleHover !important;
  border-color: @purpleHover !important;
  color: @invertedTextColor !important;
}
.ui.labels a.purple.label:hover:before,
.ui.purple.labels a.label:hover:before,
a.ui.purple.label:hover:before {
  background-color: @purpleHover !important;
}
.ui.purple.corner.label,
.ui.purple.corner.label:hover {
  background-color: transparent !important;
}
.ui.purple.ribbon.label {
  border-color: @purpleRibbonShadow !important;
}

/*--- Red ---*/
.ui.red.labels .label,
.ui.red.label {
  background-color: @red !important;
  border-color: @red !important;
  color: @invertedTextColor !important;
}
.ui.labels .red.label:before,
.ui.red.labels .label:before,
.ui.red.label:before {
  background-color: @red !important;
}
.ui.red.corner.label,
.ui.red.corner.label:hover {
  background-color: transparent !important;
}

a.ui.red.labels .label:hover,
a.ui.red.label:hover{
  background-color: @redHover !important;
  border-color: @redHover !important;
  color: @invertedTextColor !important;
}
.ui.labels a.red.label:hover:before,
.ui.red.labels a.label:hover:before,
a.ui.red.label:hover:before {
  background-color: @redHover !important;
}
.ui.red.ribbon.label {
  border-color: @redRibbonShadow !important;
}

/*--- Teal ---*/
.ui.teal.labels .label,
.ui.teal.label {
  background-color: @teal !important;
  border-color: @teal !important;
  color: @invertedTextColor !important;
}
.ui.labels .teal.label:before,
.ui.teal.labels .label:before,
.ui.teal.label:before {
  background-color: @teal !important;
}
a.ui.teal.labels .label:hover,
.ui.teal.labels a.label:hover,
a.ui.teal.label:hover {
  background-color: @tealHover !important;
  border-color: @tealHover !important;
  color: @invertedTextColor !important;
}
.ui.labels a.teal.label:hover:before,
.ui.teal.labels a.label:hover:before,
a.ui.teal.label:hover:before {
  background-color: @tealHover !important;
}
.ui.teal.corner.label,
.ui.teal.corner.label:hover {
  background-color: transparent !important;
}
.ui.teal.ribbon.label {
  border-color: @tealRibbonShadow !important;
}

/*--- Yellow ---*/
.ui.yellow.labels .label,
.ui.yellow.label {
  background-color: @yellow !important;
  border-color: @yellow !important;
  color: @invertedTextColor !important;
}
.ui.labels .yellow.label:before,
.ui.yellow.labels .label:before,
.ui.yellow.label:before {
  background-color: @yellow !important;
}
a.ui.yellow.labels .label:hover,
.ui.yellow.labels a.label:hover,
a.ui.yellow.label:hover {
  background-color: @yellowHover !important;
  border-color: @yellowHover !important;
  color: @invertedTextColor !important;
}
.ui.labels a.yellow.label:hover:before,
.ui.yellow.labels a.label:hover:before,
a.ui.yellow.label:hover:before {
  background-color: @yellowHover !important;
}
.ui.yellow.corner.label,
.ui.yellow.corner.label:hover {
  background-color: transparent !important;
}
.ui.yellow.ribbon.label {
  border-color: @yellowRibbonShadow !important;
}

/*-------------------
       Fluid
--------------------*/

.ui.label.fluid,
.ui.fluid.labels > .label {
  width: 100%;
  box-sizing: border-box;
}

/*-------------------
       Inverted
--------------------*/

.ui.inverted.labels .label,
.ui.inverted.label {
  color: @invertedTextColor !important;
}

/*-------------------
     Horizontal
--------------------*/

.ui.horizontal.labels .label,
.ui.horizontal.label {
  margin: 0em @horizontalLabelMargin 0em 0em;

  padding: @horizontalLabelVerticalPadding @horizontalPadding;
  min-width: @horizontalLabelMinWidth;
  text-align: center;
}


/*-------------------
       Circular
--------------------*/

.ui.circular.labels .label,
.ui.circular.label {
  min-width: @circularMinSize;
  min-height: @circularMinSize;

  padding: @circularPadding !important;

  line-height: 1em;
  text-align: center;
  border-radius: @circularRadius;
}
.ui.empty.circular.labels .label,
.ui.empty.circular.label {
  min-width: 0em;
  min-height: 0em;
  overflow: hidden;
  width: @emptyCircleSize;
  height: @emptyCircleSize;
  vertical-align: baseline;
}

/*-------------------
       Pointing
--------------------*/

.ui.pointing.label {
  position: relative;
}
.ui.attached.pointing.label {
  position: absolute;
}

.ui.pointing.label:before {
  position: absolute;
  content: '';
  transform: rotate(45deg);
  background-image: none;

  z-index: @pointingTriangleZIndex;
  width: @pointingTriangleSize;
  height: @pointingTriangleSize;
  transition: @pointingTriangleTransition;
}
/*--- Above ---*/
.ui.pointing.label:before {
  background-color: @backgroundColor;
  background-image: @backgroundImage;
}
.ui.pointing.label,
.ui.pointing.above.label {
  margin-top: @pointingVerticalDistance;
}
.ui.pointing.label:before,
.ui.pointing.above.label:before {
  margin-left: -@pointingTriangleOffset;
  top: -@pointingTriangleOffset;
  left: 50%;
}
/*--- Below ---*/
.ui.pointing.bottom.label,
.ui.pointing.below.label {
  margin-top: 0em;
  margin-bottom: @pointingVerticalDistance;
}
.ui.pointing.bottom.label:before,
.ui.pointing.below.label:before {
  margin-left: -@pointingTriangleOffset;
  top: auto;
  right: auto;
  bottom: -@pointingTriangleOffset;
  left: 50%;
}
/*--- Left ---*/
.ui.pointing.left.label {
  margin-top: 0em;
  margin-left: @pointingHorizontalDistance;
}
.ui.pointing.left.label:before {
  margin-top: -@pointingTriangleOffset;
  bottom: auto;
  right: auto;
  top: 50%;
  left: 0em;
}
/*--- Right ---*/
.ui.pointing.right.label {
  margin-top: 0em;
  margin-right: @pointingHorizontalDistance;
}
.ui.pointing.right.label:before {
  margin-top: -@pointingTriangleOffset;
  right: -@pointingTriangleOffset;
  top: 50%;
  bottom: auto;
  left: auto;
}

/*------------------
   Floating Label
-------------------*/

.ui.floating.label {
  position: absolute;
  z-index: @floatingZIndex;
  top: @floatingTopOffset;
  left: 100%;
  margin: 0em 0em 0em @floatingLeftOffset !important;
}

/*-------------------
        Sizes
--------------------*/

.ui.mini.labels .label,
.ui.mini.label {
  font-size: @mini;
}
.ui.tiny.labels .label,
.ui.tiny.label {
  font-size: @tiny;
}
.ui.small.labels .label,
.ui.small.label {
  font-size: @small;
}
.ui.labels .label,
.ui.label {
  font-size: @medium;
}
.ui.large.labels .label,
.ui.large.label {
  font-size: @large;
}
.ui.big.labels .label,
.ui.big.label {
  font-size: @big;
}
.ui.huge.labels .label,
.ui.huge.label {
  font-size: @huge;
}
.ui.massive.labels .label,
.ui.massive.label {
  font-size: @massive;
}

.loadUIOverrides();