/* ================================== */
/* CSS for control sap.tnt/InfoLabel  */
/* Evening Horizon theme              */
/* ================================== */

// ==========================================================================
// Variables and mixins
// ==========================================================================

@_sap_tnt_InfoLabel_LineHeightDisplayOnly: 1rem;
@_sap_tnt_InfoLabel_DisplayModeBorder: none;
@_sap_tnt_InfoLabel_DisplayModeBackground: #29394B;
@_sap_tnt_InfoLabel_DisplayModeColor: #B3BDC6;
@_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: @sapUiFontSemiboldDuplexFamily;
@_sap_tnt_InfoLabel_FontSize: @sapMFontMediumSize;
@_sap_tnt_InfoLabel_DisplayFontSize: @sapMFontSmallSize;
@_sap_tnt_InfoLabel_DisplayFontSizeIcon: 0.625rem;
@_sap_tnt_InfoLabel_NarrowPadding: @_sap_tnt_InfoLabel_Padding;
@_sap_tnt_InfoLabel_LetterSpacing: normal;

@_sap_tnt_InfoLabel_ColorsArray:
@sapUiAvatar1Background @sapUiAvatar1TextColor,
@sapUiAvatar2Background @sapUiAvatar2TextColor,
@sapUiAvatar3Background @sapUiAvatar3TextColor,
@sapUiAvatar4Background @sapUiAvatar4TextColor,
@sapUiAvatar5Background @sapUiAvatar5TextColor,
@sapUiAvatar6Background @sapUiAvatar6TextColor,
@sapUiAvatar7Background @sapUiAvatar7TextColor,
@sapUiAvatar8Background @sapUiAvatar8TextColor,
@sapUiAvatar9Background @sapUiAvatar9TextColor,
@sapUiAvatar10Background @sapUiAvatar10TextColor;

.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;
			}
		}
	}
}