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

.sapMPanel {
	overflow: hidden;
	box-sizing: border-box;
	// The following needed for calculation of height for content child
	position: relative;
}

.sapMPanelHdr {
	box-sizing: border-box;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: none;
	height: 3rem;
	line-height: 3rem;
	margin: 0;

	/*
	* To improve readability Mobile Safari automatically increases
	* the size of small text so let's disable this
	*/
	-webkit-text-size-adjust: none;

	font-weight: @sapUiFontHeaderWeight;
	font-size: @sapUiGroupTitleFontSize;
	font-family: @sapUiFontHeaderFamily;
	color: @sapUiGroupTitleTextColor;
}

.sapMPanel {
	.sapMPanelHdr,
	.sapMTB.sapMPanelHeaderTB {
		padding-left: 1rem;
		padding-right: 0.5rem;
	}

	&.sapMPanelExpandable {
		.sapMPanelHdr, .sapMTB.sapMPanelHeaderTB {
			padding-left: 0;
		}
	}
}

.sapUiSizeCompact .sapMPanel .sapMPanelHdr {
	line-height: 2rem;
	height: 2rem;
}

.sapMPanelContent {
	padding: 0.625rem 1rem 1.375rem 1rem;
	box-sizing: border-box;
	overflow: auto;
	white-space: normal;

	/* This is needed in order to remove the additional outline added by tabindex=-1*/
	&:focus {
		outline: none;
	}
}

.sapMPanelExpandablePart {
	clear: both;
}

.sapMPanelWrappingDiv,
.sapMPanelWrappingDivTb {
	position: relative;
	background-color: @sapUiGroupTitleBackground;

	> .sapMBtn {
		position: absolute;
		top: 50%;
		-webkit-transform: translateY(-50%);
		transform: translateY(-50%);
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}
}

.sapMPanelWrappingDiv .sapUiIcon {
	position: absolute;
	top: 50%;
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
	padding: 0.25rem;
	font-size: 1rem;
	cursor: inherit;
	color: @sapUiContentIconColor;
}

/* if Panel is expandable, we do not wish toolbar to come with own border */
.sapMPanelWrappingDivTb > .sapMTB {
	border-width: 0;
}

.sapMPanelWrappingDiv.sapMPanelWrappingDivExpanded {
	border-bottom-width: 0;
}

.sapMPanelWrappingDivTb.sapMPanelWrappingDivTbExpanded {
	border-bottom-width: 0;
}

html.sap-tablet .sapUiFioriObjectPage > section > .sapMPanel,
html.sap-desktop .sapUiFioriObjectPage > section > .sapMPanel {
	margin: 1rem 0;
	padding: 0 1rem;
	box-sizing: border-box;
}

.sapMPanel .sapMPanelWrappingDiv .sapMPanelHdr,
.sapMPanel .sapMPanelWrappingDivTb .sapMIBar.sapMTB {
	margin-left: 2.5rem;

  	>:first-child {
	  margin-left: 0;
	}
}

/* mixin call for creating container content padding classes (arguments: rootContainer, contentSelector) */
.sapUiContainerContentPadding(~".sapMPanel", ~"> .sapMPanelContent");


.sapMPanelExpandable .sapMPanelWrappingDiv {
	&:focus {
		outline: @sapUiContentFocusWidth @sapUiContentFocusStyle @sapUiContentFocusColor;
		outline-offset: -0.1875rem;
	}

	&:hover {
		cursor: pointer;
	}
}