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

@_sap_m_IconTabBar_SelectListItem_PaddingLeft: 0.5rem;
@_sap_m_IconTabBar_SelectListItem_PaddingLeftAdditional: 0;

.sapMITBSelectList {
	margin: 0;
	padding: 0;
	list-style: none;

	&:focus {
		outline: none;
	}
}

.sapMITBSelectList .sapMITBSelectItem {
	position: relative;

	width : 100%;

	box-sizing: border-box;

	display: -webkit-box;
	display: -webkit-flex;
	display: flex;

	-webkit-box-align: center;
	-webkit-align-items: center;
	align-items: center;

	cursor: pointer;

	.sapUiIcon {
		cursor: pointer;
	}

	&.sapMITHUnselectable {
		cursor: default;
	}
}

.sapMITBSelectList .sapMITBSelectItem:not(.sapMITBSep) {
	min-height: 2.75rem;
}

.sapMITBSelectList .sapMITBSep {
	margin: 0;
	height: 1rem;
	justify-content: center;
	padding-right: 0;

	&:first-child {
		margin-top: 0.5rem;
	}

	&.sapMITBSepLine {
		margin-left: 0;
		border: 0;
		position: relative;
		height: 0.25rem;
		padding-right: 17px; // big enough to cover the case when a scrollbar appears

		&::before {
			width: 1rem;
			content: "";
		}

		&::after {
			content: "";
			width: 100%;
			border-top: 0.0625rem solid @sapUiGroupTitleBorderColor;
		}
	}

	.sapMITBSepIcon {
		height: 1rem;
		line-height: 1rem;
		overflow: hidden;
	}
}

.sapMITBSelectItem .sapMITBSelectItemIcon {
	outline: none;
	-webkit-user-select: none; /* Chrome all / Safari all */
	-moz-user-select: none; /* Firefox all */
	-ms-user-select: none; /* IE 10+ */// TODO remove after the end of support for Internet Explorer
	user-select: none;
}

.sapMITBSelectItem .sapMITBText {
	display: block;
	padding: 0 1rem 0 0;
	pointer-events: none;
	min-width: 0;  // chrome flex overflow issue
	overflow: visible;
	white-space: normal;
	font-size: @sapMFontMediumSize;
}

.sapMITBSelectListTextOnly .sapMITBSelectItem .sapMITBText {
	padding-left: 1rem;
}

.sapMITBSelectItem:not(.sapMITBSep) .sapUiIcon {
	font-size: 1.125rem;
	min-width: 2.75rem;
	height: 2.75rem;
	line-height: 2.75rem;
}

/* Compact size */
.sapUiSizeCompact {
	.sapMITBSelectList .sapMITBSelectItem:not(.sapMITBSep) {
		min-height: 2rem;
	}

	.sapMITBSelectItem:not(.sapMITBSep) .sapUiIcon {
		font-size: 1rem;
		min-width: 2rem;
		height: 2rem;
		line-height: 2rem;
	}

	.sapMITBSelectList .sapMITBSep {
		&.sapMITBSepLine {
			padding-right: 0.5rem;

			&::before {
				width: 0.5rem;
			}
		}
	}
}

.sapMITBSelectItem {
	background-color: @sapUiListBackground;
}

.sapMITBSelectItem {
	&.sapMITBFilterNeutral,
	&.sapMITBFilterNegative,
	&.sapMITBFilterPositive,
	&.sapMITBFilterCritical {
		.sapMITBText {
			color: inherit;
		}
	}
}

.sapMITBSelectItem:not(.sapMITHUnselectable):hover {
	background-color: @sapUiListHoverBackground;
}

.sapMITBSelectList .sapMITBSelectItem:not(.sapMITHUnselectable) {

	&:not(.sapUiDnDDragging):active,
	&.sapMITBSelectItemSelected:not(.sapUiDnDDragging):active {
		background-color: @sapUiListActiveBackground;

		& > .sapMITBText {
			color: @sapUiListActiveTextColor;
		}

		& > .sapUiIcon {
			color: @sapUiListActiveTextColor;
		}
	}
}

.sapMITBSelectItem:focus {
	outline: none;
}

.sapMITBSelectItem:focus::before {
	border: @sapUiContentFocusWidth dotted @sapUiContentFocusColor;
	position: absolute;
	content: " ";
	top: 1px;
	right: 1px;
	bottom: 1px;
	left: 1px;
	z-index: 2;
	pointer-events: none;

	[data-sap-ui-browser^="ie"] &,
	[data-sap-ui-browser^="ed"] & {
		border: 1px dashed @sapUiContentFocusColor;
	}
}

.sapMITBSelectItem.sapMITBSelectItemSelected {
	background-color: @sapUiListSelectionBackgroundColor;
}

.sapMITBSelectItem.sapMITBSelectItemSelected:hover {
	background-color: @sapUiListSelectionHoverBackground;
}

.sapUiDnDIndicator {
	z-index: 100;
}