/* Awards Table block ------------------------------------------------
   CSS Grid instead of a <table> element, so this never inherits the
   generic gray zebra-striped <table> styling that genesis-block-theme
   applies to real <table> elements site-wide. ARIA table roles keep it
   announced/navigable as a table for assistive tech even though the
   markup is all divs/spans. */

.awards-table-block {
	width: 100%;
}

.awards-table {
	display: grid;
	/* 1st/3rd columns (medal, year) size to their content; the middle
	   column (competition/publication) absorbs whatever space is left. */
	grid-template-columns: auto 1fr auto;
	width: 100%;
}

/* Row wrappers stay in the DOM (for role="row") but don't participate
   in the box layout - their children drop straight into the grid's
   column tracks and wrap onto a new visual row automatically. */
.awards-table__row {
	display: contents;
}

/* Spacing between columns comes from cell padding, not a grid gap -
   a gap would leave a visible break in each cell's border-bottom,
   so the gold header rule wouldn't read as one continuous line. */
.awards-table__cell {
	display: block;
	padding: 2px 24px 2px 0;
	color: #000;
}

.awards-table__cell--header {
	color: #AA8955;
	font-weight: 600;
	padding: 0 24px 12px 0;
	border-bottom: 2px solid #AA8955;
}

/* Match the gap below the gold line to the gap above it (header title
   to line), by giving just the first content row's top padding the
   same value as the header's bottom padding. */
.awards-table__row--header + .awards-table__row .awards-table__cell {
	padding-top: 12px;
}

.awards-table__cell:nth-child(3n + 1) {
	font-weight: 700;
}

.awards-table__cell:nth-child(3n) {
	/*text-align: right;*/
	padding-right: 0;
	font-weight: 700;
}

.awards-table__row--header .awards-table__cell:nth-child(3n + 1),
.awards-table__row--header .awards-table__cell:nth-child(3n) {
	font-weight: 600; /* header row shouldn't pick up the row-label/year bold treatment */
}

.awards-table-placeholder {
	color: #999;
	font-style: italic;
	font-weight: 400 !important;
}

/* Stacked layout on small screens so the grid doesn't get crushed
   inside a narrow Columns block on mobile. */
@media (max-width: 600px) {
	.awards-table {
		grid-template-columns: 1fr;
	}

	.awards-table__row--header,
	.awards-table__row--header .awards-table__cell {
		display: none;
	}

	.awards-table__row {
		display: block;
		padding: 8px 0;
		border-bottom: 1px solid #e5e5e5;
	}

	.awards-table__row:last-child {
		border-bottom: none;
	}

	.awards-table__cell {
		display: block;
		border-bottom: none;
		padding: 2px 0;
		text-align: left !important;
	}

	.awards-table__cell::before {
		content: attr(data-label) ": ";
		font-weight: 600;
		color: #AA8955;
	}
}

