/* ================================= */
/* CSS for control sap.m/Button      */
/* Quartz High Contrast White theme  */
/* ================================= */

@_sap_m_Button_EmphasizedFocusColor: var(--sapContent_FocusColor);

.sapMBtn {
	height: 2.75rem;
}

.sapMBtnEmphasized {
	font-weight: var(--sapButton_Emphasized_FontWeight);
	border: var(--sapButton_Emphasized_BorderWidth) solid;

	.sapMBtnContent {
		line-height: 2rem;
	}
}

.sapMIBar-CTX .sapMBtn:hover > .sapMBtnHoverable.sapMBtnEmphasized:not(.sapMBtnActive),
span.sapMBtnInner.sapMBtnEmphasized {
	text-shadow: none;
}

.sapMIBar-CTX .sapMBtn:hover > .sapMBtnHoverable.sapMBtnEmphasized:not(.sapMBtnActive) {
	color: var(--sapButton_Emphasized_Hover_TextColor);
	font-weight: var(--sapButton_Emphasized_FontWeight);

	.sapMBtnIcon {
		color: var(--sapButton_Emphasized_Hover_TextColor);
	}
}

/* --------------------- */
/* Inner area            */
/* --------------------- */
.sapMBtnInner {
	font-size: @sapMFontMediumSize;
	height: var(--sapElement_Height);
	min-width: 2.25rem;
	margin: 0;
	padding: 0;
	text-align: center;
	position: relative;
	border-radius: var(--sapButton_BorderCornerRadius);
	text-shadow: none;

	&.sapMBtnCritical,
	&.sapMBtnNegative,
	&.sapMBtnSuccess,
	&.sapMBtnNeutral {
		font-weight: bold;
	}
}

/* ------------------- */
/* Button Icon         */
/* ------------------- */
.sapMBtnIcon.sapUiIcon {
	width: 2.125rem;
	font-size: 1rem;
	line-height: 2.125rem;
}

.sapMBtnInner.sapMBtnText .sapMBtnIcon::before {
	width: 1rem;
	text-align: center;
	display: inline-block;
}

.sapMBtnInner.sapMBtnText .sapMBtnIcon {
	width: 1rem;
	padding-right: 0.375rem;
	text-align: center;
}

.sapMBtnInner.sapMBtnText .sapMBtnIcon.sapMBtnIconRight {
	padding-right: 0;
	padding-left: 0.375rem;
}

.sapMBtnInner.sapMBtnText .sapMBtnIcon.sapMImg {
	height: 2.25rem;
	width: auto;
}

.sapMBtnInner .sapMBtnIcon.sapMImg {
	max-height: 2.125rem;
}

.sapUiSizeCompact .sapMBtnInner .sapMBtnIcon.sapMImg {
	max-height: 1.5rem;
}

/* ------------------- */
/* Content area        */
/* ------------------- */
.sapMBtnContent {
	line-height: 2.125rem;
}

.sapMBtnInner.sapMBtnText {
	padding-left: 0.5625rem;
	padding-right: 0.5625rem;
}

.sapMBtnIconLeft + .sapMBtnIconRight,
.sapMBtnIconLeft + .sapMBtnIconLeft {
	padding-right: 0.5625rem;
}

.sapMBtnGhost {
	color: var(--sapButton_TextColor);
	border: 0.0625rem solid var(--sapButton_BorderColor);
	background: var(--sapButton_Lite_Background);
}

.sapMBtnGhost.sapMBtnHoverable.sapMBtnActive {
	color: var(--sapButton_Active_TextColor);
	border-color: var(--sapButton_Active_BorderColor);
	background: var(--sapButton_Active_Background);
}

.sapMBtn:hover > .sapMBtnGhost.sapMBtnHoverable:not(.sapMBtnActive) {
	background: var(--sapButton_Hover_Background);
	border-color: var(--sapButton_Hover_BorderColor);
}

.sapUiSizeCompact {

	.sapMBtnIcon {
		margin-left: 0;
		margin-right: 0;
	}

	.sapMBtnInner.sapMBtnText {
		padding-left: 0.4375rem;
		padding-right: 0.4375rem;
	}

	.sapMBtnBack.sapMBtnIconFirst:not(.sapMBtnText) > .sapMBtnIconLeft:not(:last-child),
	.sapMBtnIconLeft + .sapMBtnIconRight,
	.sapMBtnIconLeft + .sapMBtnIconLeft,
	.sapMBtnInner .sapMBtnIcon :not(img) {
		padding-right: 0.4375rem;
	}

	.sapMBtnInner > img {
		margin: 0;
		padding: 0;
	}

	.sapMBtnEmphasized .sapMBtnContent {
		line-height: 1.4rem;
	}
}

/* ---------------------------------------------------------------------*/
/* Custom focus outline:                                                */
/* ---------------------------------------------------------------------*/

