/* ====================================== */
/* CSS for control sap.m/SegmentedButton  */
/* Evening Horizon theme                  */
/* ====================================== */

.sapMSegB {
	height: 2.75rem;
	vertical-align: top;
	position: relative;

	.sapMSegBBtn {

		.sapMSegBBtnInner {
			font-size: @sapMFontMediumSize;
			font-family: var(--sapFontBoldFamily);
			height: 2.25rem;
			line-height: 2.25rem;
			padding-left: 0.5625rem;
			padding-right: 0.5625rem;
			text-align: center;
			text-shadow: none;
			color: var(--sapButton_TextColor);
			border-top: 1px solid var(--sapButton_BorderColor);
			border-left: 1px solid transparent;
			border-bottom: 1px solid var(--sapButton_BorderColor);
			border-right: 1px solid transparent;
			background-color: transparent;
			margin-left: 1px;
			margin-right: 1px;
			margin-top: -1px;
			margin-bottom: -1px;
		}

		&:not(.sapMSegBBtnMixed) .sapMImg {
			padding-left: 0.5625rem;
			padding-right: 0.5625rem;
		}
	}
}

.sapMSegB .sapMSegBBtn .sapMSegBBtnInnerWrapper {
	border-top: 1px solid var(--sapButton_BorderColor);
	border-bottom: 1px solid var(--sapButton_BorderColor);
	background-color: var(--sapButton_Background);
}

.sapMSegB .sapMSegBBtn {
	position: relative;
}

.sapMSegBBtn:first-child .sapMSegBBtnInner {
	border-top-left-radius: var(--sapButton_BorderCornerRadius);
	border-bottom-left-radius: var(--sapButton_BorderCornerRadius);
	border-left: 1px solid var(--sapButton_BorderColor);
	margin-left: -1px;
}

.sapMSegBBtn:first-child .sapMSegBBtnInnerWrapper {
	border-top-left-radius: var(--sapButton_BorderCornerRadius);
	border-bottom-left-radius: var(--sapButton_BorderCornerRadius);
	border-left: 1px solid var(--sapButton_BorderColor);
}

.sapMSegBBtn.sapMSegBtnLastVisibleButton .sapMSegBBtnInnerWrapper {
	border-top-right-radius: var(--sapButton_BorderCornerRadius);
	border-bottom-right-radius: var(--sapButton_BorderCornerRadius);
	border-right: 1px solid var(--sapButton_BorderColor);
}

.sapMSegBBtn.sapMSegBtnLastVisibleButton .sapMSegBBtnInner{
	border-top-right-radius: var(--sapButton_BorderCornerRadius);
	border-bottom-right-radius: var(--sapButton_BorderCornerRadius);
	border-right: 1px solid var(--sapButton_BorderColor);
	margin-right: -1px;
}

html.sap-desktop .sapMSegBBtnFocusable:hover .sapMSegBBtnInner {
	background: var(--sapButton_Hover_Background);
	border-radius: var(--sapButton_Segment_BorderCornerRadius);
	border-color: var(--sapButton_Hover_BorderColor);
}

html.sap-desktop .sapMSegBBtnFocusable.sapMSegBBtnSel:hover .sapMSegBBtnInner {
	border-color: var(--sapButton_Selected_BorderColor);
}

html.sap-desktop .sapMSegBBtnFocusable.sapMBtnActive:hover .sapMSegBBtnInner {
	border-color: var(--sapButton_Hover_BorderColor);
}

/* Custom focus outline: */
html.sap-desktop {

	.sapMSegBBtn:first-child.sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after {
		content: '';
		position: absolute;
		box-sizing: border-box;
		left: 0.125rem;
		top: 0.375rem;
		right: 0.2rem;
		bottom: 0.375rem;
		pointer-events: none;
		border: 0.125rem solid var(--sapContent_FocusColor);
		border-radius: 0.375rem;
	}

	.sapUiSizeCompact .sapMSegBBtn:first-child.sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after,
	&.sapUiSizeCompact .sapMSegBBtn:first-child.sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after {
		top: 0.3rem;
		bottom: 0.3rem;
	}
}

/* Custom focus outline: */
html.sap-desktop {

	.sapMSegBBtn.sapMSegBtnLastVisibleButton.sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after {
		content: '';
		position: absolute;
		box-sizing: border-box;
		left: 0.2rem;
		top: 0.375rem;
		right: 0.125rem;
		bottom: 0.375rem;
		pointer-events: none;
		border: 0.125rem solid var(--sapContent_FocusColor);
		border-radius: 0.375rem;
	}

	.sapUiSizeCompact .sapMSegBBtn.sapMSegBtnLastVisibleButton.sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after,
	&.sapUiSizeCompact .sapMSegBBtn.sapMSegBtnLastVisibleButton.sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after {
		top: 0.3rem;
		bottom: 0.3rem;
	}
}

