/* ========================================= */
/* CSS for control sap.esh.search.ui/Search  */
/* Base theme                                */
/* ========================================= */

@searchPhoneSize: ~"(max-width: 767px)";
@searchTabletSize: ~"(min-width: 768px) and (max-width: 1150px)";
@searchLargeTabletSize: ~"(min-width: 959px) and (max-width: 1150px)";
@searchNotPhoneSize: ~"(min-width: 768px)";
@searchDesktopSize: ~"(min-width: 1151px)"; /* do not add 'and (max-width: 1500px) here, result item attributes become hidden for width > 1500' */
@searchLargeDesktopSize: ~"(min-width: 1501px)";

.sapUshellSearchFacetList {
	padding-bottom: 1rem;
	min-height: 100%;
	box-sizing: border-box;
	background-color: var(--sapList_Background);
}

.sapUshellSearchFacetListShowAllFilterBtn {
	display: block;
	margin: 1rem auto 0 auto;
}

/* filter bar */
.sapUshellSearchFilterContextualBar {
	font-size: 0.875rem;
	margin-top: 0;
}

.sapUshellSearchFilterContextualBar .sapUshellSearchFilterText {
	font-style: italic;
	width: ~"calc(100% - 3rem)";
}

.sapUshellSearchFilterContextualBar .sapUshellSearchFilterResetButton {
	color: var(--sapContent_ContrastTextColor);
}

.sapElisaSearchCompositeControl .sapUshellSearchNlqExplainBar {
	background: var(--sapInformationBackground);
}

.sapElisaSearchCompositeControl .sapUshellSearchNlqExplainBar .sapUshellSearchNlqExplainLink {
	min-width: auto;
}

.sapUshellSearchNlqExplainBar .sapUshellSearchNlqFilterFormattedTextEllipsis {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
}

/* context bar - breadcrumb + count */
.sapElisaSearchContextBarContainer {
	width: 100%;
}

.sapElisaSearchContextBarContent {
	width: 100%;
}

.sapElisaNoResultScreen {
	padding-top: 5rem;
}

/******** MAIN TOOLBAR ********/
.searchDataSourceTabStripBar .sapMITBContainerContent {
	border-width: 0;
	border-style: solid;
}

.sapUshellSearchBarValueHelp {
	display: none; /* may be we need to move 'download button/feature' to actions menu for 'value help' mode */
}

.searchDataSourceTabStripBar {
	border-bottom-width: 0;
	border-bottom-style: solid;
}

.sapElisaSearchGenericButtonsToolbar.sapMTB.sapMTBStandard {
	border-bottom-width: 0;
	border-bottom-style: solid;
	background-color: transparent;
}

.sapElisaGridTile {

	.sapMGTHdrContent {
		height: 0.5rem !important;
	}

	.sapMGTContent {
		height: 8rem !important;
	}
}

[id$='-Breadcrumbs'].sapElisaBreadcrumbs {
	width: 100% !important;
}

.sapUshellSearchTotalCountBreadcrumbs {

	.sapMBreadcrumbsItem .sapMBreadcrumbsCurrentLocation {
		font-weight: bold;
		padding-left: 0.25rem;
	}

	ol li:nth-last-child(2) .sapMBreadcrumbsSeparator {
		display: none;
	}
}

.sapElisaBreadcrumbsFolderContainerVbox {
	width: ~"calc(100% - 10rem)";
}

.sapElisaSearchContextBarContainer .sapElisaSearchContextBarFolderMode {
	background-color: transparent;
}

