/**
 * @file
 * YAML form wizard progress bar styling.
 *
 * @see https://coderwall.com/p/-7trcg/simple-css-only-wizard-progress-tracker
 */

.yamlform-progress-bar {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: smaller;
}

.yamlform-progress-bar li {
  list-style-type: none;
  display: inline-block;
  position: relative;
  margin: 0;
  padding: 0;
  line-height: 30px;
  height: 30px;
  background-color: #f0f0f0;
}

.yamlform-progress-bar[data-steps="2"] li {
  width: 50%;
}
.yamlform-progress-bar[data-steps="3"] li {
  width: 33%;
}
.yamlform-progress-bar[data-steps="4"] li {
  width: 25%;
}
.yamlform-progress-bar[data-steps="5"] li {
  width: 20%;
}
.yamlform-progress-bar[data-steps="6"] li {
  width: 16.6%;
}
.yamlform-progress-bar[data-steps="7"] li {
  width: 14.28%;
}
.yamlform-progress-bar[data-steps="8"] li {
  width: 12.5%;
}
.yamlform-progress-bar[data-steps="9"] li {
  width: 11.11%;
}
.yamlform-progress-bar[data-steps="10"] li {
  width: 10%;
}

.yamlform-progress-bar li > b {
  display: block;
  padding: 0 0 0 30px;
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yamlform-progress-bar li.done > b {
  background-color: #dbdbdb;
}

.yamlform-progress-bar li.current > b {
  font-weight: bold;
}

.yamlform-progress-bar li > b:after,
.yamlform-progress-bar li > b:before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  position: absolute;
  top: 0;
  left: 0;
  border: solid transparent;
  border-left-color: #ededed;
  border-width: 15px;
}

.yamlform-progress-bar li > b:after {
  top: -5px;
  z-index: 1;
  border-left-color: white;
  border-width: 20px;
}

.yamlform-progress-bar li > b:before {
  z-index: 2;
}

.yamlform-progress-bar li.done + li > b:before {
  border-left-color: #dbdbdb;
}

.yamlform-progress-bar li:first-child > b:after,
.yamlform-progress-bar li:first-child > b:before {
  display: none;
}

.yamlform-progress-bar li:first-child span,
.yamlform-progress-bar li:last-child span {
  display: block;
  height: 0;
  width: 0;
  position: absolute;
  top: 0;
  left: 0;
  border: solid transparent;
  border-left-color: white;
  border-width: 15px;
}

.yamlform-progress-bar li:last-child span {
  left: auto;
  right: -15px;
  border-left-color: transparent;
  border-top-color: white;
  border-bottom-color: white;
}
