/* ========================================== */
/* CSS for control sap.uxap/ObjectPageLayout  */
/* Base theme                                 */
/* ========================================== */
@_sap_uxap_ObjectPageLayout_FooterHeight: 3rem;
@_sap_uxap_ObjectPageLayout_FooterHeight_Compact: 2.5rem;
@_sap_uxap_ObjectPageLayout_FooterMarginBottom: 0.5rem;

.sapUxAPObjectPageLayout {
	width: 100%;
	height: 100%;
	position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
	isolation: isolate;
	z-index: 0;
	white-space: normal; // BCP: 1780382804

	/* ObjectAttribute will not truncate inside ObjectPage but rather will go on more lines */
	.sapUxAPObjectPageHeaderDetails {
		.sapMObjectAttributeActive .sapMObjectAttributeTitle,
		.sapMObjectAttributeActive .sapMObjectAttributeText {
			display: inline;
			position: relative;
			white-space: pre-line;
			word-wrap: break-word;
		}
	}
}

.sapUxAPObjectPageLayoutFooterVisible .sapUxAPObjectPageWrapper {
	scroll-padding-bottom: ~"calc(@{_sap_uxap_ObjectPageLayout_FooterHeight} +  @{_sap_uxap_ObjectPageLayout_FooterMarginBottom} + 2px)";
}

.sapUiSizeCompact .sapUxAPObjectPageLayoutFooterVisible .sapUxAPObjectPageWrapper {
	scroll-padding-bottom: ~"calc(@{_sap_uxap_ObjectPageLayout_FooterHeight_Compact} +  @{_sap_uxap_ObjectPageLayout_FooterMarginBottom} + 2px)";
}

body > .sapUxAPObjectPageLayout,
.sapUiVltCell .sapUxAPObjectPageLayout {
	position: fixed;
}

.sapUxAPObjectPageHeaderTitle {
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
}

.sapUxAPObjectPageLayoutTitleClickEnabled > .sapUxAPObjectPageHeaderStickied > .sapFDynamicPageTitle {
	box-shadow: @sapUiShadowHeader;
}

.sapUxAPObjectPageLayout:not(.sapUxAPObjectPageLayoutTitleClickEnabled) .sapFDynamicPageHeaderPinButton {
	margin-left: -1.25rem;
}

.sapUxAPObjectPageSubSectionPromoted:not(:first-of-type) {
	padding-top: 0.25rem;
}

.sapUxAPObjectPageWrapper {
    position:relative;
    height:100%;
    -webkit-flex-grow: 1;
    flex-grow: 1;
	overflow-y: auto;
	background-color: @sapUiGlobalBackgroundColor;
}

.sapUxAPObjectPageWrapperWillChangeScrollTop {
	/* Performance tweak */
	will-change: scroll-position;
}

.sapUxAPObjectPageScroll {
	position: relative;
}

.sapUxAPObjectPageContainerNoBar > .sapUxAPObjectPageSection:first-child:not(.sapUxAPObjectPageSectionNoTitle) {
	margin-top:  2rem;
}

/****
    sapUxAPObjectPageScroll copied from sapMScroll for now
****/

.sapUxAPObjectPageScrollV,
.sapUxAPObjectPageScrollH,
.sapUxAPObjectPageScrollV > div, .sapUxAPObjectPageScrollH > div {
	position: absolute;
}

.sapUxAPObjectPageScrollV > div, .sapUxAPObjectPageScrollH > div {
	box-sizing: border-box;
	-webkit-background-clip: padding-box;
	background-clip: padding-box;
	border-width: 0.0625rem;
	border-style: solid;
	border-color: rgba(255, 255, 255, 0.901961);
	border-radius: 0.1875rem;
	background-color: rgba(0, 0, 0, 0.498039)
}

.sapUxAPObjectPageScrollV {
	width: 0.438rem;
	right: 0.063rem;
	top: 0;
	bottom: 0
}

.sapUxAPObjectPageScrollV > div {
	width: 100%
}

.sapUxAPObjectPageScrollH {
	height: 0.4375rem;
	bottom: 0.0625rem;
	left: 0.125rem;
	right: 0.125rem
}

.sapUxAPObjectPageScrollH > div {
	height: 100%
}

