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

@_sap_m_SearchField_Height: 3rem;
@_sap_m_SearchField_FormHeight: 2.5rem;
@_sap_m_SearchField_InputHeight: 2.375rem;
@_sap_m_SearchField_ButtonSize: 2.38rem; /* due to incorrect rounding in Windows Phone, it should be 2.38 instead of 2.375 */
@_sap_m_SearchField_ButtonFontSize: 1.125rem;
@_sap_m_SearchField_NoSearchButtonPadding: 2.375rem;
@_sap_m_SearchField_Compact_FormPaddingLeft: 0.375rem;
@_sap_m_SearchField_Compact_NoSearchButtonPadding: 2rem;
@_sap_m_SearchField_ResetIcon: "\e1c7";

.sapMSF {
	position: relative;
	-moz-user-modify: read-only;
	-webkit-user-modify: read-only;
	-webkit-user-select: none;
	user-select: none;
	box-sizing: border-box;
	width: 100%;
	min-width: 7rem;
	height: @_sap_m_SearchField_Height;
	background: transparent;
	padding: 0.25rem 0;
}

.sapUiUfdShellHead .sapMSF {
	padding: 0;
}

.sapUiSizeCompact .sapUiUfdShellHead .sapMSF {
	padding: 0.25rem 0;
}

html.sap-desktop .sapMFocus > .sapMSFF::before {
	border: 1px dotted @sapUiContentFocusColor;
	position: absolute;
	content: " ";
	top: 1px;
	right: 1px;
	bottom: 1px;
	left: 1px;
	z-index: 2;
	pointer-events: none;
}

.sapMSFI[type="search"] {
	font-size: 0.88em;
	-webkit-appearance:none;
	box-sizing: border-box;
	width: 100%;
}

.sapMSFI[type="search"]::-webkit-search-decoration,
.sapMSFI[type="search"]::-webkit-search-results-decoration,
.sapMSFI[type="search"]::-webkit-search-results-button {
	-webkit-appearance: none;
}

.sapMSFI[type="search"]:focus {
	-webkit-appearance: none;
}

input.sapMSFI[type="search"]:focus {
	outline: none;
	outline-width: 0;
}

.sapMSFR {
	position: absolute;
	right: 0px;
	top: 0px;
	width: 1.8em;
	height: 100%;
	background: transparent;
}

.sapMSFPlaceholder {
	font-size: 0.88em;
	display: none;
}

.sapMSplitContainerMaster .sapMSF {
	padding-right: 1px;
}

.sapMSFF {
	box-sizing: border-box;
	height: @_sap_m_SearchField_FormHeight;
	line-height: @_sap_m_SearchField_InputHeight;
	border: 1px solid @sapUiFieldBorderColor;
	background: @sapUiFieldBackground;
	vertical-align: top;
	width: 100%;
	position: relative;
	padding-left: 0.625rem;
	padding-right: 4.75rem;
}

.sapMSFF.sapMSFNS { /* no search button */
	padding-right: @_sap_m_SearchField_NoSearchButtonPadding;
}

/* Block elements do not work with bar layout */
.sapMBar .sapMSF {
	display : inline-block;
}

