/*
 * Progress Tracker
 *
 * Index
 * - Progress Tracker
 * - Stepper item
 * - Stepper link
 * - Stepper circle
 * - Stepper title
 * - Step completed
 *
 */


/* PROGRESS TRACKER
 -------------------- */

.progress-tracker {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

/* PROGRESS TRACKER ITEM
   -------------------- */

.progress-tracker-item {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  min-height: 65px;
}


.progress-tracker-item-content {
  display: inline-block;
  margin-left: 1rem;
}

/**
* Disabled click for current and next steps
*/

.progress-tracker-item:not(.completed) .progress-tracker-link {
  cursor: not-allowed;
}

/* PROGRESS TRACKER LINK
   -------------------- */

.progress-tracker-link {
  position: relative;
  z-index: 1;
  display: flex;
  margin-top: 0.4rem;
}

/* PROGRESS TRACKER circle
   -------------------- */

.progress-tracker-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.75rem;
  height: 0.75rem;
  font-size: var(--road-button-medium);
  font-weight: 700;
  background: var(--road-surface);
  border: 1px solid var(--road-on-surface-disabled);
  border-radius: 50%;
  fill: currentColor;
}

.progress-tracker-substep-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.13rem;
  font-size: var(--road-button-medium);
  font-weight: 700;
  background: var(--road-surface);
  border: 1px solid var(--road-on-surface-disabled);
  border-radius: 50%;
  fill: currentColor;
}

.progress-tracker-line {
  position: absolute;
  top: 8px;
  left: 0.35rem;
  z-index: -1;
  height: 100%;
  border-left: 1px solid var(--road-on-surface-disabled);
}

.progress-tracker-item:last-child .progress-tracker-line {
  border-left: 0;
}

.collapse .progress-tracker-item:last-child .progress-tracker-line {
  border-left: 1px dashed var(--road-on-surface-disabled);
}

.collapsed-content .progress-tracker-item:last-child .progress-tracker-line {
  border-left: 0;
}

/* PROGRESS TRACKER TITLE
   -------------------- */

.progress-tracker-title {
  display: block;
  font-size: var(--road-body-large);
  font-weight: 700;
  color: var(--road-on-surface-disabled);
}

.progress-tracker-substep-title {
  display: block;
  font-size: var(--road-body-small);
  font-weight: 700;
  color: var(--road-on-surface-disabled);
}

.progress-tracker-description{
  display: block;
  margin: 0 0 2rem;
  font-size: var(--road-body-small);
  font-weight: 400;
  color: var(--road-on-surface-disabled);
}

.progress-tracker-substep-description{
  display: block;
  margin: 0 0 2rem;
  font-size: var(--road-overline);
  font-weight: 400;
  color: var(--road-on-surface-disabled);
}

/* STEP COMPLETED
   -------------------- */

.completed:not(:last-child)::after {
  background: var(--road-primary);
}

.completed .progress-tracker-circle,
.completed .progress-tracker-substep-circle{
  background: var(--road-primary);
  border: 0;
}

/* STEP CURRENT
   -------------------- */

.current .progress-tracker-circle,
.current .progress-tracker-substep-circle,
.in-progress .progress-tracker-circle,
.in-progress .progress-tracker-substep-circle  {
  background: var(--road-surface);
  border: 2px solid var(--road-primary);
}

.completed .progress-tracker-line,
.in-progress .progress-tracker-line {
  border-left: 1px solid var(--road-primary);
}

.current .progress-tracker-title,
.current .progress-tracker-substep-title,
.in-progress .progress-tracker-title,
.in-progress .progress-tracker-substep-title,
.completed .progress-tracker-title,
.completed .progress-tracker-substep-title {
  font-weight: 700;
  color: var(--road-on-surface);
}

.current .progress-tracker-description,
.current .progress-tracker-substep-description,
.in-progress .progress-tracker-description,
.in-progress .progress-tracker-substep-description,
.completed .progress-tracker-description,
.completed .progress-tracker-substep-description {
  color: var(--road-on-surface-weak);
}
