/* ==================================== */
/* CSS for sap.ui.table/HeaderSelector  */
/* Base theme                           */
/* ==================================== */

.sapUiTableHeaderSelector {
	&.sapUiTableHeaderSelectorDisabled > * {
		opacity: var(--sapContent_DisabledOpacity);
		pointer-events: none;
	}

	&:not(.sapUiTableHeaderSelectorDisabled) {
		cursor: pointer;

		> * {
			cursor: pointer;
		}
	}

	> .sapUiTableCheckBox {
		height: 100%;
		width: 100%;

		&::after {
			/* The checkbox should always be at the bottom if a custom column header height is specified, or the table has multiple header rows */
			top: auto;
			bottom: calc(~"(" @_sap_ui_table_ColumnHeaderHeight ~"-" @_sap_ui_table_CheckBox_Size ~") / 2");

			.sapUiSizeCozy & {
				bottom: calc(~"(" @_sap_ui_table_ColumnHeaderHeightCozy ~"-" @_sap_ui_table_CheckBox_SizeCozy ~") / 2");
			}
		}
	}

	.sapUiTableHeaderSelectorIcon {
		width: 100%;
		height: 100%;

		&::before {
			display: block !important; /* otherwise will be overwritten by icon css rules in RTL */
			position: absolute;
			width: 100%;
			font-size: 1rem;
			line-height: @_sap_ui_table_CheckBox_SizeCozy;
			bottom: calc(~"(" @_sap_ui_table_ColumnHeaderHeight ~"-" @_sap_ui_table_CheckBox_SizeCozy ~") / 2");

			.sapUiSizeCozy & {
				bottom: calc(~"(" @_sap_ui_table_ColumnHeaderHeightCozy ~"-" @_sap_ui_table_CheckBox_SizeCozy ~") / 2");
			}

			.sapUiTableRowHighlights.sapUiTableRowSelectors & {
				padding: 0 calc(~"(" @_sap_ui_table_RowHighlightWidth ~") / 2");
			}
		}

		&:active {
			background-color: var(--sapList_Active_Background);
			color: var(--sapList_Active_TextColor);
		}
	}
}