/* =================================== */
/* CSS for control sap.tnt/ToolHeader  */
/* Evening Horizon theme               */
/* =================================== */

@_sap_tnt_ToolHeader_Height: 3.25rem;
@_sap_tnt_ToolHeader_IconHeight: 0.75rem;
@_sap_tnt_ToolHeader_DisabledOpacity: @sapUiContentDisabledOpacity;
@_sap_tnt_ToolHeader_ArrowHeight: 0.125rem;
@_sap_tnt_ToolHeader_ArrowMargin: 0 -0.25rem;
@_sap_tnt_ToolHeader_Padding: 0 0.75rem;
@_sap_tnt_ToolHeader_ArrowMarginBottom: 0.25rem;
@_sap_tnt_ToolHeader_IconTabHeader_Height: auto;

// ==========================================================================
// sap.m.Toolbar overriding
// ==========================================================================

.sapTntToolHeader:not(.sapUshellShellToolHeader) {
	&.sapMTB {
		background-color: @sapUiShellColor;
		padding: 0 1rem 0 0.875rem;
	}

	&.sapMTBStandard {
		border-bottom: none;
	}
}

.sapTntToolHeader {
	&.sapMIBar.sapMTB .sapMBarChild.sapMTBSeparator {
		background: none;
		width: 0.75rem;
	}
}

// ==========================================================================
// sap.m.Button overriding
// ==========================================================================

.sapTntToolHeader {
	.sapMBarChild:not(.sapMMenuBtn) {
		&.sapMBtn {
			.sapMBtnInner::after,
			.sapMBtnIcon {
				background: transparent;
				color: @sapUiShellInteractiveTextColor;
			}
			.sapMBtnContent {
				background: transparent;
				color: @sapUiShellTextColor;
			}

			&:not(.sapMBtnDisabled) > span.sapMBtnInner.sapMBtnActive {
				background: @sapUiShellActiveBackground;
				border-color: @sapUiShellActiveBackground;
			}
			.sapMToggleBtnPressed:not(.sapMBtnDisabled) {
				background-color: @sapUiShellHoverBackground;
				.sapMBtnIcon {
					color: @sapUiShellActiveTextColor;
				}
			}
			&:hover:not(.sapMBtnDisabled) {
				.sapMToggleBtnPressed:not(.sapMBtnActive), .sapMToggleBtnPressed:not(.sapMBtnDisabled):hover  {
					background-color: @sapUiShellHoverBackground;
					.sapMBtnIcon {
						color: @sapUiShellActiveTextColor;
					}
				}
				>span.sapMBtnInner.sapMBtnHoverable:not(.sapMToggleBtnPressed) {
					&:not(.sapMBtnActive) {
						background: @sapUiShellHoverBackground;
						border: 1px solid @sapUiButtonLiteHoverBorderColor;
					}
					&.sapMBtnActive {
						background: @sapUiShellActiveBackground;
						color: @sapUiShellActiveTextColor;
						border: 1px solid @sapUiButtonLiteActiveBorderColor;

							.sapMBtnContent bdi {
								color: @sapUiShellActiveTextColor;
							}
					}
					&.sapMBtnActive:after,
					&.sapMBtnActive >.sapMBtnIcon {
						color: @sapUiShellActiveTextColor;
					}
					&:after,
					>.sapMBtnIcon {
						color: @sapUiShellInteractiveTextColor;
					}
					>.sapMBtnContent,
					>.sapMBtnContent bdi
					{
						color: @sapUiShellTextColor;
					}
				}

				&:active {
					>.sapMBtnContent,
					>.sapMBtnInner,
					>.sapMBtnIcon {
						color: @sapUiShellTextColor;
					}
				}
			}
		}
	}
}

