$color-1: $muted;
$color-2: $primary; 
$color-3: $white; 
$color-4: $border-color; 

.ws-theme-breadcrumb, 
.ws-theme-multi-steps {
  width:100%;
  @include clearfix;
  padding:0;
  margin:0;
  li {
    display: inline-block;
    float: left;
    margin:5px 0;
    &::after {
      display: inline-block;
      content: '\00bb';
      margin: 0 .6em;
      color: tint($color-1, 50%);
    }
    &:last-of-type::after {
      display: none;
    }
  }
  li{
    & > * {
      display: inline-block;
      font-size: 14px;
      color: $color-1;
    }
    &.current > * {
      color: $color-2;
    }
  } 
  &.custom-separator li::after {
    content: '';
    height: 16px;
    width: 16px;
    background: url(../img/ws-theme-custom-separator.svg) no-repeat center center;
    vertical-align: middle;
  }
  @include large-screen {
    li {
      &::after {
        margin: 0 1em;
      }
      &> * {
        font-size: 0.8rem;
      }
    }
  }
}
/* -------------------------------- 
Triangle breadcrumb
-------------------------------- */
@include mid-screen {
  .ws-theme-breadcrumb.triangle {
    background-color: transparent;
    padding: 0;
    li {
      position: relative;
      padding: 0;
      margin: 4px 4px 4px 0;
      &:last-of-type {
        margin-right: 0;
      }
      & > * {
        position: relative;
        padding:5px 5px 5px 20px;
        color: $color-1;
        background-color: $color-4;
        border-color: $color-4;
      }
      &.current > * {
        color: $color-3;
        background-color: $color-2;
        border-color: $color-2;
      }
      &:first-of-type  > * {
        padding-left: 1.6em;
        border-radius: .25em 0 0 .25em;
      }
      &:last-of-type  > * {
        padding-right: 1.6em;
        border-radius: 0 .25em .25em 0;
      }
    }
    a:hover {
      color: $color-3;
      background-color: $color-1;
      border-color: $color-1;
    }
    li::after, li > *::after {
      content: '';
      position: absolute;
      top: 0;
      left: 100%;
      content: '';
      height: 0;
      width: 0;
      border: 14px solid transparent;
      border-right-width: 0;
      border-left-width: 12px;
    }
    li::after {
      z-index: 1;
      -webkit-transform: translateX(4px);
      -moz-transform: translateX(4px);
      -ms-transform: translateX(4px);
      -o-transform: translateX(4px);
      transform: translateX(4px);
      border-left-color: $color-3;
      margin: 0;
      -webkit-transition: border-color .3s;
      -moz-transition: border-color .3s;
      -o-transition: border-color .3s;
      transition: border-color .3s;
    }
    li > *::after {
      z-index: 2;
      border-left-color: inherit;
    }
    li:last-of-type::after, li:last-of-type > *::after {
      display: none;
    }
    &.custom-separator li::after {
      background-image: none;
    }
    &.custom-icons li::after,
    &.custom-icons li > *::after {
      border-top-width: 15px;
      border-bottom-width: 15px;
    }
  }
  @-moz-document url-prefix() { 
    .ws-theme-breadcrumb.triangle li::after,
    .ws-theme-breadcrumb.triangle li > *::after {
      border-left-style: dashed;
    }
  }
}
@include mid-screen {
  .ws-theme-breadcrumb.triangle, .ws-theme-multi-steps.text-center {
    &.custom-icons li:first-of-type a:hover::before, 
    &.custom-icons li.current:first-of-type em::before {
      background-position: 0 -40px;
    }
    &.custom-icons li:nth-of-type(2) a:hover::before,
    &.custom-icons li.current:nth-of-type(2) em::before {
      background-position: -20px -40px;
    }
    &.custom-icons li:nth-of-type(3) a:hover::before,
    &.custom-icons li.current:nth-of-type(3) em::before {
      background-position: -40px -40px;
    }
    &.custom-icons li:nth-of-type(4) a:hover::before,
    &.custom-icons li.current:nth-of-type(4) em::before {
      background-position: -60px -40px;
    }
  }
}
/* -------------------------------- 
Multi steps indicator 
-------------------------------- */
@include mid-screen {
  .ws-theme-multi-steps {
    background-color: transparent;
    padding: 0;
  }
  .ws-theme-multi-steps li {
    position: relative;
    float: none;
    margin: 0.4em 40px 0.4em 0;
    &:last-of-type {
      margin-right: 0;
    }
    &::after {
      position: absolute;
      content: '';
      height: 4px;
      background: $color-4;
      margin: 0; 
    }
    &.visited::after {
      background-color: $color-2;
    }
    & > *, &.current > * {
      position: relative;
      color: $color-1;
    }
  }
  .ws-theme-multi-steps.custom-separator li::after {
    height: 4px;
    background: $color-4;
  }
  .ws-theme-multi-steps.text-center {
    li::after {
      width: 100%;
      top: 50%;
      left: 100%;
      -webkit-transform: translateY(-50%) translateX(-1px);
      -moz-transform: translateY(-50%) translateX(-1px);
      -ms-transform: translateY(-50%) translateX(-1px);
      -o-transform: translateY(-50%) translateX(-1px);
      transform: translateY(-50%) translateX(-1px);
    }
    li > * {
      z-index: 1;
      padding: .6em 1em;
      border-radius: .25em;
      background-color: $color-4;
    }
    
    li.current > *, li.visited > * {
      color: $color-3;
      background-color: $color-2;
    }
    &.custom-icons li.visited a::before {
      background-position: 0 -60px;
    }
    a:hover {
      background-color: $color-1;
    }
  }
  .ws-theme-multi-steps.text-top, .ws-theme-multi-steps.text-bottom { 
    li {
      width: 80px;
      text-align: center;
      &::after {
        position: absolute;
        left: 50%;
        width: calc(100% + 40px);
      }
    }
    li > *::before {
      content: '';
      position: absolute;
      z-index: 1;
      left: 50%;
      right: auto;
      -webkit-transform: translateX(-50%);
      -moz-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
      -o-transform: translateX(-50%);
      transform: translateX(-50%);
      height: 12px;
      width: 12px;
      border-radius: 50%;
      background-color: $color-4;   
    }
    li.visited > *::before, 
    li.current > *::before {
      background-color: $color-2;
    }
    a:hover {
      color: $color-2;
      &::before {
        box-shadow: 0 0 0 3px rgba($color-2, .3);
      }
    }
  }
  .ws-theme-multi-steps.text-top {
    li::after {
      bottom: 4px;
    }
    li > * {
      padding-bottom: 20px;
      &::before {
        bottom: 0;
      } 
    }
  }
  .ws-theme-multi-steps.text-bottom {
    li::after {
      top: 3px;
    }
    li > * {
      padding-top: 20px;
      &::before {
        top: 0;
      } 
    }
  }
}
/* -------------------------------- 
Add a counter to the multi-steps indicator 
-------------------------------- */
.ws-theme-multi-steps.count li {
  counter-increment: steps;
}
.ws-theme-multi-steps.count li > *::before {
  content: counter(steps) " - ";
}
@include mid-screen {
  .ws-theme-multi-steps.text-top.count li > *::before, 
  .ws-theme-multi-steps.text-bottom.count li > *::before {
    content: counter(steps);
    height: 26px;
    width: 26px;
    line-height: 26px;
    font-size: 0.8rem;
    color: $color-3;
    font-style:normal;
  }
  .ws-theme-multi-steps.text-top.count li:not(.current) em::before, 
  .ws-theme-multi-steps.text-bottom.count li:not(.current) em::before  {
    color: $color-1;
  }
  .ws-theme-multi-steps.text-top.count li::after {
    bottom: 11px;
  }
  .ws-theme-multi-steps.text-top.count li > * {
    padding-bottom: 34px;
  }
  .ws-theme-multi-steps.text-bottom.count li::after {
    top: 11px;
  }
  .ws-theme-multi-steps.text-bottom.count li > * {
    padding-top: 34px;
  }
}