/**
 * Staff directory (block version of the old [utrf_staff] shortcode).
 *
 * Reproduces the shortcode's look: a centred group heading, a light-grey panel, and 240px
 * centred cards that wrap. Scoped to .utrf-staff-group so it touches nothing else.
 *
 * @package    UTRF_Extensions
 * @subpackage Assets
 * @category   Stylesheet
 * @author     David W. Couch <http://wadellc.co>
 * @version    1.0.0
 * @since      0.90
 */

h2.staff_type {
	margin-block: 0 20px;
	text-align: center;
	text-transform: capitalize;
}

.utrf-staff-group {
	background-color: #f5f5f5;
	margin-block-end: 18px;
	padding: 10px 0 30px;
	text-align: center;

	.utrf-staff-group__list {
		display: flex;
		flex-wrap: wrap;
		column-gap: 5px; /* the shortcode's inline-block cards had a ~5px whitespace gap between them */
		justify-content: center;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	/* Genesis puts .entry on every post item and clears it with a table-display ::before, which adds a 24px strip above the headshot. */
	.wp-block-post::before,
	.wp-block-post::after {
		display: none;
	}

	.wp-block-post {
		box-sizing: border-box;
		flex: 0 1 240px;
		list-style: none; /* the theme gives list items a disc */
		margin: 5px 10px 25px;
		max-inline-size: 240px;
		min-block-size: 400px;
		padding: 5px;
		text-align: center;
	}

	.utrf-bio__pic {
		margin: 0;

		a {
			border: 0;
			display: inline;
		}

		img {
			block-size: auto;
			display: inline;
			margin: 5px auto;
			max-inline-size: 100%;
			vertical-align: baseline; /* core sets bottom; the shortcode's image sat on the baseline */
		}
	}

	.utrf-bio__name {
		font-size: 2rem;
		letter-spacing: -1px;
		line-height: inherit;
		margin: 0;
	}

	.utrf-bio__job-title,
	.utrf-bio__job-scope,
	.utrf-bio__phone,
	.utrf-bio__email {
		color: #232525;
		font-family: Poppins, sans-serif;
		font-size: 14px;
		line-height: inherit;
		margin: 0;
	}

	.utrf-bio__job-title {
		font-weight: bold;
	}

	/* A bound paragraph is empty when the field has no value. */
	.utrf-bio__job-title:empty,
	.utrf-bio__job-scope:empty,
	.utrf-bio__phone:empty,
	.utrf-bio__email:empty {
		display: none;
	}
}

/* Accounting-Compliance: the first row of three sits slightly wider apart, as before. */
.utrf-staff-group--accounting-compliance .wp-block-post:nth-child(-n+3) {
	margin-inline: 40px;
}
