/* Props-table fix 2026-09-10
   Does not touch style.min.css.
   Rollback: set POLEMA_PROPS_TABLE_FIX to false in local/php_interface/init.php
   or restore local/_rollback_props_table_20260910/init.php.bak
*/

.props-table {
	overflow-x: auto;
	max-width: 100%;
}

/* 4+ columns: chem / matrix tables. Leave 2-col spec tables alone. */
.props-table table:has(> tbody > tr > td:nth-child(4)),
.props-table table:has(> tbody > tr > th:nth-child(4)) {
	table-layout: auto;
	min-width: 36em;
}

.props-table table:has(> tbody > tr > td:nth-child(4)) td:first-child,
.props-table table:has(> tbody > tr > td:nth-child(4)) th:first-child,
.props-table table:has(> tbody > tr > th:nth-child(4)) td:first-child,
.props-table table:has(> tbody > tr > th:nth-child(4)) th:first-child {
	width: auto;
	padding-left: 0.75em;
	padding-right: 0.5em;
}

.props-table table:has(> tbody > tr > td:nth-child(4)) td:nth-child(2) ~ td,
.props-table table:has(> tbody > tr > th:nth-child(4)) td:nth-child(2) ~ td {
	width: auto;
}

.props-table table:has(> tbody > tr > td:nth-child(4)) td,
.props-table table:has(> tbody > tr > td:nth-child(4)) th,
.props-table table:has(> tbody > tr > th:nth-child(4)) td,
.props-table table:has(> tbody > tr > th:nth-child(4)) th {
	padding-left: 0.4em;
	padding-right: 0.4em;
	vertical-align: middle;
	white-space: normal;
	word-break: keep-all;
	overflow-wrap: normal;
	text-align: center;
	/* Current product pages use a white background. */
	color: #111;
	background-color: transparent;
}

.props-table table:has(> tbody > tr > td:nth-child(4)) td[colspan],
.props-table table:has(> tbody > tr > th:nth-child(4)) td[colspan] {
	white-space: normal;
	overflow-wrap: anywhere;
}

/*
  Keep mint zebra, but ALWAYS dark text on it.
  Previous bug: white text + mint/#fff look = unreadable.
*/
.props-table table:has(> tbody > tr > td:nth-child(4)) tr:nth-child(even) td,
.props-table table:has(> tbody > tr > th:nth-child(4)) tr:nth-child(even) td {
	background-color: #60ba97 !important;
	color: #111 !important;
}

.props-table table:has(> tbody > tr > td:nth-child(4)) tr:first-child td,
.props-table table:has(> tbody > tr > th:nth-child(4)) tr:first-child td,
.props-table table:has(> tbody > tr > td:nth-child(4)) tr:first-child th,
.props-table table:has(> tbody > tr > th:nth-child(4)) tr:first-child th {
	background-color: #006eb7 !important;
	color: #fff !important;
	font-weight: 600;
}

/* Simple 2-col tables: mint zebra must not get white text from anywhere */
.props-table tr:nth-child(even) td {
	color: #111;
}

@media screen and (max-width: 992px) {
	.props-table table:has(> tbody > tr > td:nth-child(4)),
	.props-table table:has(> tbody > tr > th:nth-child(4)) {
		min-width: 48em;
	}
}
