/* =================================================== */
/* CSS for control sap.esh.search.ui/SearchFieldGroup  */
/* Morning Horizon theme                               */
/* =================================================== */

/* #region shell header theme */

.sapUshellShellSearch {

	#searchFieldInShell {
		height: 2.25rem;
		margin-top: 0.25rem;

		.sapMFlexBox {

			& > div:nth-child(1) {
				margin-right: 0.25rem;
			}

			& > div:nth-child(3) {
				margin-left: 0.25rem;
			}

			& > div:nth-child(4) {
				margin-left: 0.25rem;
				margin-right: 0.25rem;
			}
			background-color: var(--sapShell_InteractiveBackground);
			border-radius: 1.125rem;
			padding-right: 0.5rem;
			padding-left: 0.5rem;
		}

		.searchSelect.sapMSltIconOnly {
			width: 2rem !important;
		}

		.searchSelect {
			border-radius: 1.125rem;
			border-color: var(--sapShell_InteractiveBorderColor);
			background: transparent;

			.sapMSltLabel {
				color: var(--sapShell_TextColor);
			}

			.sapMSltArrow,
			.sapMSltIcon {
				border-radius: 1.125rem;
				color: var(--sapShell_InteractiveTextColor);
			}

			&:hover {
				background: var(--sapShell_Hover_Background);

				.sapMSltArrow,
				.sapMSltIcon {
					background: var(--sapShell_Hover_Background);

					&::before {
						color: var(--sapShell_TextColor);
					}
				}
			}

			&.sapMSltPressed {

				.sapMSltArrow,
				.sapMSltIcon {
					background: var(--sapShell_Active_Background);

					&::before {
						color: var(--sapShell_Active_TextColor);
					}
				}
			}

			&:focus {
				outline-color: contrast(@sapShellColor, @sapUiContentFocusColor, @sapUiContentContrastFocusColor, @sapContent_ContrastTextThreshold);
			}
		}

		.searchInput {

			.sapMInputBaseContentWrapper {
				background: transparent;
				border-color: var(--sapShell_InteractiveBorderColor);
				border-radius: 1.125rem;
			}

			.sapMInputBaseContentWrapper:hover {
				background: var(--sapShell_Hover_Background);
			}

			.sapMInputBaseInner {
				color: var(--sapShell_TextColor);
			}

			.sapMInputBaseInner::placeholder {
				color: var(--sapShell_InteractiveTextColor);
			}

			&.sapMFocus .sapMInputBaseContentWrapper {
				outline-color: contrast(@sapShellColor, @sapUiContentFocusColor, @sapUiContentContrastFocusColor, @sapContent_ContrastTextThreshold);
			}
		}

		/* magnifier and cancel button */
		.sapMBtn {

			.sapMBtnInner.sapMBtnDefault {
				border-radius: 1.125rem;
				background-color: transparent;
				border-color: transparent;
				color: var(--sapShell_TextColor);

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

			&:not(.sapMBtnDisabled) {

				&:hover {

					.sapMBtnInner.sapMBtnDefault {
						background-color: var(--sapShell_Hover_Background);
						border-color: var(--sapShell_Hover_Background);
						color: var(--sapShell_TextColor);
						box-shadow: var(--sapField_Hover_Shadow);

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

				.sapMBtnInner.sapMBtnDefault {

					&.sapMBtnActive {
						background-color: var(--sapShell_Active_Background);
						border-color: var(--sapShell_Active_Background);
						color: var(--sapShell_Active_TextColor);

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

			&:focus {

				.sapMBtnDefault.sapMFocusable.sapMBtnInner {
					border-color: var(--sapContent_FocusColor);
					border-width: 0.125rem;
					box-shadow: none;
				}
			}

			&:focus {

				.sapMBtnEmphasized.sapMFocusable {
					border-color: var(--sapContent_FocusColor);
					border-width: 0.125rem;
				}
			}
		}

		.searchInput.sapMFocus.sapMInputBase .sapMInputBaseContentWrapper:not(.sapMInputBaseDisabledWrapper)::before {
			border-radius: 1.125rem;
		}

		#searchFieldInShell-button.sapMBtn:focus > .sapMFocusable:not(.sapMBadgeIndicator)::before {
			border: none;
		}

		span#searchFieldInShell-button-inner {
			border-radius: 1.125rem;
		}

		#searchFieldInShell-nlqExplainButton.sapMBtn:focus > .sapMFocusable:not(.sapMBadgeIndicator)::before {
			border: none;
		}
	}

	.SearchFieldGroup .sapMInputBaseContentWrapper:not(.sapMInputBaseReadonlyWrapper) {
		box-shadow: none;
	}

	.SearchFieldGroup .sapMSlt {
		box-shadow: none;
	}

	.sapMFlexBox:has(.searchInput:hover) {
		background: var(--sapField_Hover_BackgroundStyle) !important;
		background-color: var(--sapShell_Hover_Background) !important;
	}

	.sapMFocus.sapMInputBase .sapMInputBaseContentWrapper:not(.sapMInputBaseDisabledWrapper)::before {
		border-color: transparent !important;
	}

	.sapMInputBase:not(.sapMFocus) .sapMInputBaseContentWrapper:not(.sapMInputBaseReadonlyWrapper):not(.sapMInputBaseContentWrapperState):not(.sapMInputBaseDisabledWrapper):hover {
		box-shadow: none !important;
	}

	.sapMFlexBox:has(.sapMFocus) {
		border: solid 2px var(--sapField_Active_BorderColor) !important;
	}

	#searchFieldInShell > .sapMFlexBox > div:not(.sapUiHiddenPlaceholder):has(.searchSelect)::after {
		content: '';
		position: absolute;
		width: 1px;
		height: 1rem;
		background: var(--sapShell_InteractiveBorderColor);
		top: 0.5rem;
		right: -2px;
	}

	.SearchFieldGroup > div {
		box-shadow: var(--sapField_Shadow);
		background: var(--sapField_BackgroundStyle);
		background-color: var(--sapShell_InteractiveBackground);
	}
}

/* #endregion */

#searchFieldInShell-select.sapMSlt.sapMSltFocused:not(.sapMSltDisabled):not(.sapMSltState):not(.sapMSltExpanded) {
	box-shadow: inset 0 0 0 0.125rem var(--sapContent_FocusColor);
}

