/**
 * Extral Tables — frontend (shortcode output only).
 */

.extral-table-wrap,
.extral-tables-wrapper {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.5rem 0;
	border-radius: 4px;
}

.extral-table-wrap.extral-table-wrap--scroll,
.extral-table-wrap.extral-tables-wrapper {
	overflow: hidden;
	overflow-x: auto;
}

.extral-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 720px;
	font-size: 0.95rem;
	line-height: 1.45;
	color: #303943;
	background: #fff;
}

.extral-table th,
.extral-table td {
	padding: 16px 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	vertical-align: middle;
	line-height: 1.45;
}

.extral-table th {
	text-align: left;
}

.extral-table td {
	text-align: left;
}

/* Explicit alignment (after base th/td; higher specificity than .extral-table th alone) */

.extral-table thead {
	border-top: 1px solid rgba(149, 193, 31, 0.35);
}

.extral-table thead th,
.extral-table .extral-table__head-cell {
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #303943;
	background: #eef1e8;
	border-top: 1px solid rgba(149, 193, 31, 0.45);
	border-bottom: 2px solid rgba(149, 193, 31, 0.75);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.extral-table .extral-table__caption,
.extral-table__caption {
	caption-side: top;
	text-align: center;
	font-weight: 700;
	padding: 0.75rem 1rem;
	margin-bottom: 0.75rem;
	color: #303943;
}

.extral-table__head-cell {
	text-align: left;
}

.extral-table__cell--number,
.extral-table__cell--date {
	text-align: right;
}

.extral-table__cell--empty {
	text-align: center;
}

.extral-table__cell--text {
	text-align: left;
}

.extral-table td.extral-table__cell--align-right,
.extral-table th.extral-table__head-cell--align-right {
	text-align: right;
}

.extral-table td.extral-table__cell--align-center,
.extral-table th.extral-table__head-cell--align-center {
	text-align: center;
}

.extral-table td.extral-table__cell--align-left,
.extral-table th.extral-table__head-cell--align-left {
	text-align: left;
}

/* First column — group / alloy label */
.extral-table tbody td:first-child {
	font-weight: 500;
	letter-spacing: 0.01em;
}

.extral-table-notes {
	font-size: 0.9rem;
	margin-top: 0.75rem;
	color: #50575e;
}

.extral-table-error {
	padding: 1rem;
	border: 1px solid #cc0000;
}

.extral-table__file-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	text-decoration: none;
	font-weight: 500;
	color: inherit;
}

.extral-table__file-link:hover,
.extral-table__file-link:focus {
	color: #95c11f;
	text-decoration: underline;
}

.extral-table__file-link::after {
	content: "";
	display: inline-block;
	width: 0.95em;
	height: 0.95em;
	flex: 0 0 auto;
	background-color: #95c11f;
	opacity: 0.85;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 2v8M8 10l3-3M8 10L5 7' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3 12h10' stroke='black' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 2v8M8 10l3-3M8 10L5 7' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3 12h10' stroke='black' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.extral-table__file-link:hover::after,
.extral-table__file-link:focus::after {
	opacity: 1;
}

.extral-table td[rowspan],
.extral-table tbody td.extral-table__cell--rowspan-anchor {
	vertical-align: middle;
	font-weight: 500;
}

/* Rowspan group backgrounds — CSS variable on tr + data-attribute fallbacks (!important required vs theme) */
.extral-tables-wrapper table.extral-table tbody tr.extral-table__row--span-group > td,
.extral-table-wrap.extral-tables-wrapper table.extral-table tbody tr.extral-table__row--span-group > td,
table.extral-table.extral-table--has-span-groups tbody tr.extral-table__row--span-group > td {
	background: var(--extral-span-group-bg, transparent) !important;
}

.extral-tables-wrapper table.extral-table tbody tr[data-extral-span-group="1"] > td,
.extral-tables-wrapper table.extral-table tbody tr.extral-table__row--span-group-odd > td {
	background: #f7faef !important;
}

.extral-tables-wrapper table.extral-table tbody tr[data-extral-span-group="2"] > td,
.extral-tables-wrapper table.extral-table tbody tr.extral-table__row--span-group-even > td {
	background: #f8f8f8 !important;
}

.extral-tables-wrapper table.extral-table tbody tr[data-extral-span-group="3"] > td {
	background: #f7faef !important;
}

.extral-tables-wrapper table.extral-table tbody tr[data-extral-span-group="4"] > td {
	background: #f8f8f8 !important;
}

.extral-tables-wrapper table.extral-table tbody td.extral-table__cell--rowspan-anchor {
	background: inherit !important;
	vertical-align: middle;
	font-weight: 500;
}

.extral-tables-wrapper table.extral-table tbody tr.extral-table__row--span-group:hover > td {
	background: rgba(149, 193, 31, 0.08) !important;
}
