/*!
 * # Fomantic-UI - Header
 * http://github.com/fomantic/Fomantic-UI/
 *
 *
 * Released under the MIT license
 * http://opensource.org/licenses/MIT
 *
 */


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

@type    : 'element';
@element : 'header';

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


/*******************************
            Header
*******************************/

/* Standard */
.ui.header {
  border: none;
  margin: @margin;
  padding: @verticalPadding @horizontalPadding;
  font-family: @fontFamily;
  font-weight: @fontWeight;
  line-height: @lineHeight;
  text-transform: @textTransform;
  color: @textColor;
}

.ui.header:first-child {
  margin-top: @firstMargin;
}
.ui.header:last-child {
  margin-bottom: @lastMargin;
}

/*--------------
   Sub Header
---------------*/

.ui.header .sub.header {
  display: block;
  font-weight: @normal;
  padding: 0;
  margin: @subHeaderMargin;
  font-size: @subHeaderFontSize;
  line-height: @subHeaderLineHeight;
  color: @subHeaderColor;
}

/*--------------
      Icon
---------------*/

.ui.header > .icon {
  display: table-cell;
  opacity: @iconOpacity;
  font-size: @iconSize;
  padding-top: @iconOffset;
  vertical-align: @iconAlignment;
}

/* With Text Node */
.ui.header .icon:only-child {
  display: inline-block;
  padding: 0;
  margin-right: @iconMargin;
}

/*-------------------
        Image
--------------------*/

.ui.header > .image:not(.icon),
.ui.header > img {
  display: inline-block;
  margin-top: @imageOffset;
  width: @imageWidth;
  height: @imageHeight;
  vertical-align: @imageAlignment;
}
.ui.header > .image:not(.icon):only-child,
.ui.header > img:only-child {
  margin-right: @imageMargin;
}

/*--------------
     Content
---------------*/

.ui.header .content {
  display: inline-block;
  vertical-align: @contentAlignment;
}

/* After Image */
.ui.header > img + .content,
.ui.header > .image + .content {
  padding-left: @imageMargin;
  vertical-align: @contentImageAlignment;
}

/* After Icon */
.ui.header > .icon + .content {
  padding-left: @iconMargin;
  display: table-cell;
  vertical-align: @contentIconAlignment;
}


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

.ui.header .ui.label {
  font-size: @labelSize;
  margin-left: @labelDistance;
  vertical-align: @labelVerticalAlign;
}

/* Positioning */
.ui.header + p {
  margin-top: @nextParagraphDistance;
}



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


/*--------------
     Page
---------------*/

h1.ui.header {
  font-size: @h1;
}
h2.ui.header {
  font-size: @h2;
}
h3.ui.header {
  font-size: @h3;
}
h4.ui.header {
  font-size: @h4;
}
h5.ui.header {
  font-size: @h5;
}


/* Sub Header */
h1.ui.header .sub.header {
  font-size: @h1SubHeaderFontSize;
}
h2.ui.header .sub.header {
  font-size: @h2SubHeaderFontSize;
}
h3.ui.header .sub.header {
  font-size: @h3SubHeaderFontSize;
}
h4.ui.header .sub.header {
  font-size: @h4SubHeaderFontSize;
}
h5.ui.header .sub.header {
  font-size: @h5SubHeaderFontSize;
}


/*--------------
 Content Heading
---------------*/

.ui.huge.header {
  min-height: 1em;
  font-size: @hugeFontSize;
}
.ui.large.header {
  font-size: @largeFontSize;
}
.ui.medium.header {
  font-size: @mediumFontSize;
}
.ui.small.header {
  font-size: @smallFontSize;
}
.ui.tiny.header {
  font-size: @tinyFontSize;
}

/* Sub Header */
.ui.huge.header .sub.header {
  font-size: @hugeSubHeaderFontSize;
}
.ui.large.header .sub.header {
  font-size: @hugeSubHeaderFontSize;
}
.ui.header .sub.header {
  font-size: @subHeaderFontSize;
}
.ui.small.header .sub.header {
  font-size: @smallSubHeaderFontSize;
}
.ui.tiny.header .sub.header {
  font-size: @tinySubHeaderFontSize;
}

/*--------------
   Sub Heading
---------------*/

.ui.sub.header {
  padding: 0;
  margin-bottom: @subHeadingDistance;
  font-weight: @subHeadingFontWeight;
  font-size: @subHeadingFontSize;
  text-transform: @subHeadingTextTransform;
  color: @subHeadingColor;
}

.ui.small.sub.header {
  font-size: @smallSubHeadingSize;
}
.ui.large.sub.header {
  font-size: @largeSubHeadingSize;
}
.ui.huge.sub.header {
  font-size: @hugeSubHeadingSize;
}



/*-------------------
        Icon
--------------------*/

