// Common interface patterns

// Fixes
.menu-container h1 { padding-bottom: 0; }

// Page Headers
.page-header {
   margin-bottom: ($baseLineHeight * 1.5);
   padding-bottom: 5px;
   border-bottom: 1px solid $grayLighter;
   @include clearfixHack();

   h1 {
       margin: 2px 0 0 0;
       line-height: ($baseLineHeight - 0.2);
       @include float-left($rtl);
   }
   .actions {
        @include float-right($rtl);

        .btn {
            margin-left: 5px;
        }
   }
}

h1 .sub {
  color: lighten($baseFontColor, 20%);
  display: block;
  font-weight: normal;
  font-size: 15px;
}

// Rich container

.rc, .richcontainer {
	display: block;
	@include clearfixHack();

	.bd{
	   display: table-cell;
	   zoom: 1;

	   &:after {
	       clear: both;
	       display: block;
	       visibility: hidden;
	       overflow: hidden;
	       height: 0 !important;
	       line-height: 0;
	       font-size: xx-large;
	       content:" x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ";
	   }
	   > :first-child {
	       margin-top:0;
	   }
	   > :last-child {
	       margin-bottom:0;
	   }
	}
	.img, .img-left {
        @include float-left($rtl);
    }
    .img-right, .imgRight {
        @include float-right($rtl);
    }
}
.rcsxs .img, .rcsxs .img-left                                               { @include margin-right($rtl, $spacingXs); }
.rcss .img, .small .img, .rcss .img-left, .small .img-left                  { @include margin-right($rtl, $spacingS); }
.rcsm .img, .medium .img, .rcsm .img-left, .medium .img-left                { @include margin-right($rtl, $spacingM); }
.rcsl .img, .large .img, .rcsl .img-left, .large .img-left                  { @include margin-right($rtl, $spacingL); }
.rcsxl .img, .xlarge .img, .rcsxl .img-left, .xlarge .img-left              { @include margin-right($rtl, $spacingXl); }

.rcsxs .img-right, .rcsxs .imgRight                                         { @include margin-left($rtl, $spacingXs); }
.rcss .img-right, .small .img-right, .rcss .imgRight, .small .imgRight      { @include margin-left($rtl, $spacingS); }
.rcsm .img-right, .medium .img-right, .rcsm .imgRight, .medium .imgRight    { @include margin-left($rtl, $spacingM); }
.rcsl .img-right, .large .img-right, .rcsl .imgRight, .large .imgRight      { @include margin-left($rtl, $spacingL); }
.rcsxl .img-right, .xlarge .img-right, .rcsxl .imgRight, .xlarge .imgRight  { @include margin-left($rtl, $spacingXl); }

.ui-label {
  display: inline-block;
  margin: 0 1px $spacingXs 0;
  padding: 1px 14px;
  font-size: 11px;
  background: $panelBackground;
  border: 1px solid $borderColor;
  border-radius: 12px;

  .vicon {
    @include margin-right($rtl, -9px);
    color: $borderColor;
    font-size: 8px;
  }

  &:hover {
    background: $panelBorder;
    a {
      text-decoration: none;
    }
    .vicon {
      color: darken($borderColor, 25%);

      &:hover {
        color: $errorText;
      }
    }
  }

  a:hover,
  a:focus {
    .vicon {
      color: $errorText;
    }
  }
}

.ui-label-premium {
  background: mix(#ffffff, $black, 24%);
  border: none;
  color: $white;
  padding: 3px 13px;
  border-radius: 14px;
  overflow: hidden;
  height: 17px;

  a {
    color: $white;
  }

  &:hover {
    background: mix(#ffffff, $black, 24%);
  }
}

.ui-badge {
  background: $orange2;
  font-size: 11px;
  color: #FFFFFF;
  display: inline-block;
  padding: 1px 5px;
  @extend .bras;
}

.ui-badge.ui-badge-alt {
  background: $blue2;
}

.ui-tag {
  position: relative;
  display: inline-block;
  margin: 0 $spacingXs $spacingXs 0;
  @include padding($rtl, $spacingXs, $spacingXl, $spacingXs, $spacingS);
  border-radius: $borderRadiusS;
  background: $green2;
  color: $white;
  white-space: nowrap;

  .remove {
    position: absolute;
    top: 0;
    @include right($rtl, 0);
    height: 100%;
    background: mix(#000000, $green2, 10%);
    @include border-radius-right($rtl, $borderRadiusS);
    padding: 0 ($spacingM / 2);
    line-height: 2.1em;

    .vicon {
      font-size: 8px;
      color: white;
    }

    &:hover,
    &:focus {
      background: mix(#000000, $green2, 25%);
    }
  }
}