/******** tabstrips for switching between categories/connectors (sap.m.IconTabBar) ********/
.searchDataSourceTabStripBar {

	/* tab bar */
	@media (max-width: 500px) {
		/* hide tab bar when we have limited horizontal space */
		display: none;
		width: 1rem;
	}
	padding-left: 0;
	padding-right: 0;
	padding-bottom: 0;

	/* tab bar - top container */
	.sapMITH {
		padding: 0;
		padding-right: 0.25rem;
		border-bottom: 0;
		box-shadow: none;
		line-height: 1.25rem;

		/* tab bar (does not include overflow/mode-dropdown-button) */
		.sapMITBHead {
			padding: 0;
		}
	}

	/* tab bar - tab , inner container */
	.sapMITBHead {
		height: 1.9rem;
	}

	/* tab bar - tab , inner container */
	.sapMITBFilterWrapper {
		padding-top: 0.65rem;
		padding-left: 0.2rem;
		height: 0.8rem;

		/* tab bar - line on the bottom of the tab */
		.sapMITBContentArrow {
			margin-top: 0.05rem !important;
			height: 0.25rem !important;
		}
	}

	/* tab bar - container of line on the bottom of the tab */
	.sapMITBVertical.sapMITBFilter:not(.sapMITHUnselectable) .sapMITBText.sapMITBBadgeHolder {
		padding: 0;
		margin: 0;
	}

	/* tab text containers (not: more dropdown-button) */
	.sapMITBInLine.sapMITBTextOnly .sapMITBHead .sapMITBVertical.sapMITBFilter:not(.sapMITHUnselectable) {
		height: 1.9rem;
	}

	/* tab text containers (not: more dropdown-button) */
	.sapMITBInLine.sapMITBTextOnly .sapMITBHead .sapMITBVertical.sapMITBFilter.sapMITHUnselectable {
		height: 1.9rem;
	}

	/* tab bar - tab, 'more' */
	.sapMITHEndOverflow .sapMITHOverflowVisible {
		margin-top: 0.2rem;
		margin-bottom: 0;
		padding-top: 0.1rem;
		padding-left: 0.4rem;
		padding-right: 0.4rem;
	}

	.sapMITHEndOverflow .sapMITBFilterWrapper {
		padding-top: 0.2rem;
	}

	.sapMITHEndOverflow .sapMITBText {
		margin-top: 0.2rem;
	}

	/* container of IconTabBar is not in use */
	.sapMITBContainerContent .sapMITBContent {
		display: none;
	}
	/* adjust look&feel of text to how it shall look on toolbars */
}

.searchDataSourceTabStripBar > [id$='-header'].sapMITH {
	background-color: transparent;
}

.searchDataSourceTabStripBar > [id$='-header'] .sapMITHEndOverflow {
	background-color: transparent;
}

.searchDataSourceTabStripBar > [id$='-header-overflow'] {
	background-color: transparent !important;
}

.searchDataSourceTabStripBar .sapMITHEndOverflow {

	/* oberflow / 'more' */
	@media @searchPhoneSize {
		display: none;
	}
}

.searchDataSourceTabStripBar {

	/* tab bar - default */
	@media @searchPhoneSize {
		width: 0;
	}

	@media @searchTabletSize {
		width: 20rem;
	}

	@media @searchLargeTabletSize {
		width: 28rem;
	}

	@media @searchDesktopSize {
		width: 38rem;
	}

	@media @searchLargeDesktopSize {
		width: 44rem;
	}
}

.searchDataSourceTabStripBar:not(.sapUshellSearchBarHasCustomButtons) {

	/* tab bar - with custom toolbar */
	@media @searchPhoneSize {
		width: 0;
	}

	@media @searchTabletSize {
		width: 25rem;
	}

	@media @searchLargeTabletSize {
		width: 42rem;
	}

	@media @searchDesktopSize {
		width: 45rem;
	}

	@media @searchLargeDesktopSize {
		width: 58rem;
	}
}

.searchDataSourceTabStripBar.searchDataSourceTabStripBarMediumItemsTextLength:not(.sapUshellSearchBarHasCustomButtons) {

	/* tab bar - with custom toolbar */
	@media @searchPhoneSize {
		width: 0;
	}

	@media @searchTabletSize {
		width: 18rem;
	}

	@media @searchLargeTabletSize {
		width: 25rem;
	}

	@media @searchDesktopSize {
		width: 35rem;
	}

	@media @searchLargeDesktopSize {
		width: 40rem;
	}
}

.searchDataSourceTabStripBar.sapUshellSearchBarHasCustomButtons.searchDataSourceTabStripBarTinyItemsTextLength {

	/* tab bar - with custom toolbar and total width of tabbar items consuming extremely 'tiny' width (i.e. only one tab or total lenght of tab texts/labels tiny (short DS labels) */
	@media @searchPhoneSize {
		width: 0;
	}

	@media @searchTabletSize {
		width: 12rem;
	}

	@media @searchLargeTabletSize {
		width: 14rem;
	}

	@media @searchDesktopSize {
		width: 19rem;
	}

	@media @searchLargeDesktopSize {
		width: 22rem;
	}
}

