.hee-table-wrap {
	max-width: 100%;
}

.hee-table-wrap--scroll {
	overflow-x: auto;
}

.hee-table {
	border-collapse: collapse;
	width: 100%;
	--hee-stripe-color: rgba(0, 0, 0, .04);
	--hee-row-hover-color: rgba(0, 0, 0, .07);
	/*
	 * The header's text transform, mirrored onto the table so the mobile card
	 * labels can use it. The header row is hidden in cards layout, and those
	 * labels *are* the header text, so without this they follow the cell transform
	 * instead and the client's header styling appears to be ignored on phones.
	 */
	--hee-header-transform: none;
}

.hee-table caption {
	caption-side: top;
	font-weight: 600;
	margin-bottom: .75rem;
	text-align: left;
}

.hee-table th,
.hee-table td {
	border: 1px solid currentColor;
	padding: .75rem 1rem;
	text-align: left;
	vertical-align: middle;
}

/*
 * Cells are plain text now, so a line break typed in the field is the only way
 * an editor splits a cell. `pre-line` honours it while still collapsing the
 * incidental whitespace around the value itself.
 */
.hee-table td {
	white-space: pre-line;
}

.hee-table--striped tbody tr:nth-child( even ) {
	background-color: var( --hee-stripe-color );
}

.hee-table--row-hover tbody tr:hover {
	background-color: var( --hee-row-hover-color );
}

@media (max-width: 767px) {
	.hee-table-wrap--scroll .hee-table {
		min-width: 640px;
	}

	.hee-table--cards,
	.hee-table--cards tbody,
	.hee-table--cards tr,
	.hee-table--cards td {
		display: block;
		width: 100%;
	}

	.hee-table--cards thead {
		border: 0;
		clip: rect(0 0 0 0);
		height: 1px;
		margin: -1px;
		overflow: hidden;
		padding: 0;
		position: absolute;
		width: 1px;
	}

	.hee-table--cards tr {
		border: 1px solid currentColor;
		margin-bottom: 1rem;
	}

	.hee-table--cards td {
		border: 0;
		border-bottom: 1px solid currentColor;
		display: grid;
		gap: 1rem;
		grid-template-columns: minmax(7rem, 40%) 1fr;
	}

	.hee-table--cards td:last-child {
		border-bottom: 0;
	}

	.hee-table--cards td::before {
		content: attr( data-label );
		font-weight: 700;
		text-transform: var( --hee-header-transform );
	}
}
