/*------------------------------------*\
#PROGRESS TRACKER
\*------------------------------------*/

/**
* 1) Ordered list showing progress (i.e. step by step)
* 2) Display flex used to put items in row. Flex wrap wraps items underneat when space is
*    unavailable.
*/

.c-progress-tracker {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	flex-wrap: wrap;
	font-size: $font-size-sm-2;
	margin-right: 2rem;
	text-align: center;

	// Item
	&__item {
		margin-right: 2rem;
		text-align: center;
		font-size: $font-size-sm-2;
		width: 5rem;

		&:last-child .c-progress-tracker__number:before {
			display: none;
			background-color: $color-neutral-white;
			border: 1px solid $color-brand-primary;
			border-radius: 50%;
			color: $color-brand-primary;
			margin-bottom: .5rem;
			padding: .125rem;
			position: relative;
		}
	}


	// Number
	&__number {
		padding: .125rem;
		margin-bottom: .5rem;
		color: $color-brand-primary;
		border: 1px solid $color-brand-primary;
		background-color: $color-neutral-white;
		position: relative;
		background-color: $color-brand-primary;
		color: $color-neutral-white;
		@media all and (min-width: $bp-small) {
			padding: .5rem;
			border-color: $color-brand-primary;
			color: $color-brand-primary-dark;
		}

		.is-complete & {
			background-color: $color-neutral-off-white;
			content: " ";
			display: block;
			position: absolute;
			right: -4rem;
			width: 4rem;


			.is-current & {
				color: $color-neutral-white;
				background-color: $color-brand-primary;
				font-weight: bold;
			}

			.is-disabled & {
				color: $color-brand-primary-dark;
				border-color: $color-brand-primary;
			}

			&:before {
				content: " ";
				display: block;
				width: 4rem;
				height: 1px;
				background-color: $color-neutral-off-white;
				position: absolute;
				top: 50%;
				right: -4rem;
				z-index: -1;
			}
		}
	}


	// Label
	&__label {
		display: none;
		@media all and (min-width: $bp-small-2) {
			display: inline;
		}

		.is-current & {
			font-weight: bold;
		}
	}

}
