/* ====================================== */
/* CSS for control sap.m/SegmentedButton  */
/* Belize High Contrast White theme       */
/* ====================================== */

.sapMSegBBtn {
	.sapMSegBBtnInner {
		margin-right: 0;
		-webkit-tap-highlight-color: transparent;
	}
	&:first-child .sapMSegBBtnInner {
		border-top-left-radius: 0.375rem;
		border-bottom-left-radius: 0.375rem;
	}
	&.sapMSegBtnLastVisibleButton .sapMSegBBtnInner {
		border-top-right-radius: 0.375rem;
		border-bottom-right-radius: 0.375rem;
	}
	&.sapMSegBBtnDis {
		.sapMSegBBtnInner {
			background-color: @sapUiSegmentedButtonBackground;
			border-color: @sapUiHcReducedForeground;
			color: @sapUiContentDisabledTextColor;
		}
		&.sapMSegBBtnSel .sapMSegBBtnInner {
			background-color: @sapUiHcReducedBackground;
			color: @sapUiHcReducedAltForeground;
		}
		&.sapMSegBtnLastVisibleButton .sapMSegBBtnInner {
			border-color: @sapUiHcReducedForeground;
		}
	}
	&.sapMSegBBtnSel:focus:not(.sapMSegBBtnDis) .sapMSegBBtnInner {
		border-radius: 0;
	}
}

.sapMSegB {
	.sapMSegBBtn {
		&:not(.sapMSegBtnLastVisibleButton) .sapMSegBBtnInner {
			border-right: 1px solid transparent;
		}
		+ .sapMSegBBtn.sapMSegBBtnFocusable:focus .sapMSegBBtnInner {
			border-right: 1px solid transparent;
		}
		&.sapMSegBtnLastVisibleButton:not(.sapMSegBBtnDis) .sapMSegBBtnInner {
			border-right: 1px solid @sapUiSegmentedButtonBorderColor;
		}
		&.sapMSegBBtnDis.sapMSegBtnLastVisibleButton .sapMSegBBtnInner {
			border-right: 1px solid @sapUiHcReducedForeground;
		}
	}
}

/* Fix for disabled button border nested between active buttons */
.sapMSegBBtn.sapMSegBBtnFocusable + .sapMSegBBtnDis {
	.sapMSegBBtnInner {
		opacity: 1;
		border-left: 1px solid @sapUiSegmentedButtonBorderColor;
		border-top-color: @sapUiHcReducedForeground;
		border-bottom-color: @sapUiHcReducedForeground;
		color: @sapUiContentDisabledTextColor;
	}
	&.sapMSegBBtnSel .sapMSegBBtnInner {
		background-color: @sapUiHcReducedBackground;
		color: @sapUiHcReducedAltForeground;
	}
	& .sapMSegBBtnInner > .sapUiIcon {
		opacity: 0.5;
	}
}

/* Custom focus outline: */
.sapMSegBBtnFocusable {
	&:focus .sapMSegBBtnInner {
		outline: 0.125rem dotted @sapUiContentFocusColor;
		outline-offset: -0.125rem;
		border: 1px solid transparent;
	}
	&.sapMSegBBtnSel:focus .sapMSegBBtnInner {
		border: 1px solid transparent;
	}
	&:active + .sapMSegBBtn,
	&:focus + .sapMSegBBtn {
		.sapMSegBBtnInner {
			border-left: 1px solid transparent;
		}
		&:not(.sapMSegBtnLastVisibleButton) .sapMSegBBtnInner {
			border-left: 1px solid transparent;
		}
		&.sapMSegBtnLastVisibleButton .sapMSegBBtnInner {
			border-left: 1px solid transparent;
		}
	}
	&.sapMSegBBtnSel:focus + .sapMSegBBtn .sapMSegBBtnInner {
		border-left: 1px solid transparent;
	}
}

/* Compact size */
.sapUiSizeCompact {
	.sapMSegBBtn:not(.sapMSegBIcons) .sapMSegBBtnInner {
		height: 1.625rem;
		line-height: 1.5rem;
		padding-left: 0.4375rem;
		padding-right: 0.4375rem;
	}

	.sapMSegB.sapMBarChild .sapMSegBBtn .sapMSegBBtnInner {
		padding-left: 0.4375rem;
		padding-right: 0.4375rem;
	}

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

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

	.sapMSegB.sapMSegBIcons .sapMSegBBtnMixed img {
		padding: 0;
	}

	.sapMSegB .sapMBtnIconLeft {
		margin-left: 0;
	}

	.sapMSegBBtn.sapMSegBBtnMixed {
		.sapMImg,
		.sapUiIcon {
			margin-right: 0.5rem;
		}
	}
}