.searchDataSourceTabStripBar.sapUshellSearchBarHasCustomButtons.searchDataSourceTabStripBarMediumItemsTextLength {

	/* tab bar - with custom toolbar and total width of tabbar items consuming extremely 'tiny' width (i.e. only one tab or total lenght of tab texts/labels tiny (short DS labels) */
	@media @searchPhoneSize {
		width: 0;
	}

	@media @searchTabletSize {
		width: 14rem;
	}

	@media @searchLargeTabletSize {
		width: 17rem;
	}

	@media @searchDesktopSize {
		width: 23rem;
	}

	@media @searchLargeDesktopSize {
		width: 27rem;
	}
}

/***************** OVERALL LAYOUT **************/

.sapUshellSearchContainer .sapUiFixFlexRow > .sapUiFixFlexFixed {
	overflow-y: auto;
	overflow-x: auto;
	width: 0;
	opacity: 0;
	visibility: hidden;

	&.sapUshellSearchFilterbar {
		width: 18rem;
		opacity: 1;
		visibility: visible;
		border-right: 1px solid var(--sapList_BorderColor);
		overflow-x: hidden;
	}
}

.sapUshellSearchContainer .sapUiFixFlexRow > .sapUiFixFlexFixed.sapUshellSearchFacetAnimation {
	transition:
	width 400ms,
	opacity 400ms,
	visibility 400ms;
}

.sapUshellSearchContainer {
	width: 100%;
	height: 100%;
	background-color: var(--sapList_HeaderBackground);
}

.sapUshellSearchContainer .sapUiFixFlexFlexible {
	overflow-y: auto;
	overflow-x: auto;
}

.sapUshellSearchTotalCountBar {
	padding-top: 0.5rem;
	padding-bottom: 0.25rem;
	margin-top: 0;
	margin-bottom: 0;
	margin-left: 1rem;
	margin-right: 1rem;
	background-color: transparent !important;

	label {
		line-height: 2rem;
		font-size: 0.875rem;
	}
}

.sapUshellSubContainer > div {
	width: 100%;
}

.sapUshellShellOvrlySearch > div {
	height: 100%;
}

/* flp search */
[id$='searchContainerApp'] {
	height: 100%;
}

.sapUshellSearchInputHelpPage {
	background-color: var(--sapList_HeaderBackground);
}

.sapUshellSearchLayout {
	background-color: var(--sapList_HeaderBackground);
}

/* make non-resizable horizontal splitter bars 'invisible' and make sure responsive splitter does not take width/hight into account */
.sapUiResponsiveSplitter.sapUshellSearchLayout [aria-orientation='horizontal'].sapUiLoSplitterNoResize {
	width: 0 !important;
	height: 0 !important;
	display: none !important;
}

/* make non-resizable (vertical) splitter bar of basket 'invisible' (only if initial 'span', instantiated basket uses 'div' */
/* and make sure responsive splitter does not take width/hight into account */
.sapUiResponsiveSplitter.sapUshellSearchLayout [aria-orientation='vertical'].sapUiLoSplitterNoResize:has(+ section > span[id$='-SearchBasket']) {
	width: 0 !important;
	height: 0 !important;
	display: none !important;
}

