/* ============================================================ */
/* CSS for control sap.suite.ui.microchart/ComparisonMicroChart */
/* Base Theme                                                   */
/* ============================================================ */

.sapSuiteCpMCChartContent {
  position: relative;
  outline: none;
  font-family: @sapUiFontFamily;
  display: flex;
  align-items: center;
}

html.sap-desktop .sapSuiteCpMCChartContent[tabindex]:focus {
  outline: @sapUiContentFocusWidth @sapUiContentFocusStyle @sapUiContentFocusColor;
  outline-offset: 1px;
}

html.sap-desktop .sapSuiteCpMCChartContent:focus:not([tabindex]),
.sapSuiteCpMCChartContent:focus:not([tabindex]) {
  outline: none;
}

html.sap-desktop .sapSuiteCpMCChartBar:focus {
  border: @sapUiContentFocusWidth @sapUiContentFocusStyle @sapUiContentFocusColor;
  outline: none;
}

html.sap-desktop .sapSuiteCpMCChartBar.sapSuiteUiMicroChartPointer:hover {
  border: 1px solid @sapUiContentFocusColor;
  outline: 1px solid @sapUiContentFocusColor;
}

.sapSuiteCpMCVerticalAlignmentContainer {
  position: relative;
  width: 100%;
  min-height: 1.125rem;
  max-height: 100%;
  min-width: 4rem;
  max-width: 20rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sapSuiteCpMCShrinkable .sapSuiteCpMCVerticalAlignmentContainer {
  top:	auto;
  transform: none;
}

// different possible sizes, only specifies the size of the whole element
.sapSuiteCpMCChartContent.sapSuiteCpMCResponsive {
  width: 100%;
  height: 100%;
}

.sapSuiteCpMCChartContent.sapSuiteCpMCSizeL {
  height: 5.875rem;
  width: 12rem;
}

html.sapUiMedia-Std-Desktop .sapSuiteCpMCChartContent.sapSuiteCpMCSizeAuto,
html.sapUiMedia-Std-Tablet .sapSuiteCpMCChartContent.sapSuiteCpMCSizeAuto,
.sapSuiteCpMCChartContent.sapSuiteCpMCSizeM {
  height: 4.5rem;
  width: 10.5rem;
}

html.sapUiMedia-Std-Phone .sapSuiteCpMCChartContent.sapSuiteCpMCSizeAuto,
.sapSuiteCpMCChartContent.sapSuiteCpMCSizeS {
  height: 3.5rem;
  width: 8.25rem;
}

.sapSuiteCpMCChartContent.sapSuiteCpMCSizeXS {
  height: 1.125rem;
  width: 6rem;
}

.sapSuiteCpMCChartBar {
  display: flex;
  position: absolute;
  width: 100%;
  box-sizing: border-box;
}

.sapSuiteCpMCChartBar > div {
  height: 100%;
  min-width: 0.25rem;
}

// different possible looks that are changed base on the current width of the container
.sapSuiteCpMCChartContent.sapSuiteCpMCLookL {
  font-size: @sapMFontMediumSize;

  .sapSuiteCpMCChartItem {
	height: 1.25rem;
	margin-bottom: 0.625rem;
  }

  .sapSuiteCpMCChartBar {
	height: 0.375rem;
	top: 1.1875rem;
	left: 0; // helps IE
  }
}

.sapSuiteCpMCChartContent.sapSuiteCpMCLookM {
  font-size: @sapMFontSmallSize;

  .sapSuiteCpMCChartItem {
	height: 1.125rem;
	margin-bottom: 0.4375rem;
  }

  .sapSuiteCpMCChartBar {
	height: 0.375rem;
	top: 1.03125rem;
	left: 0; // helps IE
  }
}

.sapSuiteCpMCChartContent.sapSuiteCpMCLookS {
  font-size: @sapMFontSmallSize;

  .sapSuiteCpMCChartItem {
	height: 1rem;
	margin-bottom: 0.125rem;
  }

  .sapSuiteCpMCChartBar {
	height: 0.125rem;
	top: 1rem;
	left: 0; // helps IE
  }
}

.sapSuiteCpMCChartContent.sapSuiteCpMCLookXS {
  .sapSuiteCpMCChartItemTitle, .sapSuiteCpMCChartItemValue {
	display: none;
  }

  .sapSuiteCpMCChartItem {
	height: 0.1875rem;
	margin-bottom: 0.1875rem;
  }

  .sapSuiteCpMCChartBar {
	height: 0.1875rem;
  }
}

.sapSuiteCpMCChartContent.sapSuiteCpMCLookWide {
  font-size: @sapMFontMediumSize;

  .sapSuiteCpMCChartItem {
	height: 0.875rem;
	margin-bottom: 0.3rem;
	align-items: center;
  }

  .sapSuiteCpMCChartBar {
	height: 0.375rem;
	position: relative;
	margin-left: 2.5%;
	margin-right: 2.5%;
	min-width: 4rem;
	flex-shrink: 1000;
  }

  .sapSuiteCpMCChartItemTitle, .sapSuiteCpMCChartItemValue {
	top: 0;
	margin-left: 0;
  }

  .sapSuiteCpMCChartItemTitle {
	flex-shrink: 1;
  }

  .sapSuiteCpMCChartItemValue {
	text-align: right;
	max-width: ~"calc(100% - 5% - 4ch - 4rem)"; // 5% for the margin-left and 4ch for the min-width of sapSuiteCpMCChartItemValue, 4rem for min-width of sapSuiteCpMCChartBar
  }

  .sapSuiteCpMCChartItemHiddenLabel {
	display: block;
	visibility: hidden; // even hidden label value has to be aligned with the other values
  }
}

.sapSuiteCpMCChartBarNegNoValue,
.sapSuiteCpMCChartBarNoValue {
  background-color: @sapUiChartDataPointBG;
}

.sapSuiteCpMCNotLastBarPart {
  border-right: 1px solid @sapUiFieldBackground;
}

.sapSuiteCpMCNotFirstBarPart {
  border-left: 1px solid @sapUiFieldBackground;
}

.sapSuiteCpMCChartItem {
  width: 100%;
  position: relative;
  line-height: normal;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex: 0 0 auto; // item is not supposed to change it size

  .sapSuiteCpMCChartItemTitle {
    color: @sapChart_Data_TextColor;
  }

  .sapSuiteCpMCChartItemTitle, .sapSuiteCpMCChartItemValue {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	position: relative;
	top: 1px;
	min-width: 4ch; // always show at least 4 characters (for the first letter and dots)
	text-align: start;
  }

  .sapSuiteCpMCChartItemHiddenLabel {
	display: none;
  }

  .sapSuiteCpMCChartItemValue {
	max-width: ~"calc(100% - 6% - 4ch)"; // 6% for the margin-left and 4ch for the min-width of sapSuiteCpMCChartItemValue
	margin-left: 6%;
	flex-shrink: 0;
	text-align: end;
  }
}

// colors
.sapSuiteCpMCChartItemValue,
.sapSuiteCpMCChartItemValue.sapSuiteCpMCViewTypeNormal {
  color: @sapUiChartCategoryAxisLabelFontColor;
}

.sapSuiteCpMCChartItemValue.sapSuiteCpMCSemanticColorNeutral {
  color: @sapNeutralTextColor;
}

.sapSuiteCpMCChartItemValue.sapSuiteCpMCSemanticColorGood {
  color: @sapUiPositiveText;
}

.sapSuiteCpMCChartItemValue.sapSuiteCpMCSemanticColorCritical {
  color: @sapUiCriticalText;
}

.sapSuiteCpMCChartItemValue.sapSuiteCpMCSemanticColorError {
  color: @sapUiNegativeText;
}

.sapSuiteCpMCChartBarValue {
  background-color: @sapUiChartPaletteQualitativeHue1;
}

.sapSuiteCpMCChartBarValue.sapSuiteCpMCSemanticColorNeutral {
  background-color: @sapChart_Sequence_Neutral;
}

.sapSuiteCpMCChartBarValue.sapSuiteCpMCSemanticColorGood {
  background-color: @sapChart_Sequence_Good;
}

.sapSuiteCpMCChartBarValue.sapSuiteCpMCSemanticColorCritical {
  background-color: @sapChart_Sequence_Critical;
}

.sapSuiteCpMCChartBarValue.sapSuiteCpMCSemanticColorError {
  background-color: @sapChart_Sequence_Bad;
}