//
// Utilities
//

%border-box {
  -moz-box-sizing: border-box;
       box-sizing: border-box;
}

%user-select-none {
  -webkit-user-select: none;
     -moz-user-select: -moz-none;
      -ms-user-select: none;
          user-select: none;
}

//
// Boxes
//

%box {
  background: $boxBackground;
  border: 1px solid $boxBorder;
  border-radius: 3px;
}

%heading-box {
  background: $boxHeaderBackground;
  border: 1px solid $boxBorder;
  border-radius: 3px;
}

%block-heading {
  line-height: 1.25rem;
  margin: 2em 0 1em;
  padding: .5em .75em;
  font-size: 1rem;
  overflow: hidden;
  @extend %heading-box;
}

//
// Notes
//

%note {
  margin: 1.5rem 0;
  padding: .5rem .875rem;
  background: $noteBackground;
  border: 1px solid $noteBorder;
  border-radius: 3px;
}

%label {
  margin: 0 1px;
  padding: 1px 4px 2px;
  background: $labelBackground;
  border-radius: 3px;
}

%block-label {
  display: block;
  line-height: 1.375rem;
  margin: 2em 0 1em;
  padding-left: .5em;
  padding-right: .5em;
  font-size: inherit;
  border: 1px solid $boxBorder;
  border-radius: 2px;
  @extend %label;
}

%note-green, %label-green {
  background: $noteGreenBackground;
  border-color: $noteGreenBorder;
}

%note-blue, %label-blue {
  background: $noteBlueBackground;
  border-color: $noteBlueBorder;
}

%note-orange, %label-orange {
  background: $noteOrangeBackground;
  border-color: $noteOrangeBorder;
}

%note-red, %label-red {
  background: $noteRedBackground;
  border-color: $noteRedBorder;
}

//
// External links
//

%external-link {
  &:after {
    display: inline-block;
    width: .5rem;
    height: .4375rem;
    margin: .125rem 0 0 .0625rem;
    vertical-align: top;
    @if $style == 'dark' {
      @extend %icon, %icon-link-white;
    } @else {
      @extend %icon, %icon-link;
    }
  }
}

%internal-link:after { content: none !important; }