/* make non-resizable vertical splitter bars 'tiny' */
.sapUiResponsiveSplitter.sapUshellSearchLayout [aria-orientation='vertical'].sapUiLoSplitterNoResize {
	width: 0.125rem !important;
	background-color: var(--sapPageHeader_BorderColor) !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.sapElisaResultPanel {
	width: 100%;
}

.sapUshellSearchResultContainer {
	left: 0;
	right: 0;
	margin: 0 auto;
	display: block;
	background-color: var(--sapList_HeaderBackground);

	.searchLayout-bucket {
		margin: 1.7rem 1rem 0.5rem 1rem;
	}

	/* TODO: refactoring initial column width */
	.sapElisa-search-result-table {

		tr td {
			/* max-width: 5rem; */
			/* word-break: break-all; */
			/* text-wrap: wrap; */

			span.sapMText,
			a.sapMLnk {
				vertical-align: middle;
				/* text-wrap: wrap; */
				/* text-overflow: ellipsis; */
				/* overflow: hidden; */
				/* overflow-wrap: break-word; */
				/* word-wrap: break-word; */
				/* word-break: break-all; */
				/* white-space: nowrap; */
				/* white-space-collapse: break-spaces; */
			}

			.sapUiIcon {
				vertical-align: text-bottom;
				/* font-size: 0.9rem !important; */
				/* line-height: 1rem !important; */
			}
		}

		b {
			font-weight: bold;
			background-color: var(--sapContent_SearchHighlightColor);
		}
	}

	/*
	* Section Begin
	* follwoing styling enables truncating in search result table.
	* sap_belize_base doesn't overwrite sap_base
	* It should be always manually synchronized between sap_base/Search.lss and sap_base/Search.less
	*/

	.sapElisa-search-result-table.sapElisa-search-result-table-resizable {

		div.sapMFlexItem:has(.sapUshellSearchText-nowrap) {
			/* text-wrap: nowrap; */
			/* white-space: nowrap; */
			/* text-overflow: ellipsis; */
			overflow: hidden;
		}
	}

	.sapElisa-search-result-table-might-popin {
		overflow-x: hidden;

		.sapMListTblSubCntHdr {

			.sapMLabelInner {
				width: auto;
			}
		}
	}

	/*
	* Section End
	*/
}

.sapUshellSearchTextIcon {
	vertical-align: text-bottom;
	margin-right: 0.125rem;
}

.sapUshellSearchFacetDialogValueHelp {
	min-width: 50rem;
}

.sapUshellSearchResultContainerValueHelp {
	background: transparent;
}

.sapUshellResultListMoreFooterContainer {
	padding-top: 0;

	@media @searchPhoneSize {
		padding: 0;
	}
}

.sapUshellResultListMoreFooter {
	margin: auto;
	width: auto;
	display: block;
	padding-top: 0;
	text-align: center;
}

.sapUshellResultApps .sapUshellResultListMoreFooter {
	padding-top: 0;
}

.sapUshellSearchResultListFooter {
	background-color: transparent !important;
	border: none !important;
}

.sapUshellSearchResultList-toggleMultiSelectionButton {

	@media @searchPhoneSize {
		display: none;
	}
}

.sapUshellSearchResultList-multiSelectionActionBar {
	display: inline-flex;
	display: inline-block;
}

.sapUshellSearchResultListItem-NotDraggableNotClickable {
	cursor: default;
}

.sapUshellSearchResultListItem-Clickable {
	cursor: pointer;
}

.sapUshellSearchResultListItem-TitleInfoIcon {
	color: var(--sapLinkColor);
	opacity: 0.5; /* icon currently does not react on 'click', remove when enabling title icon for 'press' */
}

.sapUshellSearchTableTitleInfoIcon {
	margin-left: 0.25rem;
	color: var(--sapLinkColor);
	opacity: 0.5; /* icon currently does not react on 'click', remove when enabling title icon for 'press' */
}

.sapUshellSearchTableTitleInfoIconDisabled {
	opacity: 0.5;
}

.sapUshellSearchGrid b {
	font-weight: bold;
	background-color: var(--sapContent_SearchHighlightColor);
}

.hidden {
	display: none !important;
}

.sapUshellSearchInputHelpPage {
	height: ~"calc(100%)";
}

@media @searchPhoneSize {

	/* special css of 'sapUiLoSplitterNoResize' causes some empty space at the right of the search result view */
	.sapUshellSearchInputHelpPage .sapUiLoSplitterContent[style*='width'][id$='-content-1'] {
		width: ~"calc(100%)" !important;
	}

	.sapUshellSearchInputHelpPage .sapUiLoSplitterBar.sapUiLoSplitterNoResize {
		display: none !important;
		width: 0 !important; /* not sure why this is needed, responsive splitter control (UI5) seems to have special logic, even for the case of "display:none" */
	}

	.sapUshellSearchInputHelpPage .sapUiLoSplitterV.sapUiLoSplitterBar.sapUiLoSplitterNoResize {
		display: none !important;
		width: 0 !important; /* not sure why this is needed, responsive splitter control (UI5) seems to have special logic, even for the case of "display:none" */
	}
}

/* =========== separate toolbars ===================== */
/* no bars */
.sapElisaSearchContainerCountBreadcrumbsValueHelp {
	margin-left: 0;
}

.sapElisaSearchSelectQuickSelectDataSourceValueHelp {
	display: flex;
	flex-direction: column;
}

.sapElisaSearchSelectionText {
	font-style: italic;
	padding-right: 0.25rem;
}

.sapElisaSearchCompositeControl.sapUiVlt {
	width: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.sapElisaSearchCompositeControl .sapUiVltCell.sapuiVltCell:has(> .sapUshellSearchLayout) {
	height: 0;
	flex: 1;
}

.sapElisaSearchCompositeControl {
	.SearchFieldGroup {
		max-width: 100%;

		> .sapMFlexBox {
			min-width: 0;
			max-width: 100%;

			> .sapMFlexItem {
				min-width: 0;
			}
		}
	}
}

.sapElisaSearchResultContainer {
	height: 100%;
	width: 100%;
	overflow: auto;

	tr[data-selection__row--disabled='true'] {
		pointer-events: none;
	}

	li[data-selection__row--disabled='true'] {
		pointer-events: none;
	}

	li[data-selection-enabled='false'] {

		.sapMCbMark {
			opacity: 0.3;
		}

		.sapMCb {
			pointer-events: none;

			.sapMCbBg::before {
				display: none;
			}
		}

		&.sapUiTableContentRow.sapUiTableRowSel {
			background-color: initial;
		}
	}

	li[data-selection-enabled-singleSelection='false'] {
		opacity: 0.5;
		pointer-events: none;
	}

	li[data-selection-enabled-singleSelection='false'] .sapUshellSearchLink {
		pointer-events: all;
	}

	li[data-selection-enabled-singleSelection='false'] .sapUshellSearchResultListItem-ExpandButtonContainer {
		pointer-events: all;
	}

	tr[data-selection-enabled='false'] {

		.sapMCbMark {
			opacity: 0.5;
		}

		.sapMCb {
			pointer-events: none;

			.sapMCbBg::before {
				display: none;
			}
		}

		&.sapMLIB.sapMLIBSelected {
			background-color: initial;
		}
	}

	tr[data-selection-enabled-singleSelection='false'] {
		opacity: 0.5;
		pointer-events: none;
	}

	tr[data-selection-enabled-singleSelection='false'] + tr.sapMListTblSubRow {
		opacity: 0.5;
		pointer-events: none;
	}

	tr[data-selection-enabled-singleSelection='false'] .sapUshellSearchLink {
		pointer-events: all;
	}

	div[data-selection-enabled-singleSelection='false'] {
		opacity: 0.5;
		pointer-events: none;
	}

	div[data-selection-enabled-singleSelection='false'] .sapUshellSearchLink {
		pointer-events: all;
	}

	td:has(.sapUshellSearchLink.sapUshellSearchLinkHyperlinkCentered, .sapUshellSearchLink.sapUshellSearchLinkButtonCentered) {
		text-align: center !important;
	}

	.sapUshellSearchLink.sapUshellSearchLinkButtonCentered {
		border-color: var(--sapButton_Lite_BorderColor);
		border-style: solid;
		border-width: 0.1rem;
		border-radius: var(--sapButton_BorderCornerRadius);
		width: 2rem;
		height: 1.125rem;
		padding-top: 0.2rem;
		padding-bottom: 0.2rem;

		span > {
			padding-left: 0.5rem;
			padding-right: 0.5rem;
		}

		&:hover {
			border-color: var(--sapButton_Hover_BorderColor);
			border-style: solid;
			border-width: 0.1rem;
			border-radius: var(--sapButton_BorderCornerRadius);
		}

		&:active {
			border-color: var(--sapButton_Active_BorderColor);
			border-style: solid;
			border-width: 0.1rem;
			border-radius: var(--sapButton_BorderCornerRadius);
		}
	}
}

.sapElisaSearchBasketPanelContent {
	height: 100%;
}

.sapElisaSearchBasketPanelContent div.sapUiVltCell:has(.sapElisaSearchBasketTable) {
	height: 85%;
}

.sapElisaSearchBasketTable {
	height: 85%;
}

html.sap-desktop .sapElisaSearchResultContainer .sapUshellSearchLinkHyperlinkCentered.sapMLnk:not(.sapMLnkDsbl):focus {
	background-color: transparent;

	> span {
		color: var(--sapInformationColor);
	}
}

html.sap-desktop .sapElisaSearchResultContainer .sapUshellSearchLinkButtonCentered.sapMLnk:not(.sapMLnkDsbl):focus {
	background-color: transparent;
	border-style: solid;
	border-width: 0.1rem;
	border-radius: var(--sapButton_BorderCornerRadius);

	> span {
		color: var(--sapInformationColor);
	}
}