.sapUiSizeCompact {
	.sapTntToolHeader {
		.sapMBarChild:not(.sapMMenuBtn) {
			&.sapMBtn {
				padding: 0;
				min-width: 2rem;

				.sapMBadgeTopRight.sapMBadge .sapMBadgeIndicator {
					position: absolute;
					top: -0.3125rem;
					right: -0.4375rem;
					padding-right: 0.125rem;
				}

				.sapMBadgeTopRight.sapMBadge.sapMBtnIconFirst:not(.sapMBtnText) {
					padding: 0;
				}
			}

			&.sapMBtn .sapMBtnTransparent,
			&.sapMBtn .sapMBtnDefault,
			&.sapMBtn .sapMBtnBack,
			&.sapMBtn .sapMBtnUp {
				height: 2rem;

				.sapUiIcon {
					line-height: 2rem;
				}

				.sapMBtnContent {
					line-height: 2rem;
				}
			}
		}

		.sapMSF {
			padding: 0 0;
		}
	}
}

// ==========================================================================
// sap.m.Text, sap.m.Title and sap.m.Label overriding
// ==========================================================================

.sapTntToolHeader {
	.sapMTitle {
		text-shadow: none;
		line-height: 1.625rem;
		font-size: 1.125rem;
		font-weight: bold;
		color: var(--sapShell_TextColor);
	}

	.sapMText,
	.sapMLabel {
		line-height: @sapUiContentLineHeight;
		color: @sapUiContentLabelColor;
	}

	&.sapMIBar.sapMTB .sapMBarChild.sapMText,
	&.sapMIBar.sapMTB .sapMBarChild.sapMLabel {
		margin-top: 2px; // to align the text/label with the title
		margin-left: 0.5rem;
	}
}

.sapUiSizeCompact {
	.sapTntToolHeader {
		&.sapMIBar.sapMTB .sapMBarChild.sapMText,
		&.sapMIBar.sapMTB .sapMBarChild.sapMLabel {
			margin-top: 3px; // to align the text/label with the title
		}
	}
}

// ==========================================================================
// sap.m.SearchField overriding
// ==========================================================================

.sapTntToolHeader {

	.sapMSFF {
		background: @sapUiFieldBackgroundStyle;
		background-color: @sapUiShellInteractiveBackground;
		box-shadow: @sapUiFieldShadow;
		border: none;
		color: @sapUiShellInteractiveTextColor;
		border-radius: 1.125rem;
		height: 2.25rem;

		.sapMSFB {
			width: 1.75rem;
			height: 1.75rem;
			line-height: 1.75rem;
			font-size: 1rem;
			text-align: center;
			margin-top: 0.25rem;
			padding: 0;
			right: 0;
			top: 0;
			margin-right: 0.25rem;
		}

		.sapMSFB:hover {
			background: @sapUiShellHoverBackground;
			box-shadow: @sapUiButtonLiteHoverBorderColor;
			border-radius: 1.125rem;
			height: 1.75rem;
			color: @sapUiShellInteractiveTextColor;
		}

		.sapMSFR {
			margin-right: 0;
		}

		.sapMSFB:active,
		.sapMSFB.sapMSFBA {
			background: @sapUiShellActiveBackground;
			box-shadow: @sapUiContentSelectedShadow;
			border-radius: 1.125rem;
			color: @sapUiShellActiveTextColor;
		}
	}
}

.sapUiSizeCompact {
	.sapTntToolHeader {
		.sapMSF {
			height: 2rem;
		}

		.sapMSF .sapMSFF {
			height: 2rem;
		}

		.sapMSFB {
			margin-top: 0.125rem;
			width: 1.625rem;
			height: 1.625rem;
		}

		.sapMSFS {
			margin-right: 0.1875rem;
		}
	}
}

// ==========================================================================
// sap.m.IconTabHeader overriding
// ==========================================================================

.sapTntToolHeader {
	.sapUshellShellTabBar .sapMITH,
	.sapUshellShellTabBar.sapMITH {
		box-shadow: none;
	}
}

// ==========================================================================
// sap.m.Image overriding
// ==========================================================================

.sapTntToolHeader {
	.sapMImg {
		height: 1.625rem;
	}

	&.sapMIBar.sapMTB {
		.sapMBarChild.sapMImg:first-child,
		.sapMBarChild.sapMBtn + .sapMBarChild.sapMImg:first-of-type {
			margin-left: 0.5rem;
		}
	}

	.sapMImgFocusable:focus {
		outline: @sapUiContentFocusStyle @sapUiContentFocusWidth @sapUiContentFocusColor;
		outline-offset: 0.125rem;
		border-radius: 0.25rem;
	}
}