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

.sapMPI {
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;

	-webkit-flex-direction: row;
	box-sizing: border-box;
	outline: none;
	background: @sapUiFieldBackground;
	width: 100%;
	height: 1.5rem;
	min-width: 6rem;
	min-height: 1rem;
	padding: 0;
	margin: 0.75rem 0;
	border: none;
	border-radius: 0.5rem;
	overflow: hidden;
}

.sapMPIBar,
.sapMPIBarRemaining {
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
	min-width: 0;

	-webkit-align-items: center;
	align-items: center;
}

.sapMPIBar {
	height: 100%;
	-webkit-justify-content: flex-end;
	justify-content: flex-end;
	border-top-left-radius: 0.5rem;
	border-bottom-left-radius: 0.5rem;
}

.sapMPIValueMax .sapMPIBarRemaining {
	display: none;
}

.sapMPIBarRemaining {
	-webkit-flex-grow: 1;
	flex-grow: 1;
	border-top-right-radius: 0.5rem;
	border-bottom-right-radius: 0.5rem;
	border-top: 1px solid @sapUiFieldBorderColor;
	border-right: 1px solid @sapUiFieldBorderColor;
	border-bottom: 1px solid @sapUiFieldBorderColor;
}

.sapMPIBarDisabled {
	opacity: 0.5;
}

.sapMPI.sapMPIDisplayOnly {
	height: 1rem;
	min-width: 4rem;
	margin: 0;
}

.sapMPIText {
	font-family: @sapUiFontFamily;
	font-size: @sapMFontSmallSize;
	font-weight: normal;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	color: @sapUiContentForegroundTextColor;
}

.sapMPIDisplayOnly .sapMPIText {
	color: @sapUiBaseText;
	font-size: 0.6875rem;
}

.sapMPITextLeft {
	color: @sapUiContentContrastTextColor;
	padding-right: 0.5rem;
	display: none;
}

.sapMPITextRight {
	padding-left: 0.5rem;
}

.sapMPIValueGreaterHalf .sapMPITextRight {
	display: none;
}

.sapMPIValueGreaterHalf .sapMPITextLeft {
	display: inline-block;
}

.sapMPIAnimate .sapMPIText {
	display: none;
}

/* Progress Indicator Bar */
.sapMPIValueMax .sapMPIBar {
	border-top-right-radius: 0.5rem;
	border-bottom-right-radius: 0.5rem;
}

.sapMPIValueNormal .sapMPIBar {
	max-width: calc(~"100% - 0.5rem");
	min-width: 0.5rem;
}

.sapMPIBarNeutral {
	background: @sapUiNeutralElement;
}

.sapMPIBarPositive {
	background: @sapUiPositiveElement;
}

.sapMPIBarNegative {
	background: @sapUiNegativeElement;
}

.sapMPIBarCritical {
	background: @sapUiCriticalElement;
}

.sapMPIBarInformation {
	background: @sapUiHighlight;
}

/* Progress Indicator Remaining Bar */
.sapMPIValueMin .sapMPIBarRemaining {
	border-radius: 0.5rem;
	border: 1px solid @sapUiFieldBorderColor;
}

/* Progress Indicator Value Text */
.sapMPIBarNeutral .sapMPIText.sapMPITextLeft {
	color: contrast(@sapUiNeutralElement, @sapUiContentForegroundTextColor, @sapUiContentContrastTextColor, @sapUiContentContrastTextThreshold);
}

.sapMPIBarPositive .sapMPIText.sapMPITextLeft {
	color: contrast(@sapUiPositiveElement, @sapUiContentForegroundTextColor, @sapUiContentContrastTextColor, @sapUiContentContrastTextThreshold);
}

.sapMPIBarNegative .sapMPIText.sapMPITextLeft {
	color: contrast(@sapUiNegativeElement, @sapUiContentForegroundTextColor, @sapUiContentContrastTextColor, @sapUiContentContrastTextThreshold);
}

.sapMPIBarCritical .sapMPIText.sapMPITextLeft {
	color: contrast(@sapUiCriticalElement, @sapUiContentForegroundTextColor, @sapUiContentContrastTextColor, @sapUiContentContrastTextThreshold);
}

.sapMPIBarHighlight .sapMPIText.sapMPITextLeft {
	color: contrast(@sapUiHighlight, @sapUiContentForegroundTextColor, @sapUiContentContrastTextColor, @sapUiContentContrastTextThreshold);
}

/* Compact */
.sapUiSizeCompact .sapMPI:not(.sapMPIDisplayOnly) {
	height: 1.125rem;
	margin: 0.4375rem 0;
}

/* Condensed */
.sapUiSizeCondensed .sapUiTableCell .sapMPI:not(.sapMPIDisplayOnly) {
	height: 1.125rem;
	margin: 0;
}