/* ==================================== */
/* CSS for control sap.ui.unified/Menu  */
/* Base theme                           */
/* ==================================== */

@_sap_ui_unified_Menu_ItmHeightCozy: 2.75rem;
@_sap_ui_unified_Menu_ItmHeightCompact: 2rem;
@_sap_ui_unified_Menu_ItmPaddingCozy: 0.625rem;
@_sap_ui_unified_Menu_ItmPaddingCompact: 0.5rem;

.sapMMenu {
	max-width: 100%;
}

.sapUiMnu {
	/* initially hidden off the screen */
	position: absolute;
	top: -10000px;
	display: block;
	background-color: var(--sapGroup_ContentBackground);
	cursor: default;
	outline: none;
	overflow: hidden;
	padding: 1px;
	font-family: var(--sapFontFamily);
	font-size: @sapMFontMediumSize;
	padding: 0;
	min-width: 5rem;
	color: var(--sapList_TextColor);
	box-shadow: var(--sapContent_Shadow1);
	border-radius: var(--sapElement_BorderCornerRadius);
}

.sapUiMnu:focus {
	outline: none;
}

.sapUiMnuLst {
	padding: 0;
	margin: 0;
	display: block;
	cursor: default;
	color: var(--sapList_TextColor);
	font-size: @sapMFontMediumSize;
	font-family: var(--sapFontFamily);
}

.sapUiMnuItm {
	display: flex;
	height: @_sap_ui_unified_Menu_ItmHeightCozy;
	white-space: nowrap;
	position: relative;
	align-items: center;
	flex: 0 0 auto;
	padding: 0 @_sap_ui_unified_Menu_ItmPaddingCozy;
}

.sapUiMnuItm:not(.sapUiMnuItmDsbl) {
	cursor: pointer;
}

.sapUiMnuItm:focus {
	outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);
	outline-offset: -3px;
}

.sapUiMnuItm.sapUiMnuItmDsbl,
.sapUiMnuItm.sapUiMnuTfItm.sapUiMnuItmDsbl .sapUiMnuTfItemLbl,
.sapUiMnuItm.sapUiMnuTfItm.sapUiMnuItmDsbl.sapUiMnuItmHov .sapUiMnuTfItemLbl {
	color: var(--sapContent_DisabledTextColor);
}

.sapUiMnuItm.sapUiMnuItmHov {
	color: var(--sapList_TextColor);
	background-color: var(--sapList_Hover_Background);
}

.sapUiMnuItm.sapUiMnuTfItm.sapUiMnuItmHov .sapUiMnuTfItemLbl {
	color: var(--sapList_TextColor);
}

