/**
 * Global content tables – minimalist, content-first.
 */

.entry-content .wp-block-table {
	width: 100%;
	max-width: 100%;
	margin-block: var(--rietavomvvg-spacing);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.entry-content > table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-block: var(--rietavomvvg-spacing);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--rietavomvvg-color-text);
	background: transparent;
	border: 0;
}

.entry-content table :is(th, td) {
	padding: 0.875rem 1rem;
	text-align: left;
	vertical-align: top;
	border: 0;
	border-bottom: 1px solid var(--rietavomvvg-color-border);
}

.entry-content table thead th,
.entry-content table:not(:has(thead)) > tbody > tr:first-child > :is(th, td) {
	background: color-mix(in srgb, var(--rietavomvvg-color-primary-light) 72%, var(--rietavomvvg-color-surface));
	color: var(--rietavomvvg-color-primary);
	font-weight: 600;
	border-bottom-color: color-mix(in srgb, var(--rietavomvvg-color-border) 85%, var(--rietavomvvg-color-primary) 15%);
}

.entry-content table tbody tr {
	background: transparent;
	transition: background-color 0.15s ease;
}

.entry-content table tbody tr:nth-child(even) {
	background: color-mix(in srgb, var(--rietavomvvg-color-surface) 55%, transparent);
}

.entry-content table:not(:has(thead)) > tbody > tr:first-child {
	background: transparent;
}

.entry-content table:not(:has(thead)) > tbody > tr:first-child > :is(th, td) {
	background: color-mix(in srgb, var(--rietavomvvg-color-primary-light) 72%, var(--rietavomvvg-color-surface));
}

.entry-content table:not(:has(thead)) > tbody > tr:first-child ~ tr:nth-child(even) {
	background: color-mix(in srgb, var(--rietavomvvg-color-surface) 55%, transparent);
}

.entry-content table:not(:has(thead)) > tbody > tr:first-child ~ tr:nth-child(odd) {
	background: transparent;
}

.entry-content table tbody tr:last-child :is(th, td) {
	border-bottom: 0;
}

.entry-content table tbody tr:hover {
	background: color-mix(in srgb, var(--rietavomvvg-color-primary-light) 28%, transparent);
}

.entry-content table thead th:hover,
.entry-content table:not(:has(thead)) > tbody > tr:first-child > :is(th, td):hover {
	background: color-mix(in srgb, var(--rietavomvvg-color-primary-light) 72%, var(--rietavomvvg-color-surface));
}

@media (max-width: 63.99rem) {
	.entry-content table {
		min-width: 36rem;
	}

	.entry-content > table > :is(thead, tbody, tfoot) {
		display: table;
		width: 100%;
		min-width: 36rem;
		table-layout: auto;
		border-collapse: collapse;
	}
}
