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

.sapSuiteIDC {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	outline: none;
}

.sapSuiteIDCNonInteractive :not(.sapSuiteIDCDisabledOverlay) {
	cursor: pointer;
}

.sapSuiteIDCChart {
	width: 40%;
	height: 100%;
	float: left;
	overflow: hidden;
	padding-right: 0.5rem;
	box-sizing: border-box;
}

svg.sapSuiteIDCChartSVG {
	float: right;
}

.sapSuiteIDCLegend {
	width: 60%;
	height: 100%;
	float: left;
	box-sizing: border-box;
}

.sapSuiteIDCLegendSegment:first-child {
	margin-top: 0.125rem;
}

.sapSuiteIDCLegendSegment {
	cursor: pointer;
	margin-bottom: 0.125rem;
	margin-right: 0.125rem;
	margin-left: 0.125rem;
	box-sizing: border-box;
	height : 100%;
	display: flex;
	max-height: 3rem;
	align-items: center;
	outline: none;
	border: 1px solid transparent;
	position: relative;
}

.sapSuiteIDCLegendSegmentSelected {
	font-weight: bold;
	color: @sapUiContentForegroundTextColor;
}

html.sap-tablet .sapSuiteIDC:focus,
html.sap-phone .sapSuiteIDC:focus {
	outline: none;
}

.sapSuiteIDCLegendMarker {
	width: 0.75rem;
	height: 0.75rem;
	margin-left: 0.5rem;
	margin-right: 0.25rem;
	float: left;
	border: 1px solid transparent;
}

.sapSuiteIDCLegendLabelValue {
	width: ~"calc(100% - 1.125rem - 0.25rem - 0.5rem)"; /*escape calc in order to not use less-function (deduct marker width and marker margins)*/
	float: left;

	color: @sapUiContentLabelColor;
	font-family: @sapUiFontFamily;
	font-size: @sapMFontMediumSize;
	cursor: pointer;

	//sapSuiteIDCLegendLabelValue inside a selected or hovered-selected legend entry
	.sapSuiteIDCLegendSegmentSelected &,
	.sapSuiteIDCLegendSegmentSelected.sapSuiteIDCLegendSegmentHover & {
		color: @sapUiContentForegroundTextColor;
	}
}

.sapSuiteIDCSemanticMarker {
	position: absolute;
	top: -1px;
	bottom: -1px;
	width: 0.1875rem;

	&.sapSuiteICSemanticColorGood {
		background-color: @sapUiPositiveElement;
	}
	&.sapSuiteICSemanticColorError {
		background-color: @sapUiNegativeElement;
	}
	&.sapSuiteICSemanticColorCritical {
		background-color: @sapUiCriticalElement;
	}
}

.sapSuiteIDCLegendLabel {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	float: left;
	box-sizing: border-box;
}

.sapSuiteIDCLegendValue {
	white-space: nowrap;
	overflow: hidden;
	box-sizing: border-box;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	float: right;
	text-align: right;
}

.sapSuiteIDCDisabledOverlay {
	position: absolute;
	z-index: 2;
	top: 0;
	right: 0;
	left: 0;
	bottom: 0;
	cursor: default;
}

.sapSuiteIDCSmallFont {
	.sapSuiteIDCLegendLabel, .sapSuiteIDCLegendValue {
		font-size: @sapMFontSmallSize;
	}
	.sapSuiteIDCLegendSegment {
		margin-bottom: 1px;
	}
	.sapSuiteIDCLegendMarker {
		width: 0.625rem;
		height: 0.625rem;
	}
}

.sapSuiteIDCChartSegmentGhost {
	cursor: pointer;
	fill: transparent;
}

/* SMALL-LEGEND-PADDING */
.sapSuiteIDCSmallLegendPadding {
	.sapSuiteIDCLegendMarker {
		margin-left: 0.25rem;
	}
	.sapSuiteIDCLegendLabel, .sapSuiteIDCLegendValue {
		font-size: @sapMFontSmallSize;
	}
	.sapSuiteIDCLegendLabelValue {
		width: ~"calc(100% - 1.125rem - 0.25rem - 0.25rem)"; /*escape calc in order to not use less-function (deduct marker width and marker margins)*/
	}
}

