/// Base tables styles and simple utility classes.
/// @access private
@mixin _oTableBase() {
	.o-table {
		border-collapse: collapse;
		border-spacing: 0;
		margin: 0;
		width: 100%;

		thead {
			border-bottom: 2px solid _oTableGet('table-data-color');
		}

		th,
		td {
			@include oPrivateTypographySans(1);
			padding: 10px;
			text-align: left;
			vertical-align: top;
			color: _oTableGet('table-data-color');
			min-width: 3ch; // helps prevent some layout updates
			box-sizing: border-box;
		}

		th {
			@include oPrivateTypographySans($weight: 'semibold');
			background-color: _oTableGet('header-background');
			&:not([scope='row']) {
				vertical-align: bottom;
			}
		}

		td {
			scroll-snap-align: none center;
			&:empty:before {
				@include oPrivateIconsContent('minus', $size: 15);
				content: '';
				vertical-align: middle;
			}
		}

		.o-table__caption {
			text-align: left;
			box-sizing: border-box;
			margin: 0;
			padding: 0 10px;
			width: 100%;
		}

		.o-table__cell--numeric {
			text-align: right;
			font-feature-settings: 'tnum' 1;
		}

		.o-table__cell--content-secondary {
			@include oPrivateTypographySans(0);
			font-weight: normal;
		}

		.o-table__cell--vertically-center {
			vertical-align: middle;
		}
	}

	.o-table .o-table-footnote,
	.o-table-footnote {
		@include oPrivateTypographyCaption();
	}

	.o-table-container > .o-table-footnote {
		margin-left: 10px;
	}

	// Hide any filtered or hidden rows.
	// `visibility: hidden` ensures children can't be tabbed to.
	// `display: none` is not used as o-table relies on row being rendered to get their height.
	// `visibility: collaposed` is not used due to inconsistent browser support.
	tr[aria-hidden='true'],
	tr[data-o-table-filtered='true'] {
		visibility: hidden;
	}
}
