////
/// @group components
////

/// A phase banner includes a tag and a label and is designed
/// to designate that a service is in alpha or beta.
/// Usually contains a `.phase-tag`.
///
/// BEM elements:
///   - `__tag`   The tag itself
///   - `__label` The label explaining
///
/// @see .phase-tag
/// @since 0.1.0
.phase-banner {
  border-bottom: 1px solid $colour-border;
  display: table;
  margin: em(0 0 $spacing-medium);
  padding: em($spacing-small 0);
  width: 100%;

  &__tag {
    display: table-cell;
    padding: em(0 $spacing-small 0 0);
  }

  &__label {
    display: table-cell;
    line-height: 1.3;
    vertical-align: middle;
    width: 100%;
  }
}

/// A coloured block to designate a service being in alpha or beta. Can be
/// used on its own but usually used within a `.phase-banner`.
///
/// BEM modifiers:
///   - `--alpha` Alpha
///   - `--beta`  Beta
///   - `--live`  Live
///
/// @todo Distinguish private beta/public beta
/// @todo Do we also need a discover phase colour?
///
/// @see .phase-banner
/// @since 0.1.0
.phase-tag {
  @include font-size(-1);
  background-color: $colour-panel-inverse;
  color: $colour-text-inverse;
  display: inline-block;
  font-weight: 900;
  letter-spacing: 1px;
  padding: em($spacing-xx-small $spacing-small);
  text-decoration: none;
  text-transform: uppercase;
  vertical-align: top;

  @media print {
    @include important(background, $colour-true-black);
    @include important(color, $colour-true-white);
  }

  &--alpha {
    background-color: $colour-alpha;
    color: $colour-text-inverse;
  }

  &--beta {
    background-color: $colour-beta;
    color: $colour-text-inverse;
  }

  &--live {
    background-color: $colour-live;
    color: $colour-text-inverse;
  }
}