body.sapUiSizeCozy {

	#searchFieldInShell > .sapMFlexBox > div:not(.sapUiHiddenPlaceholder):has(.searchSelect)::after {
		top: 0.875rem;
	}

	#searchFieldInShell {

		.searchSelect:hover {
			background: none !important;

			.sapMSltArrow,
			.sapMSltIcon {
				background: none !important;
			}
		}

		.searchInput .sapMInputBaseContentWrapper:hover {
			background: none;
		}

		.sapMBtn:not(.sapMBtnDisabled):hover {
			background: none !important;

			.sapMBtnInner.sapMBtnDefault {
				background: none !important;
			}
		}
	}
}

.sapUiMedia-Std-Phone .sapUiSizeCozy {

	#searchFieldInShell > .sapMFlexBox > div:not(.sapUiHiddenPlaceholder):has(.searchSelect)::after {
		top: 0.875rem;
	}

	#searchFieldInShell .searchInput .sapMInputBaseContentWrapper:hover {
		background: none;
	}
}

/* #region horizon theme not in shell header */

.sapUshellSearchInputHelpPage .SearchFieldGroup .searchInput .sapMInputBaseContentWrapper {
	box-shadow: none;
	background-color: var(--sapField_Background);
	border-top: 0.0625rem solid rgba(85, 107, 129, 0.25);
	border-left: 0.0625rem solid rgba(85, 107, 129, 0.25);
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;

	&:focus-within {
		background: none;
		border: unset;
	}
}

.sapUshellSearchInputHelpPage .sapMInputBase:not(.sapMFocus) .sapMInputBaseContentWrapper:not(.sapMInputBaseReadonlyWrapper):not(.sapMInputBaseContentWrapperState):not(.sapMInputBaseDisabledWrapper):hover {
	box-shadow: none;
	border: 1px solid rgba(79, 160, 255, 0.5);
	border-top-right-radius: var(--sapField_BorderCornerRadius);
	border-bottom-right-radius: var(--sapField_BorderCornerRadius);
}

.sapUshellSearchInputHelpPage .SearchFieldGroup .searchBtn .sapMBtnInner {
	background: var(--sapField_BackgroundStyle);
	border-top: 0.0625rem solid rgba(85, 107, 129, 0.25);
	border-right: 0.0625rem solid rgba(85, 107, 129, 0.25);
	border-bottom: 0.0625rem solid rgba(85, 107, 129, 0.25);
	border-left: none;
	border-top-right-radius: var(--sapField_BorderCornerRadius);
	border-bottom-right-radius: var(--sapField_BorderCornerRadius);
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;

	&:hover {
		border: 1px solid rgba(79, 160, 255, 0.5);
		border-top-left-radius: var(--sapField_BorderCornerRadius);
		border-bottom-left-radius: var(--sapField_BorderCornerRadius);
	}

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

.sapUshellSearchInputHelpPage .sapMIBar .SearchFieldGroup .searchBtn .sapMBtnInner {
	border-color: rgba(85, 107, 129, 0.25) !important;
}

/* #endregion */