.u-ui-header {
  align-items: center;
  background: $c-white;
  color: $c-white;
  left: 0;
  min-height: 50px;
  top: 0;
  width: 100%;
  z-index: 9999;

  &__banner {
    align-items: center;
    background-color: rgba($c-black, 0.8);
    min-height: 50px;
    padding: 15px 20px;
    position: relative;
    width: 100%;

    h1 {
      border: none;
      color: $c-white;
      font-size: toRems(16px);
      font-weight: $font-weight-normal;
      letter-spacing: 0.02em;
      line-height: 1.3;
      margin: 0;
      text-transform: capitalize;
    }
  }

  #{&}-logo {
    align-items: center;
    height: 60px;
    padding: 20px;
    width: 300px;
    z-index: 6000;

    svg {
      fill: #202020;
      height: 20px;
      width: 70px;
    }
  }
}

.u-ui-menu-btn {
  display: block;
  height: 50px;
  position: absolute;
  width: 50px;
  left: 100%;
  background-color: $c-black;
  top: 0;
  padding: 15px;

  &:focus {
    outline: none;
  }

  &__icon {
    background-color: $c-white;
    display: block;
    height: 2px;
    width: 100%;

    &:before,
    &:after {
      background-color: $c-white;
      content: '';
      height: 2px;
      left: 15px;
      position: absolute;
      right: 15px;
    }

    &:before {
      top: 18px;
    }

    &:after {
      bottom: 18px;
    }
  }
}

.u-ui-sidebar {
  background: $c-white;
  border-right: 1px solid rgba($c-black, 0.15);
  font-size: $font-xsmall;
  font-weight: 600;
  height: 100%;
  left: 0;
  padding-bottom: 100px;
  position: fixed;
  top: 0;
  transform: translateX(-100%);
  transition: transform 0.3s $global-easing;
  width: 300px;
  z-index: 5000;

  &.is-open {
    transform: none;
  }

  li {
    padding: 0 !important;
    margin: 0 !important;

    &:before {
      display: none !important;
    }

    ul {
      margin: 0;
      min-height: 0;

      li a {
        color: rgba($c-black, 0.7);
        padding-left: 40px;
        font-weight: $font-weight-normal;
        padding-top: 5px;
        padding-bottom: 5px;
      }
    }
  }

  a {
    border: none;
    color: rgba($c-black, 0.8);
    display: block;
    font-size: toRems(14px);
    padding: 5px 20px;
    position: relative;

    &:focus {
      outline: none;
    }

    &:after {
      background-color: rgba($c-black, 0.25);
      content: '';
      height: 100%;
      left: 0;
      position: absolute;
      top: 0;
      transition: width 0.3s $global-easing;
      width: 0;
    }

    &:hover {
      &:after {
        width: 5px;
      }
    }
  }

  &__inner {
    height: calc(100vh - 110px);
    padding: 10px 0 0;
    overflow: auto;

    ul {
      min-height: calc(100vh - 220px);
    }
  }

  &__footer {
    background: $c-white;
    border-top: 1px solid rgba($c-black, 0.15);
    color: rgba($c-black, 0.5);
    cursor: pointer;
    font-size: toRems(10px);
    font-weight: $font-weight-normal;
    letter-spacing: 0.025em;
    line-height: 1.3;
    margin-top: 30px;
    padding: 20px;
    width: 100%;
    z-index: 9999;

    p {
      margin: 0;
    }
  }
}

%ui-heading {
  border-bottom: 1px solid rgba($c-black, 0.25);
  color: rgba($c-black, 0.5);
  font-weight: $font-weight-normal;
  line-height: 1;
  margin-top: 0;

  &,
  &:last-child {
    margin: 0 0 $spacing-medium;
  }

  code {
    @extend .u-ui-code-wrap;
  }
}

.u-ui-heading-large {
  @extend %ui-heading;
  border: none;
  color: $c-white;
  font-size: toRems(42px);
  font-weight: 600;
  line-height: 1.3;

  &,
  &:last-child {
    margin-bottom: 0;
  }
}

.u-ui-heading-medium {
  @extend %ui-heading;
  font-size: toRems(30px);
  padding-bottom: 10px;
}

.u-ui-heading-small {
  @extend %ui-heading;
  font-size: toRems(21px);
  line-height: 1;
  padding-bottom: 10px;
  margin: 30px 0;
}

// Color swatches
.u-ui-colors {
  display: flex;
  flex-flow: row wrap;
}

.u-ui-color {
  display: inline-block;
  flex: 0 1 50%;
  font-size: toRems(14px);
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
  padding-top: 50%;

  @include breakpoint($bp-small) {
    flex-basis: 25%;
    padding-top: 25%;
  }

  @include breakpoint($bp-medium) {
    flex-basis: 20%;
    padding-top: 20%;
  }

  &:first-of-type {
    margin-left: 0;
  }

  > div {
    background: rgba($c-white, 0.8);
    padding: 10px;
  }

  h4 {
    font-size: toRems(14px);
    font-weight: $font-weight-bold;
    margin: 0;
  }
}

.u-ui-code-wrap {
  background-color: #666666;
  color: #ffffff;
  display: inline-block;
  font-family: monospace;
  font-size: toRems(14px);
  font-style: normal;
  font-weight: $font-weight-normal;
  line-height: 1;
  margin-left: 20px;
  padding: 10px 15px;
  text-transform: none;
  vertical-align: middle;
}

.u-ui-label {
  background-color: rgba($c-black, 0.1);
  display: inline-block;
  font-family: monospace;
  font-size: toRems(14px);
  font-weight: $font-weight-normal;
  line-height: 1;
  padding: 10px 15px;
}

.u-ui-note {
  background-color: #754acc;
  color: $c-white;
  display: block;
  margin: 30px 0;
  padding: 25px;

  &:before {
    content: 'DEVELOPER NOTE*';
    display: block;
    font-size: toRems(14px);
    font-weight: $font-weight-bold;
    margin-bottom: 10px;
    text-decoration: underline;
  }

  a {
    color: $c-white;
    text-decoration: underline;
  }

  .u-ui-code-wrap {
    background-color: #ffffff;
    color: #754acc;
    margin-left: 10px;
    margin-right: 10px;
  }
}

.u-ui-grid-col {
  background-color: rgba($c-black, 0.1);
  color: rgba($c-black, 0.5);
  font-family: monospace;
  font-size: toRems(12px);
  font-style: normal;
  font-weight: $font-weight-normal;
  line-height: 1;
  padding: 10px;
  text-transform: none;
  width: 100%;
}

// Icons
.u-ui-icon {
  code {
    display: none;
    margin: 0 0 20px;

    @include breakpoint($bp-medium) {
      display: block;
    }
  }

  svg {
    display: block;
    fill: $c-black;
    height: 25px;
    margin-bottom: 10px;
    margin-right: 10px;
    width: 25px;

    @include breakpoint($bp-medium) {
      height: 50px;
      width: 50px;
    }
  }
}
