/* UMA Directory Item — Person Card (listing/archive view)
   !important was removed from this file (CSS lean-down, 2026-06-10). These rules
   rely on selector specificity + load order to beat the UMS Directory plugin's
   own stylesheet. If a plugin rule wins back a property, raise this selector's
   specificity rather than reintroducing !important. */

.wp-block-ums-directory-directory-item.uma-person-card {
	line-height: var(--wp--custom--line-height--normal);
	break-inside: avoid;
	margin-bottom: 2em;
}

.listing-type-person.wp-block-ums-directory-directory-item {
	margin-bottom: 0;
}

/* Photo — uniform square crop (matches prod's 270×270). The 1:1 aspectRatio +
   object-fit:cover come from the person-card patterns' core/image block; width:100%
   makes it fill the grid track. (Grid-track equalization via min-width:0 lives in
   ums-directory--directory-listings-container.css.) */
.uma-person-card .ums-dir-field-feat-img .wp-block-image {
	margin: 0 0 0.3em;
}

.uma-person-card .ums-dir-field-feat-img img {
	width: 100%;
	height: auto;
}

/* Name — uppercase, mr-eaves-xl-modern, 22px, weight 500 (matches production) */
.uma-person-card .ums-dir-field-title h3,
.uma-person-card .ums-dir-field-title h3 a {
	font-family: var(--wp--preset--font-family--secondary);
	font-size: 22px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--brand-1);
	text-decoration: none;
	margin: 10px 0;
	padding: 0;
	line-height: 28px;
}

.uma-person-card .ums-dir-field-title,
.uma-person-card .ums-dir-field-title h3,
.uma-person-card .ums-dir-field-title h3 a {
	border: none;
	border-bottom: none;
	text-decoration: none;
	box-shadow: none;
}

.uma-person-card .ums-dir-field-title h3 a:hover {
	text-decoration: none;
	color: var(--wp--preset--color--accent-1);
}

/* Job title + summary typography now set as block attributes (fontSize /
   lineHeight / margin) in the person-uma-cards* patterns — no CSS override
   needed. Inline block styles already beat the plugin's stylesheet. */

/* Bio content */
.uma-person-card .ums-dir-field-content {
	margin-top: 16px;
}

/* Collapse job title bottom margin when it's the last visible field */
.uma-person-card .ums-dir-field-job-title:last-child {
	margin-bottom: 0;
}

/* Field spacing */
.uma-person-card .wp-block-ums-directory-directory-field {
	font-size: 18px;
	margin-bottom: 0.15em;
}

/* Person name (title field): 16px below it, matching the job-title's spacing.
   The directory listing renders person-card fields from the listings block's
   STORED field configs (DB), not the live person-uma-cards pattern, so the
   pattern's title-field margin attribute doesn't reach the existing listing —
   this applies it to the rendered title field. (0,3,0) out-specifies the
   general field rule above. */
.uma-person-card .ums-dir-field-title.wp-block-ums-directory-directory-field {
	margin-bottom: 16px;
}

/* === Single bio page === */
.uma-person-bio h1 {
	padding: unset;
	margin: 0 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(16, 50, 86, 0.3);
	/* letter-spacing:0 and text-transform:none are set as block attributes on
	   the title field in person-uma.php — no CSS override needed. */
}

.uma-person-bio .ums-dir-field-job-title .ums-dir-field-render {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
}

.uma-person-bio .ums-dir-field-education .ums-dir-field-render {
	display: flex;
	flex-direction: column;
	gap: 0.3em;
}

/* Long unbreakable tokens (emails, URLs) in listing/card field values must wrap
   to fit their column rather than overflow — e.g. a mailto: link inside a card
   summary in the narrow 3-col grid. Restores the legacy Virtue theme's global
   word-wrap:break-word, which the FSE theme otherwise drops. UMA 2026-06-26. */
