/* ======================================== */
/* CSS for control sap.m/ProgressIndicator  */
/* Horizon theme							*/
/* ======================================== */

.sapMPI {
	position: relative;
	padding: 1.25rem 1.25rem 0.75rem 0;
	margin: 0;
	height: 0.375rem;
	min-height: 0.375rem;
	width: 100%;
	min-width: 4rem;
	overflow: initial;
	border-radius: 0;
	background-color: transparent;

	.sapMPIBarRemaining {
		height: 0.375rem;
		border-radius: 0.25rem;
		box-sizing: border-box;
	}

	.sapMPIBar {
		box-sizing: border-box;
		height: 0.625rem;
		border-radius: 0.5rem;
		margin-top: -0.125rem;
	}
}

.sapMPIValueMax .sapMPIBarRemaining {
	display: flex;
}

.sapMPIBarRemaining {
	position: absolute;
    width: ~'calc(100% - 1.25rem)';
	border: 0.0625rem solid @sapUiProgressBorderColor;
}

.sapMPIBar {
	z-index: 1;
	border: 0.0625rem solid @sapUiProgressValueTextColor;
}

.sapMPIValueMin .sapMPIBar {
	border: none;
}

.sapMPIBar::before {
	font-family: 'SAP-icons';
	font-size: 1rem;
	margin-left: 0.25rem;
	position: absolute;
	right: 0;
}

.sapMPIValueMin .sapMPIBarRemaining::before,
.sapMPIBarRemaining::after {
	content: '';
	display: block;
	width: 0.25rem;
	height: 0.25rem;
	position: absolute;
	border-radius: 50%;
}

.sapMPIValueMin .sapMPIBarRemaining::before {
	left: 0.0625rem;
}

.sapMPIBarRemaining::after {
	right: 0.0625rem;
}

.sapMPIBarPositive {
	background-color: @sapUiProgressValuePositiveBackground;
	border-color: @sapUiProgressValuePositiveBorderColor;
	.sapMPIText.sapMPITextLeft,
	.sapMPIText.sapMPITextRight {
		color: @sapUiProgressPositiveTextColor;
	}

	&::before {
		content: '\e1c1';
		color: @sapUiProgressValuePositiveTextColor;
	}

	+ .sapMPIBarRemaining {
		background-color: @sapUiProgressPositiveBackground;
		border-color: @sapUiProgressPositiveBorderColor;

		&::after,
		&::before {
			background-color: @sapUiProgressValuePositiveBackground;
		}
	}
}

.sapMPIBarNegative {
	background-color: @sapUiProgressValueNegativeBackground;
	border-color: @sapUiProgressValueNegativeBorderColor;
	.sapMPIText.sapMPITextLeft,
	.sapMPIText.sapMPITextRight {
		color: @sapUiProgressNegativeTextColor;
	}

	&::before {
		content: '\e1ec';
		color: @sapUiProgressValueNegativeTextColor;
	}

	+ .sapMPIBarRemaining {
		background-color: @sapUiProgressNegativeBackground;
		border-color: @sapUiProgressNegativeBorderColor;

		&::after,
		&::before {
			background: @sapUiProgressValueNegativeBackground;
		}
	}
}

.sapMPIBarCritical {
	background-color: @sapUiProgressValueCriticalBackground;
	border-color: @sapUiProgressValueCriticalBorderColor;
	.sapMPIText.sapMPITextLeft,
	.sapMPIText.sapMPITextRight {
		color: @sapUiProgressCriticalTextColor;
	}

	&::before {
		content: '\e053';
		color: @sapUiProgressValueCriticalTextColor;
	}

	+ .sapMPIBarRemaining {
		background-color: @sapUiProgressCriticalBackground;
		border-color: @sapUiProgressCriticalBorderColor;

		&::after,
		&::before {
			background: @sapUiProgressValueCriticalBackground;
		}
	}
}

.sapMPIBarInformation {
	background-color: @sapUiProgressValueInformationBackground;
	border-color: @sapUiProgressValueInformationBorderColor;
	.sapMPIText.sapMPITextLeft,
	.sapMPIText.sapMPITextRight {
		color: @sapUiProgressInformationTextColor;
	}

	&::before {
		content: '\e289';
		color: @sapUiProgressValueInformationTextColor;
	}

	+ .sapMPIBarRemaining {
		background-color: @sapUiProgressInformationBackground;
		border-color: @sapUiProgressInformationBorderColor;

		&::after,
		&::before {
			background: @sapUiProgressValueInformationBackground;
		}
	}
}

.sapMPIDisplayOnly:not(.sapMPIBarDisabled) .sapMPIBarNeutral,
.sapMPIBarNeutral {
	background-color: @sapUiProgressValueBackground;
	.sapMPIText.sapMPITextLeft,
	.sapMPIText.sapMPITextRight {
		color: @sapUiProgressTextColor;
	}

	+ .sapMPIBarRemaining {
		background-color: @sapUiProgressBackground;
		border-color: @sapUiProgressBorderColor;

		&::after,
		&::before {
			background: @sapUiProgressValueBackground;
		}
	}
}

.sapMPIDisplayOnly .sapMPIText,
.sapMPIText {
	padding: 0;
	position: absolute;
	top: 0;
	left: 0;
	margin-bottom: 0.1875rem;
	font-size: @sapUiProgressFontSize;
	color: @sapUiProgressTextColor;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;

	&.sapMPITextRight {
		top: -1.3125rem;
		right: -0.0675rem;
	}
}

.sapUiSizeCompact .sapMListTblCell .sapMPI:not(.sapMPIDisplayOnly) {
	margin: 0;
}

/* Compact and Condensed */
.sapUiSizeCondensed .sapUiTableDataCell .sapMPI:not(.sapMPIDisplayOnly),
.sapUiSizeCompact .sapUiTableDataCell .sapMPI:not(.sapMPIDisplayOnly) {
	padding: 0.4375rem 0;
	margin: 0;
}