.sapUiMnuItmTxt {
	margin-inline-start: 0;
	flex-grow: 1;
	flex-shrink: 1;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.sapUiMnuItmSCut {
	padding-inline-start: 1rem;
	padding-inline-end: 0.25rem;
	color: var(--sapContent_LabelColor);
	font-weight: normal;
	text-align: right;

	&:empty {
		padding-inline-start: 0;
		padding-inline-end: 0;
	}
}

.sapUiMnuItmSel {
	padding-inline-start: 0.5rem;
	padding-inline-end: 0;
	font-weight: normal;
	text-align: center;

	&::after {
		color: var(--sapSelectedColor);
		content: '\e05b';
		font-family: var(--sapContent_IconFontFamily);
		outline: none;
		line-height: inherit;
		padding-inline-end: 0.125rem;
		width: 2rem;
		height: 2rem;
	}
}

.sapUiMnuItmIco {
	min-width: 1.125rem;
	max-width: 1.125rem;
	text-align: center;
	color: var(--sapContent_NonInteractiveIconColor);
	padding-inline-end: 0.625rem;
}

.sapUiMnuItmIco > .sapUiIcon {
	line-height: @_sap_ui_unified_Menu_ItmHeightCozy;
	font-size: @_sap_ui_unified_Menu_ItmHeightCozy / 2 - 0.125rem;
}

.sapUiMnuItmIco > .sapUiIcon {
	cursor: inherit;
}

.sapUiMnu .sapUiMnuItmIco .sapUiIcon {
	font-size: 1rem;
}

.sapUiMnuItmIco > img {
	max-width: 1rem;
	max-height: 1rem;
	vertical-align: middle;
	padding-inline-start: 0;
}

.sapUiMnuItmDsbl > .sapUiMnuItmIco > img {
	opacity: 0.5;
}

.sapUiMnuNoIco > .sapUiMnuItm > .sapUiMnuItmIco,
.sapUiMnuNoIco > div > .sapUiMnuItm > .sapUiMnuItmIco {
	width: 0;
	display: none;
}

.sapUiMnuItmTxt {
	white-space: nowrap;
}

.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt {
	padding-inline-end: 5px;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemLbl {
	vertical-align: top;
	margin-inline-end: 5px;
	line-height: @_sap_ui_unified_Menu_ItmHeightCozy;
	display: inline-block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt > .sapUiMnuTfItemWrppr {
	position: absolute;
	inset-inline-end: 5px;
	top: 0;
	width: 22ex;
	display: inline-block;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf {
	box-sizing: border-box;
	vertical-align: top;
	font-family: var(--sapFontFamily);
	font-size: @sapUiFontSize;
	-webkit-appearance: none; /* Needed for safari mobile */
	border: 1px solid var(--sapField_BorderColor);
	background-color: var(--sapField_Background);
	color: var(--sapList_TextColor);
	width: 100%;
	outline: none; /* remove Webkit glow effect */
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf:focus {
	background-color: var(--sapField_Background);
	border-color: var(--sapField_Focus_BorderColor);
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf.sapUiMnuTfItemTfDsbl {
	/* Avoid text selection in disabled TextFields */
	-webkit-user-select: none;
	user-select: none;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf.sapUiMnuTfItemTfEnbl.sapUiMnuTfItemTfErr {
	border-color: var(--sapField_InvalidColor);
	background-color: var(--sapField_InvalidBackground);
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf.sapUiMnuTfItemTfEnbl.sapUiMnuTfItemTfWarn {
	border-color: var(--sapField_WarningColor);
	background-color: var(--sapField_WarningBackground);
}

.sapUiMnuTfItmStretch {
	display: inline-block;
	width: 22ex;
	height: 1px;
}

.sapUiMnuItmSbMnu {
	min-width: 1.375rem;
	max-width: 1.375rem;
	justify-content: end;
	text-align: end;
	font-size: 0.75rem;
	padding-inline-end: 0.25rem;
}

.sapUiMnuItmSbMnu > div::after {
	content: '\e066';
	color: var(--sapContent_NonInteractiveIconColor);
	font-family: var(--sapContent_IconFontFamily);
	outline: none;
}

.sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmSbMnu {
	width: 0;
	display: none;
}

.sapUiMnuItmR {
	width: 2px;
	right: 0;
}

.sapUiMnuDiv {
	position: relative;
	height: 0.125rem;
}

.sapUiMnuDiv > hr {
	display: inline-block;
	margin: 0;
	position: absolute;
	left: 5px;
	right: 5px;
	margin-top: 1px;
	margin-bottom: 1px;
	border-width: 0;
	border-top: 0.0625rem solid var(--sapGroup_ContentBorderColor);
	height: 1px;
	color: var(--sapToolbar_SeparatorColor);
}

.sapUiMnuDivL,
.sapUiMnuDivR {
	display: inline-block;
	position: absolute;
	width: 5px;
	height: 100%;
}

.sapUiMnuDivR {
	right: 0;
}

.sapUiMnuDivL {
	left: 0;
}

.sapUiMnu.sapUiMnuScroll {
	overflow-x: none;
	overflow-y: auto;
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuItmR {
	width: @_sap_ui_unified_Menu_ItmPaddingCozy + 1rem;
}

.sapUiMnuItm.sapUiMnuItmSubMnuOpen,
.sapUiMnuItm.sapUiMnuItmSubMnuOpen.sapUiMnuItmHov {
	background-color: var(--sapList_SelectionBackgroundColor);
}

.sapUiMnuItm.sapUiMnuItmHov:active {
	color: var(--sapList_Active_TextColor);
	background-color: var(--sapList_Active_Background);
}

.sapUiMnuItm.sapUiMnuItmDsbl.sapUiMnuItmHov,
.sapUiMnuItm.sapUiMnuItmDsbl.sapUiMnuItmHov:active {
	color: var(--sapContent_DisabledTextColor);
	background-color: transparent;
}

.sapUiMnuItm.sapUiMnuItmDsbl .sapUiMnuItmIco {
	color: var(--sapContent_DisabledTextColor);
}

.sapUiMnuItm.sapUiMnuItmHov:active .sapUiMnuItmIco {
	color: var(--sapList_Active_TextColor);
}

.sapUiMnuItm.sapUiMnuItmDsbl.sapUiMnuItmHov:active .sapUiMnuItmIco {
	color: var(--sapContent_DisabledTextColor);
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuItmTxt {
	padding-inline-end: @_sap_ui_unified_Menu_ItmHeightCozy + @_sap_ui_unified_Menu_ItmPaddingCozy + 1rem;
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt,
.sapUiMnu.sapUiMnuScroll .sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt {
	padding-inline-end: @_sap_ui_unified_Menu_ItmPaddingCozy + 1rem;
}

.sapUiMnuNoIco .sapUiMnuItmTxt {
	padding-inline-start: 0;
}

.sapUiMnuItm.sapUiMnuTfItm > .sapUiMnuItmTxt > .sapUiMnuTfItemWrppr {
	inset-inline-end: @_sap_ui_unified_Menu_ItmPaddingCozy;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf {
	font-family: var(--sapFontFamily);
	font-size: @sapMFontMediumSize;
	padding: 0.125rem 0.3125rem 0.125rem 0.3125rem;
	margin-top: 0.1875rem;
	height: @_sap_ui_unified_Menu_ItmHeightCozy - 0.375rem;
}

.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemLbl {
	line-height: @_sap_ui_unified_Menu_ItmHeightCozy;
	font-family: var(--sapFontFamily);
	font-size: @sapMFontMediumSize;
	color: var(--sapList_TextColor);
	margin-inline-end: @_sap_ui_unified_Menu_ItmPaddingCozy;
}

.sapUiMnuItm.sapUiMnuItmHov .sapUiMnuItmSbMnu > div::after {
	color: var(--sapContent_NonInteractiveIconColor);
}

.sapUiMnuItm.sapUiMnuItmHov:active .sapUiMnuItmSbMnu > div::after {
 	color: var(--sapList_Active_TextColor);
}

.sapUiMnu.sapUiMnuScroll .sapUiMnuItmSbMnu {
	right: 1rem;
}

.sapUiMnuItm {

	.sapUiMnuItmTxt {
		padding-inline-start: 0.5rem;
	}

	.sapUiMnuItmIco + .sapUiMnuItmTxt {
		padding-inline-start: 0;
	}
}

html.sap-phone,
html.sap-tablet {

	.sapMMenuLIImgThumbIcon {
		color: var(--sapContent_NonInteractiveIconColor);
	}

	.sapMLIB.sapMLIBActive .sapMMenuLIImgThumbIcon::before {
		color: var(--sapContent_ContrastIconColor);
	}

	.sapMRespMenuDialog .sapMList .sapMLIBContent .sapMSLITitleOnly {
		font-size: @sapMFontMediumSize;
	}

	.sapMRespMenuDialog .sapMPage .sapMHeader-CTX {
		background-color: var(--sapGroup_ContentBackground);
		box-shadow: inset 0 -1px darken(@sapUiGroupContentBackground, 8);
	}
}

html.sap-phone .sapMMenuLIImgThumbIcon {
	height: 2.75rem;
	width: 1rem;
	font-size: 1rem;
	line-height: 2.75rem;
}

/* Compact size */
.sapUiSizeCompact {

	.sapUiMnuItm {
		height: @_sap_ui_unified_Menu_ItmHeightCompact;
		padding: 0 @_sap_ui_unified_Menu_ItmPaddingCompact;
	}

	.sapUiMnuNoIco.sapUiMnuNoSbMnu > .sapUiMnuItm > .sapUiMnuItmTxt {
		padding-inline-end: 0.75rem;
	}

	.sapUiMnuDiv {
		height: 1px;
	}

	.sapUiMnuDiv > hr {
		left: 0;
		right: 0;
		margin-top: 0;
		margin-bottom: 0;
	}

	.sapUiMnuLst > .sapUiMnuItm > .sapUiMnuItmTxt {
		padding-inline-start: 2rem;
	}

	.sapUiMnuLst > .sapUiMnuItm > .sapUiMnuItmIco + .sapUiMnuItmTxt {
		padding-inline-start: 0;
	}

	.sapUiMnuLst.sapUiMnuNoIco > .sapUiMnuItm > .sapUiMnuItmTxt,
	.sapUiMnuLst.sapUiMnuNoIco > .sapUiMnuItm > .sapUiMnuItmIco + .sapUiMnuItmTxt {
		padding-inline-start: 0;
	}

	.sapUiMnuItmSbMnu {
		min-width: 1.5rem;
		max-width: 1.5rem;
	}

	.sapUiMnuItm.sapUiMnuTfItm .sapUiMnuTfItemTf {
		height: @_sap_ui_unified_Menu_ItmHeightCompact - 0.375rem;
	}

	.sapUiMnuItmIco {
		min-width: 1rem;
		max-width: 1rem;
		padding-inline-end: 0.5rem;
	}

	.sapUiMnuEndContent {
		padding-inline-start: 0.5rem;
	}

	.sapUiMnuItmIco > .sapUiIcon {
		line-height: @_sap_ui_unified_Menu_ItmHeightCompact;
	}
}