.sapUxAPObjectChildPage {
	width: 0.5rem;
	height: 100%;
	position: absolute;
	left: 0;
	right: auto;
	z-index: 3000;
	background: @sapUiObjectHeaderBorderColor;
}

.sapUxAPObjectPageLayout.sapUxAPObjectPageLayoutTitleClickEnabled {
	// title hover
	.sapFDynamicPageTitle:hover,
	&.sapUxAPObjectPageTitleForceHovered .sapFDynamicPageTitle {
		cursor: pointer;
	}
}

// anchorBar
.sapUxAPObjectPageLayoutTitleClickEnabled .sapUxAPObjectPageNavigation .sapMITH,
.sapUxAPObjectPageLayoutHeaderPinnable .sapUxAPObjectPageNavigation .sapMITH {
	margin-top: 0.8125rem;
}

.sapUiSizeCompact {
	.sapUxAPObjectPageLayoutTitleClickEnabled .sapUxAPObjectPageNavigation .sapMITH,
	.sapUxAPObjectPageLayoutHeaderPinnable .sapUxAPObjectPageNavigation .sapMITH {
		margin-top: 0.5rem;
	}
}

// footer
.sapUxAPObjectPageLayout {
	.sapUxAPObjectPageFooter {
		position: absolute;
		height: @_sap_uxap_ObjectPageLayout_FooterHeight;
		bottom: 0;
		right: 0;
		left: 0;
		margin-left: 0.5rem;
		margin-right: 0.5rem;
		margin-bottom: @_sap_uxap_ObjectPageLayout_FooterMarginBottom;
		z-index:1001;

		.sapUxAPObjectPageFloatingFooter {
			border: 1px solid;
			border-radius: 0.25rem;
		}
	}
}

.sapUiSizeCompact .sapUxAPObjectPageLayout .sapUxAPObjectPageFooter {
	.sapUxAPObjectPageFloatingFooter {
		height: @_sap_uxap_ObjectPageLayout_FooterHeight_Compact;

		// Reflection: styles overwritten
		&.sapMBar-CTX {
			// BCP: 1870106645
			// When sap.m.Bar is used as footer (in compact) setting 2.5rem height
			// breaks the Bar`s content vertical alignment.
			// Fixing this internally in the sap.m.Bar (in the context of flaoting footer)
			// will require significant effort, so we set height of 2rem (the expected Bar height by the visual spec).
			height: 2rem;
		}
	}
	height: 2.5rem;
}

html[data-sap-ui-animation='on'] .sapUxAPObjectPageLayout {
	.sapUxAPObjectPageFloatingFooterShow {
		-webkit-animation: bounceShow 0.35s forwards ease-in-out;
		animation: bounceShow 0.35s forwards ease-in-out;
	}
	.sapUxAPObjectPageFloatingFooterHide {
		-webkit-animation: bounceHide 0.35s forwards ease-in-out;
		animation: bounceHide 0.35s forwards ease-in-out;
	}

	@-webkit-keyframes bounceShow {
		0% {
			-webkit-transform: translateY(100%);
			transform: translateY(100%);
			opacity: 0;
		}
		100% {
			opacity: 1;
		}
	}
	@keyframes bounceShow {
		0% {
			transform: translateY(100%);
			opacity: 0;
		}
		100% {
			opacity: 1;
		}
	}
	@-webkit-keyframes bounceHide {
		0% {
			-webkit-transform: translateY(-5%);
			transform: translateY(-5%);
			opacity: 1;
		}
		100% {
			-webkit-transform: translateY(100%);
			transform: translateY(100%);
			opacity: 0;
		}
	}
	@keyframes bounceHide {
		0% {
			transform: translateY(-5%);
			opacity: 1;
		}
		100% {
			transform: translateY(100%);
			opacity: 0;
		}
	}
}
/* Only on Windows 8 with IE 11 there's some weird incompatibility between the usage of the transform property
 in the sapMShell and the one in the objectPageWrapper.
 Also the z-index causes the scroll bars of the table to show in the headerTitle.
 For more information see internal incident 1670194272. */
 /* TODO remove after the end of support for Internet Explorer */
html[data-sap-ui-browser^="ie"] .sapMShell {

  .sapUxAPObjectPageHeaderTitle {
    z-index: 3;
  }
}

.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
	content: "";
	display: table;
}

.ui-helper-clearfix:after {
	clear: both;
}

.ui-helper-clearfix {
	zoom: 1;
}