html.sap-desktop {

	.sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after {
		content: '';
		position: absolute;
		box-sizing: border-box;
		left: 0.2rem;
		top: 0.375rem;
		right: 0.2rem;
		bottom: 0.375rem;
		pointer-events: none;
		border: 0.125rem solid var(--sapContent_FocusColor);
		border-radius: 0.375rem;
	}

	.sapUiSizeCompact .sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after,
	&.sapUiSizeCompact .sapMSegBBtnFocusable:focus .sapMSegBBtnInner::after {
		top: 0.3rem;
		bottom: 0.3rem;
	}
}

.sapMSegB.sapMSegBIcons {

	.sapMSegBBtn.sapMSegBtnLastVisibleButton:not(.sapMSegBBtnMixed) .sapMSegBBtnInner {
		margin-right: -1px;
	}
}

.sapMSegB.sapMSegBIcons {

	.sapMSegBBtn.sapMSegBtnLastVisibleButton:not(.sapMSegBBtnMixed) .sapMSegBBtnInner {
		margin-right: -1px;
	}
}

/* Custom focus outline: */
html.sap-desktop {

	.sapMSegB.sapMSegBIcons {

		.sapMSegBBtn.sapMSegBBtnFocusable:not(.sapMSegBtnLastVisibleButton):focus .sapMSegBBtnInner::after {
			content: '';
			position: absolute;
			box-sizing: border-box;
			left: 0.2rem;
			top: 0.375rem;
			right: 0.15rem;
			bottom: 0.375rem;
			pointer-events: none;
			border: 0.125rem solid var(--sapContent_FocusColor);
			border-radius: 0.375rem;
		}
	}

	.sapUiSizeCompact .sapMSegB.sapMSegBIcons .sapMSegBBtn.sapMSegBBtnFocusable:not(.sapMSegBtnLastVisibleButton):focus .sapMSegBBtnInner::after,
	&.sapUiSizeCompact .sapMSegB.sapMSegBIcons .sapMSegBBtn.sapMSegBBtnFocusable:not(.sapMSegBtnLastVisibleButton):focus .sapMSegBBtnInner::after {
		top: 0.3rem;
		bottom: 0.3rem;
	}
}

/* Custom focus outline: */
html.sap-desktop {

	.sapMSegB.sapMSegBIcons {

		.sapMSegBBtn.sapMSegBBtnFocusable:first-child:focus .sapMSegBBtnInner::after {
			content: '';
			position: absolute;
			box-sizing: border-box;
			left: 0.15rem;
			top: 0.375rem;
			right: 0.15rem;
			bottom: 0.375rem;
			pointer-events: none;
			border: 0.125rem solid var(--sapContent_FocusColor);
			border-radius: 0.375rem;
		}

		.sapUiSizeCompact .sapMSegBBtn.sapMSegBBtnFocusable:first-child:focus .sapMSegBBtnInner::after,
		&.sapUiSizeCompact .sapMSegBBtn.sapMSegBBtnFocusable:first-child:focus .sapMSegBBtnInner::after {
			top: 0.3rem;
			bottom: 0.3rem;
		}
	}
}

.sapMSegB.sapMSegBIcons {

	.sapMSegBBtn:not(.sapMSegBBtnMixed) .sapMSegBBtnInner {
		padding: 0;
	}

	.sapMSegBBtn.sapMSegBBtnMixed .sapMImg {
		height: 2.125rem;
		width: auto;
		padding-right: 0.375rem;
	}

	.sapMSegBBtn.sapMSegBBtnMixed .sapUiIcon {
		padding-left: 0;
		padding-right: 0.375rem;
		width: 1rem;
	}
}

.sapMSegBBtn.sapMSegBBtnFocusable:active:hover {

	.sapMSegBBtnInner {
		background: var(--sapButton_Selected_Background);
		color: var(--sapButton_Selected_TextColor);
		border-color: var(--sapButton_Selected_BorderColor);
	}

	.sapUiIcon {
		color: var(--sapButton_Selected_TextColor);
	}
}