.wp-block-ums-directory-directory-item .ums-dir-field-render {
	overflow-wrap: break-word;
}

/* Bio labels are now semantic <h2> (a11y / document outline) for BOTH the
   migration-built section labels (Expertise, Publications, Education, Courses)
   and the contact field labels (Title/Phone/Email/Office/CV/Media). They are
   styled DOWN to the original compact bold-label look — NOT the big native h2.
   UMA 2026-06-26: keep the h2 tag, restore the prior appearance.
   (0,3,0)/(0,2,0) out-specify theme.json's :where(h2) sizing. Margin rhythm for
   sections is handled by the section-spacing rules below. */
.uma-person-bio .uma-directory-section > .uma-section-label,
.uma-person-bio .ums-dir-field-label {
	font-size: inherit;
	font-weight: 700;
	line-height: var(--wp--custom--line-height--body);
	border-bottom: 0;
	padding-bottom: 0;
	margin: 0;
}

/* No "Bio" heading: the bio is the main content under the person's name (UMA
   2026-06-25). New migrations emit the bio section with no label; this hides the
   label still baked into already-migrated content. Transitional — removable once
   the directory is re-migrated. Scoped to the bio section only (Expertise,
   Publications, etc. keep their headings). */
.uma-person-bio .uma-section-bio > .uma-section-label {
	display: none;
}

/* The group's flow layout zeroes child margins, so restore rhythm: space between
   sections, and between blocks within a section. */
.uma-person-bio .uma-directory-section + .uma-directory-section {
	margin-top: 1.5em;
}

.uma-person-bio .uma-directory-section > * + * {
	margin-top: 16px;
}

/* …but the first block right after the section label sits tight under it
   (no gap under the h2). (0,3,0) beats the > * + * rule above (0,2,0). */
.uma-person-bio .uma-directory-section > .uma-section-label + * {
	margin-top: 0;
}

/* Contact fields: compact but not cramped — a small gap separates each
   label/value pair (the plugin's default 1em was too much, 0 too tight). */
.uma-person-bio .ums-dir-field-job-title,
.uma-person-bio .ums-dir-field-primary-telephone,
.uma-person-bio .ums-dir-field-email,
.uma-person-bio .ums-dir-field-address {
	margin-bottom: 0.5em;
}

/* Inline field labels (Title/Phone/Email/Office/…) use the heading (secondary)
   font so they match the h2 section labels, which inherit it from
   theme.json styles.elements.heading. */
.uma-person-bio .ums-dir-field-label {
	font-family: var(--wp--preset--font-family--secondary);
}

@media (max-width: 768px) {
	.uma-person-bio h1 {
		font-size: 2rem;
	}
}

/* === Advising-contact card (person-uma-advising pattern) ===
   Contact grid for /academics/advising/contact/: photo, name, title, phone,
   email, "Program Liaison for:" list, campus, and the two booking links.
   Extends .uma-person-card; only the advising-specific fields need rules. */

/* Tighten the stacked contact rows (phone/email/liaison/location) below title. */
.uma-advising-card .ums-dir-field-primary-telephone,
.uma-advising-card .ums-dir-field-email,
.uma-advising-card .ums-dir-field-liaisons,
.uma-advising-card .ums-dir-field-locations {
	font-size: 18px;
	line-height: 26px;
	margin-bottom: 0.4em;
}

/* Field labels (Location:, Phone:, Email:, Program Liaison for:) read as
   heading-font lead-ins above each value. */
.uma-advising-card .ums-dir-field-label {
	font-family: var(--wp--preset--font-family--secondary);
	font-weight: 700;
}

/* Booking links are plain text links (matching production), each on its own
   line. The per-person link text (parsed from the legacy excerpt) distinguishes
   current vs. prospective students, so no field label is shown. */
.uma-advising-card .uma-advising-booking {
	margin-top: 0.5em;
}

.uma-advising-card .uma-advising-booking a {
	display: inline-block;
}
