/* ================================== */
/* CSS for control sap.tnt/InfoLabel  */
/* Horizon High Contrast White theme  */
/* ================================== */

// ==========================================================================
// Variables overriding
// ==========================================================================

@_sap_tnt_InfoLabel_LineHeightDisplayOnly: 1rem;
@_sap_tnt_InfoLabel_DisplayModeBorder: none;
@_sap_tnt_InfoLabel_DisplayModeBackground: #C5CDD3;
@_sap_tnt_InfoLabel_DisplayModeColor: #2C3A48;
@_sap_tnt_InfoLabel_BorderRadius: 0.25rem;
@_sap_tnt_InfoLabel_DisplayBorderRadius: 0.1875rem;
@_sap_tnt_InfoLabel_Height: 1.375rem;
@_sap_tnt_InfoLabel_HeightWithoutBorders: 1.375rem;
@_sap_tnt_InfoLabel_LineHeight: 1.375rem;
@_sap_tnt_InfoLabel_Text: none;
@_sap_tnt_InfoLabel_Padding: 0 0.375rem;
@_sap_tnt_InfoLabel_DisplayPadding: 0 0.25rem;
@_sap_tnt_InfoLabel_IconMargin: 0.25rem;
@_sap_tnt_InfoLabel_DisplayIconMargin: 0.125rem;
@_sap_tnt_InfoLabel_FontFamily: @sapFontSemiboldDuplexFamily;
@_sap_tnt_InfoLabel_FontSize: @sapFontSize;
@_sap_tnt_InfoLabel_DisplayFontSize: @sapFontSmallSize;
@_sap_tnt_InfoLabel_DisplayFontSizeIcon: 0.625rem;
@_sap_tnt_InfoLabel_NarrowPadding: @_sap_tnt_InfoLabel_Padding;
@_sap_tnt_InfoLabel_LetterSpacing: normal;

@_sap_tnt_InfoLabel_ColorsArray:
#FFC218 #5F2900,
#FFBABA #770606,
#FEB7D9 #71093D,
#FFB3F5 #71093D,
#D6C2FF #2500BC,
#8FD4FF #003776,
#3CE3C5 #033F45,
#9BDF47 #0C420C,
#E0C1EB #552267,
#C5CDD3 #2C3A48;

.create-classes-for-background-and-border-colors(backgroundColor, @_sap_tnt_InfoLabel_ColorsArray);

// Iterate over the InfoLabel ColorsArray and create separate class for each
// color named with the passed prefix and the number of the color
.create-classes-for-background-and-border-colors(@prefix, @list) {
	.iter(length(@list));
	.iter(@i) when (@i > 0) {
		.iter(@i - 1);

		@pair: extract(@list, @i);
		@backgroundColor: extract(@pair, 1);
		@textColor: extract(@pair, 2);

		.@{prefix}@{i} {
			background-color: @backgroundColor;

			.sapTntInfoLabelInner {
				color: @textColor;
			}
		}
	}
}