.sapMSegBBtn.sapMSegBBtnSel {

	.sapMSegBBtnInner {
		background: var(--sapButton_Selected_Background);
		color: var(--sapButton_Selected_TextColor);
		border-color: var(--sapButton_Selected_BorderColor);
		border-radius: var(--sapButton_Segment_BorderCornerRadius);
	}

	.sapUiIcon {
		color: var(--sapButton_Selected_TextColor);
	}
}

.sapMSegBBtn .sapMSegBBtnInnerWrapper {
	background-color: var(--sapButton_Background);
}

.sapMSegBBtn.sapMSegBBtnSel:hover {

	.sapMSegBBtnInner {
		border-color: var(--sapButton_Selected_BorderColor);
	}
}

.sapMSegBBtnFocusable.sapMBtnActive {

	.sapMSegBBtnInner {
		background: var(--sapButton_Selected_Background);
		color: var(--sapButton_Selected_TextColor);
	}

	.sapUiIcon {
		color: var(--sapButton_Selected_TextColor);
	}
}

html.sap-desktop .sapMSegBBtn.sapMSegBBtnFocusable.sapMSegBBtnSel:hover .sapMSegBBtnInner,
html.sap-desktop .sapMSegBBtnFocusable.sapMBtnActive:hover .sapMSegBBtnInner {
	background: var(--sapButton_Selected_Hover_Background);
}

.sapMSegBBtn.sapMSegBBtnFocusable.sapMSegBBtnSel {

	.sapMSegBBtnInner {
		border-right: 1px solid var(--sapButton_Selected_BorderColor);
	}

	.sapMSegBBtnInner:hover {
		border-right: 1px solid @sapUiButtonSelectedHoverBorderColor;
	}
}

.sapMSegB img {
	height: 2.125rem;
	width: auto;
	max-height: 2.125rem;
	vertical-align: top;
}

.sapMSegBBtn .sapUiIcon {
	width: auto;
	font-size: 1rem;
	line-height: 2.125rem;
	margin-right: 0;
	color: var(--sapButton_IconColor);
	vertical-align: top;
	text-align: center;
}

.sapMSegBBtn.sapMSegBBtnMixed .sapUiIcon {
	padding-right: 0.375rem;
}

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

.sapMSB .sapMSBInner .sapMSBText:not(.sapMSBTextIE) .sapMBtnInner {
	margin-right: 2.2rem;
}

.sapMSegBIcons:not(.sapMSegBBtnMixed) {

	.sapMImg,
	.sapUiIcon {
		padding-left: 0.5625rem;
		padding-right: 0.5625rem;
	}
}

/* Compact size */
.sapUiSizeCompact {

	.sapMSegBBtn .sapMSegBBtnInner {
		height: 1.625rem;
		line-height: 1.5rem;
		padding-left: 0.4375rem;
		padding-right: 0.4375rem;
	}

	.sapMSegBBtn:first-child .sapMSegBBtnInner {
		border-top-left-radius: 0.5rem;
		border-bottom-left-radius: 0.5rem;
	}

	.sapMSegBBtn.sapMSegBtnLastVisibleButton .sapMSegBBtnInner {
		border-top-right-radius: 0.5rem;
		border-bottom-right-radius: 0.5rem;
	}

	.sapMSegB img {
		line-height: 1.5rem;
		height: 1.5rem;
		width: auto;
	}

	.sapMSegBBtn .sapUiIcon {
		font-size: 1rem;
		line-height: 1.5rem;
		width: 1.0rem;
		vertical-align: top;
	}

	.sapMSegB {

		.sapMBtnIconLeft {
			margin-left: 0;
		}
	}

	.sapMSegBIcons:not(.sapMSegBBtnMixed) {

		.sapMImg,
		.sapUiIcon {
			padding-left: 0.4375rem;
			padding-right: 0.4375rem;
		}
	}

	.sapMSegBIcons {

		.sapMSegBBtn.sapMSegBBtnMixed {

			.sapUiIcon,
			.sapMImg {
				padding-left: 0;
				padding-right: 0.375rem;
				margin: 0;
			}

			.sapMImg {
				height: 1.5rem;
				width: auto; /* 1.5rem; */
			}
		}
	}
}

.sapMSegBBtn.sapMSegBtnLastVisibleButton .sapMSegBBtnInner,
.sapMSegBBtn.sapMSegBtnLastVisibleButton .sapMSegBBtnInnerWrapper {
	border-top-right-radius: var(--sapButton_BorderCornerRadius);
	border-bottom-right-radius: var(--sapButton_BorderCornerRadius);
}