/* ==========================================================================
   #PROGRESS BAR
   ========================================================================== */

.hmcts-progress-bar {
  margin-bottom: govuk-spacing(7);
}

.hmcts-progress-bar__list {
  font-size: .1px; // Hide white space between elements
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  text-align: justify;
  vertical-align: top;

  // IE8 does not support the text justify approach for spacing
  @include govuk-if-ie8 {
    display: table;
    table-layout: fixed;
    width: 100%;
  }

  &::after {
    content: "";
    display: inline-block;
    width: 100%;
  }

  &::before {
    border-top: 6px solid govuk-colour("green");
    content: "";
    left: 0;
    position: absolute;
    top: 13px;
    width: 100%;
  }

}


.hmcts-progress-bar__list-item {
  @include govuk-font(19);
  display: inline-block;
  max-width: 20%;
  position: relative;
  text-align: center;
  vertical-align: top;

  // IE8 does not support the text justify approach for spacing
  @include govuk-if-ie8 {
    display: table-cell;
  }

  &:first-child,
  &:last-child {
    &::before {
      border-top: 6px solid govuk-colour("white");
      content: "";
      position: absolute;
      top: 13px; left: 0;
      width: 50%;
    }

  }

  &:first-child {

    &::before {
      left: 0;
    }

  }

  &:last-child {

    &::before {
      left: auto;
      right: 0;
    }

  }

  &[aria-current=step] { // https://tink.uk/using-the-aria-current-attribute
    font-weight: 700;
  }

}


.hmcts-progress-bar__icon {
  position: relative;
  background-color: govuk-colour("white");
  border: 6px solid govuk-colour("green");
  border-radius: 50%; // IE8 does not support border radius but we’re ok with that
  box-sizing: border-box;
  display: block;
  height: 32px;
  margin-left: auto;
  margin-right: auto;
  width: 32px;
}


.hmcts-progress-bar__icon--complete {
  background-color: govuk-colour("green");
  background-image: url(#{$hmcts-images-path}icon-progress-tick.svg);
  background-position: 50% 50%;
  background-repeat: no-repeat;

  // IE8 does not support box shadow, so use a standard border.
  @include govuk-if-ie8 {
    background-image: url(#{$hmcts-images-path}icon-progress-tick.png);
  }

}


.hmcts-progress-bar__label {
  @include govuk-font(16);
  display: block;
  font-weight: inherit;
  margin-top: 10px;
  position: relative;
  word-wrap: break-word; // Just in case
}