html.sap-desktop .sapMBtn:focus > .sapMFocusable {
	outline: var(--sapContent_FocusWidth) dotted var(--sapContent_FocusColor);
	outline-offset: -0.25rem;
}

html.sap-desktop .sapMBtn:focus > .sapMBtnActive.sapMFocusable {
	outline-color: var(--sapContent_ContrastFocusColor);
}

html.sap-desktop .sapMBtn:focus > .sapMBtnEmphasized.sapMFocusable,
html.sap-desktop .sapMBtn:focus > .sapMBtnCritical.sapMFocusable,
html.sap-desktop .sapMBtn:focus > .sapMBtnNegative.sapMFocusable,
html.sap-desktop .sapMBtn:focus > .sapMBtnSuccess.sapMFocusable,
html.sap-desktop .sapMBtn:focus > .sapMBtnNeutral.sapMFocusable {
	outline-color: var(--sapContent_ContrastFocusColor);
}

html.sap-desktop .sapMBtn:focus > .sapMBtnActive.sapMBtnEmphasized.sapMFocusable {
	outline-color: var(--sapContent_ContrastFocusColor);
}

.sapMTB-Transparent-CTX .sapMBtnInner:not(.sapMToggleBtnPressed):not(.sapMBtnEmphasized):not(.sapMBtnAccept):not(.sapMBtnAttention):not(.sapMBtnReject):not(.sapMBtnActive):not(.sapMBtnGhost) {
	border-color: var(--sapButton_Lite_BorderColor);
}

/* ---------------------------------------------------------------------*/
/* Disabled, hover and active states:                                   */
/* ---------------------------------------------------------------------*/

.sapMBtnDisabled {
	opacity: var(--sapContent_DisabledOpacity);
}

/* ------------------------------------------------ */
/* Buttons in a Bar                                 */
/* (add separators, remove top/bottom border)       */
/* ------------------------------------------------ */

.sapMIBar-CTX .sapMBtn:hover > .sapMBtnHoverable:not(.sapMBtnActive) {
	border-color: transparent;
}

.sapUiSizeCompact .sapMBar-CTX .sapMBtnInner.sapMBtnGhost:not(.sapMBtnDisabled) {
	background: var(--sapButton_Lite_Background);
	border: 0.0625rem solid var(--sapButton_BorderColor);
}

.sapMIBar-CTX .sapMBtn:hover > .sapMBtnGhost.sapMBtnHoverable:not(.sapMBtnActive):not(.sapMToggleBtnPressed) {
	background: var(--sapButton_Hover_Background);
	border-color: var(--sapButton_Hover_BorderColor);
}

html.sap-desktop .sapMFooter-CTX .sapMBtnInner.sapMBtnAccept {
	border-color: var(--sapButton_Accept_BorderColor);
}

html.sap-desktop .sapMFooter-CTX .sapMBtnInner.sapMBtnAttention {
	border-color: var(--sapButton_Attention_BorderColor);
}

html.sap-desktop .sapMFooter-CTX .sapMBtnInner.sapMBtnReject {
	border-color: var(--sapButton_Reject_BorderColor);
}

.sapMBar-CTX,
.sapMTB-Transparent-CTX {

	& :not(.sapMBtnDisabled) > span.sapMBtnInner.sapMBtnTransparent.sapMBtnActive {

		& > .sapMBtnContent,
		& > .sapMBtnIcon {
			color: var(--sapButton_Active_TextColor);
		}
	}
}

.sap-desktop .sapMIBar-CTX, .sap-desktop .sapMTB-Transparent-CTX {

	.sapMBtn:not(.sapMBtnDisabled):hover > .sapMBtnInner:not(.sapMToggleBtnPressed):not(.sapMBtnEmphasized):not(.sapMBtnAccept):not(.sapMBtnReject):not(.sapMBtnActive):not(.sapMBtnGhost):not(.sapMBtnCritical):not(.sapMBtnNegative):not(.sapMBtnNeutral):not(.sapMBtnSuccess) {
		border-color: var(--sapButton_Hover_BorderColor);
	}
}

.sapMTB-Transparent-CTX .sapMBtn:not(.sapMBtnDisabled) > .sapMBtnDefault.sapMBtnActive {
	background-color: var(--sapButton_Active_Background);
}

:not(.sapMBtnDisabled) > span.sapMBtnInner.sapMBtnIconFirst.sapMBtnTransparent.sapMBtnActive,
:not(.sapMBtnDisabled) > span.sapMBtnInner.sapMBtnIconLast.sapMBtnTransparent.sapMBtnActive {
	background-color: var(--sapButton_Lite_Active_Background);
	border-color: var(--sapButton_Lite_Active_BorderColor);
}

/* ----------------------*/
/* Badges                */
/* ----------------------*/

.sapMBtn .sapMBadge .sapMBadgeIndicator:after {
	border-color: var(--sapGroup_ContentBorderColor);
}