.sapMSFF>form>input {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sapMFocus>.sapMSFF {
	border-color: @sapUiFieldFocusBorderColor;
}

:not(.sapMSFDisabled) > .sapMSFF:hover {
	border-color: @sapUiFieldHoverBorderColor;
}

.sapMSFI {
	color: @sapUiFieldTextColor;
	font-family: @sapUiFontFamily;
	font-size: @sapMFontMediumSize;
	background: transparent;
	width: 100%;
	height: @_sap_m_SearchField_InputHeight;
	border: none;
	outline: none;
	padding: 0;
	margin: 0;
	text-indent: 0.125rem;
	vertical-align: top;
	text-overflow: ellipsis;
}

.sapMSFI.sapMSFIA4{
	-webkit-user-modify: read-write-plaintext-only;
}

.sapMSFI[type='search']{
	font-size: 0.875rem;
}

/* remove clear x button in webkit */
.sapMSFI[type="search"]::-webkit-search-cancel-button{
	-webkit-appearance: none;
	display: none;
}

/* remove clear x button in IE */// TODO remove after the end of support for Internet Explorer
.sapMSFI::-ms-clear{
	display: none;
}

/* custom buttons */
.sapMSFB {
	position: absolute;
	width: @_sap_m_SearchField_ButtonSize;
	height: @_sap_m_SearchField_ButtonSize;
	line-height: @_sap_m_SearchField_ButtonSize;
	font-size: @_sap_m_SearchField_ButtonFontSize;
	color: @sapUiContentIconColor;
	text-align: center;
	cursor: default;
	margin:0;
	padding:0;
	right: 0;
	top: 0;
}

.sapMSFB::after {
	speak: none;
	font-weight: normal;
	font-family: 'SAP-icons';
	-webkit-font-smoothing: antialiased;
}

/* reset button */
.sapMSFR:not(.sapMSFNS) {
	right: 2.375rem;
}

.sapMSFR {
	visibility: hidden;
}

.sapMSFR::after {
	content: @_sap_m_SearchField_ResetIcon;
}

.sapMSFVal>.sapMSFF>.sapMSFR,
:not(.sapMSFVal):not(.sapMFocus)>.sapMSFReload>.sapMSFR {
	visibility: visible;
}

/* search icon in place of the reset button */
:not(.sapMSFVal)>.sapMSFReload>.sapMSFR::after {
	content: "\e00d";
}

/* search button */
.sapMSFS::after {
	content: "\e00d";
}

/* refresh icon in some cases */
:not(.sapMFocus)>.sapMSFReload>.sapMSFS::after {
	content: "\e010";
}

/*grouping is not allowed here*/
.sapMSFI::-webkit-input-placeholder {
	color:		   @sapUiFieldPlaceholderTextColor;
	font-size:	   @sapMFontMediumSize;
	font-style:	   italic;
}

.sapMSFI:-ms-input-placeholder {
	color:		   @sapUiFieldPlaceholderTextColor;
	font-size:	   @sapMFontMediumSize;
	font-style:	   italic;
}

.sapMSFI::-moz-placeholder {
	color:		   @sapUiFieldPlaceholderTextColor;
	font-size:	   @sapMFontMediumSize;
	font-style:	   italic;
	opacity: 1; // in FF by default the opacity is 60%
}

/* custom placeholder if not natively supported (IE9) */
/* IE9/IE10 cleanup comment: there are still issues with IE11 and placeholders */
/* TODO remove after the end of support for Internet Explorer */
.sapMSF>.sapMSFF>.sapMSFPlaceholder {
	display: block;
	color: @sapUiFieldPlaceholderTextColor;
	font-size: @sapMFontMediumSize;
	font-style: italic;
	position: absolute;
	bottom: 0;
	left: 1rem;
	height: 2.375rem;
}

.sapMSF.sapMSFVal>.sapMSFF>.sapMSFPlaceholder,
.sapMSF.sapMFocus>.sapMSFF>.sapMSFPlaceholder {
	display: none;
}

/* Compact size */
.sapUiSizeCompact {

	.sapMSF {
		height: 2rem;
		padding: 0.1875rem 0;
		min-width: 6rem;
	}

	.sapMSFF {
		height: 1.625rem;
		line-height: 1.5rem;
		padding-left: @_sap_m_SearchField_Compact_FormPaddingLeft;
		padding-right: 4rem;
	}

	.sapMSFF.sapMSFNS { /* no search button */
		padding-right: 2.38rem;
	}

	/* input */
	.sapMSFI {
		height: 1.5rem;
	}

	/* custom buttons */
	.sapMSFB {
		width: 2rem;
		height: 1.5rem;
		font-size: 1rem;
		text-align: center;
		margin:0;
		padding:0;
		line-height: 1.5rem;
	}

	.sapMSFR:not(.sapMSFNS) {
		right: 2rem;
	}

	/* custom placeholder if not natively supported (IE9) */
	/*IE9/IE10 cleanup comment: there are still issues with IE11 and placeholders*/
	/* TODO remove after the end of support for Internet Explorer */
	.sapMSF>.sapMSFF>.sapMSFPlaceholder {
		left: 0.5rem;
		height: 1.5rem;
	}

}

html[data-sap-ui-browser^="ie"].sap-desktop,// TODO remove after the end of support for Internet Explorer
html[data-sap-ui-browser^="ed"].sap-desktop {
	.sapMFocus > .sapMSFF::before  {
		border: 1px dashed @sapUiContentFocusColor;

	}
}