.ui.icon.header {
  display: inline-block;
  text-align: center;
  margin: @iconHeaderTopMargin 0 @iconHeaderBottomMargin;
}
.ui.icon.header:after {
  content: '';
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

.ui.icon.header:first-child {
  margin-top: @iconHeaderFirstMargin;
}
.ui.icon.header .icon {
  float: none;
  display: block;
  width: auto;
  height: auto;
  line-height: 1;
  padding: 0;
  font-size: @iconHeaderSize;
  margin: 0 auto @iconHeaderMargin;
  opacity: @iconHeaderOpacity;
}
.ui.icon.header .corner.icon {
  font-size: @cornerIconHeaderSize;
}
.ui.icon.header .content {
  display: block;
  padding: 0;
}
.ui.icon.header .circular.icon {
  font-size: @circularHeaderIconSize;
}
.ui.icon.header .square.icon {
  font-size: @squareHeaderIconSize;
}
.ui.block.icon.header .icon {
  margin-bottom: 0;
}
.ui.icon.header.aligned {
  margin-left: auto;
  margin-right: auto;
  display: block;
}

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

.ui.disabled.header {
  opacity: @disabledOpacity;
}


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

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

.ui.inverted.header {
  color: @invertedColor;
}
.ui.inverted.header .sub.header {
  color: @invertedSubHeaderColor;
}
.ui.inverted.attached.header {
  background: @invertedAttachedBackground;
  box-shadow: none;
  border-color: transparent;
}
.ui.inverted.block.header {
  background: @invertedBlockBackground;
  box-shadow: none;
  border-bottom: none;
}


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

each(@colors, {
  @color: replace(@key, '@', '');
  @c: @colors[@@color][color];
  @l: @colors[@@color][light];
  @h: @colors[@@color][hover];
  @lh: @colors[@@color][lightHover];

  .ui.@{color}.header {
    color: @c;
  }
  a.ui.@{color}.header:hover {
    color: @h;
  }
  .ui.@{color}.dividing.header {
    border-bottom: @dividedColoredBorderWidth solid @c;
  }
  .ui.inverted.@{color}.header.header.header {
    color: @l;
  }
  a.ui.inverted.@{color}.header.header.header:hover {
    color: @lh;
  }
  .ui.inverted.@{color}.dividing.header {
    border-bottom: @dividedColoredBorderWidth solid @l;
  }
})


/*-------------------
       Aligned
--------------------*/

.ui.left.aligned.header {
  text-align: left;
}
.ui.right.aligned.header {
  text-align: right;
}
.ui.centered.header,
.ui.center.aligned.header {
  text-align: center;
}
.ui.justified.header {
  text-align: justify;
}
.ui.justified.header:after {
  display: inline-block;
  content: '';
  width: 100%;
}

/*-------------------
       Floated
--------------------*/

.ui.floated.header,
.ui[class*="left floated"].header {
  float: left;
  margin-top: 0;
  margin-right: @floatedMargin;
}
.ui[class*="right floated"].header {
  float: right;
  margin-top: 0;
  margin-left: @floatedMargin;
}

/*-------------------
       Fitted
--------------------*/

.ui.fitted.header {
  padding: 0;
}


/*-------------------
      Dividing
--------------------*/

.ui.dividing.header {
  padding-bottom: @dividedBorderPadding;
  border-bottom: @dividedBorder;
}
.ui.dividing.header .sub.header {
  padding-bottom: @dividedSubHeaderPadding;
}
.ui.dividing.header .icon {
  margin-bottom: @dividedIconPadding;
}

.ui.inverted.dividing.header {
  border-bottom-color: @invertedDividedBorderColor;
}


/*-------------------
        Block
--------------------*/

.ui.block.header {
  background: @blockBackground;
  padding: @blockVerticalPadding @blockHorizontalPadding;
  box-shadow: @blockBoxShadow;
  border: @blockBorder;
  border-radius: @blockBorderRadius;
}

.ui.tiny.block.header {
  font-size: @tinyBlock;
}
.ui.small.block.header {
  font-size: @smallBlock;
}
.ui.block.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
  font-size: @mediumBlock;
}
.ui.large.block.header {
  font-size: @largeBlock;
}
.ui.huge.block.header {
  font-size: @hugeBlock;
}

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

.ui.attached.header {
  background: @attachedBackground;
  padding: @attachedVerticalPadding @attachedHorizontalPadding;
  margin: 0 @attachedOffset 0 @attachedOffset;
  box-shadow: @attachedBoxShadow;
  border: @attachedBorder;
  border-radius: 0;
}
.ui.attached.block.header {
  background: @blockBackground;
}
.ui.attached:not(.top).header {
  border-top: none;
}
.ui.top.attached.header {
  border-radius: @attachedBorderRadius @attachedBorderRadius 0 0;
}
.ui.bottom.attached.header {
  border-radius: 0 0 @attachedBorderRadius @attachedBorderRadius;
}

/* Attached Sizes */
.ui.tiny.attached.header {
  font-size: @tinyAttachedSize;
}
.ui.small.attached.header {
  font-size: @smallAttachedSize;
}
.ui.attached.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
  font-size: @mediumAttachedSize;
}
.ui.large.attached.header {
  font-size: @largeAttachedSize;
}
.ui.huge.attached.header {
  font-size: @hugeAttachedSize;
}

/*-------------------
        Sizing
--------------------*/

.ui.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
  font-size: @mediumFontSize;
}

.loadUIOverrides();
