/* core/table — case-study tables on a dark panel (Powy "The results", INDIGO).
   Two block styles share one look:
     is-style-dark-matrix       — header row + first column are labels, data cells lead.
     is-style-before-after-dark — every column is muted except the LAST one ("after").
   Colours are DS semantic tokens, so they resolve correctly inside a dark group
   (ndsTheme: dark). Bold text in a cell is the display-numeral emphasis ("Days").
   Enqueued from render_block only when a table carries one of the two styles. */

.wp-block-table.is-style-dark-matrix,
.wp-block-table.is-style-before-after-dark {
	margin: 0;
	overflow-x: auto;
	border: 1px solid var(--c-line-2, #363F47);
	border-radius: var(--radius-xxl, 24px);
}

.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-family: var(--font-body, "Lexend", sans-serif);
	font-size: var(--wp--preset--font-size--body-medium, 16px);
	font-weight: 300;
	line-height: 1.4;
}

.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) thead {
	border: 0;
}

.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) :is(th, td) {
	padding: var(--wp--preset--spacing--xl, 20px) var(--wp--preset--spacing--xxl, 24px);
	border: 0;
	text-align: left;
	vertical-align: top;
	color: var(--c-ink, #F5FAFF);
}

.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) th {
	background: var(--c-surface-4, rgba(255, 255, 255, 0.05));
	font-family: var(--font-display, "Manrope", sans-serif);
	font-size: var(--wp--preset--font-size--h-5, 22px);
	font-weight: 400;
}

.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) tbody tr {
	transition: background-color 0.2s ease;
}

.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) tbody tr:hover {
	background-color: var(--c-surface-4, rgba(255, 255, 255, 0.05));
}

.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) tbody td {
	border-top: 1px solid var(--c-line-2, #363F47);
}

/* A table with no header row: the first body row needs no rule above it. */
.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) table > tbody:first-child tr:first-child td {
	border-top: 0;
}

/* Matrix: the first column holds the row labels. */
.wp-block-table.is-style-dark-matrix tbody td:first-child {
	color: var(--c-ink-2, #A7B1C1);
}

/* Before / after: everything but the last column is the muted "before". */
.wp-block-table.is-style-before-after-dark :is(th, td):not(:last-child) {
	color: var(--c-ink-2, #A7B1C1);
}

/* Emphasis: bold in a cell becomes a light display numeral in brand ink. */
.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) td strong {
	font-family: var(--font-display, "Manrope", sans-serif);
	font-size: var(--wp--preset--font-size--h-5, 22px);
	font-weight: 300;
	color: var(--c-ink-brand, #50A4FA);
}

@media (max-width: 640px) {
	.wp-block-table:is(.is-style-dark-matrix, .is-style-before-after-dark) table {
		min-width: 560px;
	}
}