/* FULL-WIDTH */
.sapSuiteIDCFullWidth {
	.sapSuiteIDCChart {
		width: 0%;
		padding: 0;
	}
	.sapSuiteIDCLegend {
		width: 100%;
	}
	.sapSuiteIDCLegendMarker {
		visibility: hidden;
		width: 0px;
		margin: 0px;
	}
	.sapSuiteIDCLegendLabelValue {
		width: 100%;
	}
	.sapSuiteIDCLegendLabel {
		padding-left: 0.5rem;
	}
	.sapSuiteIDCLegendValue {
		padding-right: 0.5rem;
		padding-left: 0.5rem;
	}
	.sapSuiteIDCLegendLabel, .sapSuiteIDCLegendValue {
		font-size: @sapMFontMediumSize;
	}
}

.sapSuiteIDCFullWidth.sapSuiteIDCFullWidthSmallFont {
	.sapSuiteIDCLegendLabel, .sapSuiteIDCLegendValue {
		font-size: @sapMFontSmallSize;
	}
	.sapSuiteIDCLegendLabel {
		padding-left: 0.25rem;
	}
	sapSuiteIDCLegendValue {
		padding-right: 0.25rem;
	}
}

/* COMPACT */
.sapUiSizeCompact {
	.sapSuiteIDCLegendSegment {
		max-height: 2.25rem;
	}
}

@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentHoverBackground: 	    fade(@sapUiHighlight, 20);
@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentSelectedBackground: 		fade(@sapUiHighlight, 40);
@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentSelectedHoverBackground:	fade(@sapUiHighlight, 60);
@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorderHover:		        fade(@sapUiHighlight, 40);
@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorderHoverSelected:		fade(@sapUiHighlight, 80);
@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorder:					@sapUiHighlight;
@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentFillColor:				@sapUiHighlight;

/* GENERAL */
.sapSuiteIDC {
	border: 1px dotted transparent;
}

/* FOCUS */
html.sap-desktop .sapSuiteIDC:focus {
	border-color: @sapUiContentFocusColor;
}

html.sap-desktop .sapSuiteIDCLegendSegment:focus {
	border: @sapUiContentFocusWidth @sapUiContentFocusStyle @sapUiContentFocusColor;
}

/* LEGEND SEGMENTS */
html.sap-desktop .sapSuiteIDC:not(.sapSuiteIDCNonInteractive) {
	.sapSuiteIDCLegendSegmentHover {
		background-color: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentHoverBackground;
		border: 1px solid @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorderHover;

		.sapSuiteIDCLegendLabelValue {
			color: @sapUiContentForegroundTextColor;
		}
	}
	.sapSuiteIDCLegendSegmentSelected.sapSuiteIDCLegendSegmentHover {
		background-color: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentSelectedHoverBackground;
		border: 1px solid @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorderHover;
	}
}

.sapSuiteIDCLegendSegmentSelected {
	background-color: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentSelectedBackground;
}

.sapSuiteIDCLegendMarker {
	border-color: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorder;
}

/* SVG STYLE */
.sapSuiteIDCChartSegment { /*normal*/
	stroke: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorder;
	stroke-width: 1px;
}

/* DONUT SEGMENTS */
.sapSuiteIDCChartSegmentHighlight { /*hover*/
	stroke-opacity: 0.3;
}
.sapSuiteIDCChartSegmentSelected{ /*selected*/
	stroke-opacity: 0.7;
}
.sapSuiteIDCChartSegmentHighlight.sapSuiteIDCChartSegmentSelected { /*hover on selected*/
	stroke-opacity: 0.4;
}

/* DONUT GHOST SEGMENTS */
.sapSuiteIDCChartSegmentGhostHighlight { /*hover*/
	fill: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentHoverBackground;
	stroke: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorderHover;
}
.sapSuiteIDCChartSegmentGhostSelected{ /*selected*/
	fill: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentSelectedBackground;
}
.sapSuiteIDCChartSegmentGhostHighlight.sapSuiteIDCChartSegmentGhostSelected { /*hover on selected*/
	stroke:@_sap_suite_ui_microchart_InteractiveDonutChart_SegmentBorderHoverSelected;
	fill: @_sap_suite_ui_microchart_InteractiveDonutChart_SegmentSelectedHoverBackground;
}
