/*
 * Theme-aware colors.
 * These follow the text color of whatever theme is active, so they adapt to
 * light and dark themes without needing to know the theme's palette slugs.
 * To use a specific theme color instead, replace a value with, for example:
 *   var(--wp--preset--color--tertiary, #dddddd)
 * Also used by taxonomy-office.css.
 */
:root {
	--staffed-surface: color-mix(in srgb, currentColor 13%, transparent);
	--staffed-border: color-mix(in srgb, currentColor 25%, transparent);
	--staffed-shadow: color-mix(in srgb, currentColor 35%, transparent);
}

/* ------------------------------------------------------------------
 * Single staff page
 *
 * The title sits on top. The image floats to the right and the contact
 * details and bio wrap around it, like a magazine article. It works for
 * any image shape: the image is capped in width and height, never
 * stretched or cropped. Below 700px the image moves above the text.
 *
 * The .single-staff-image wrapper must come BEFORE .single-staff-info
 * in the markup, so the text can flow around it.
 * ----------------------------------------------------------------*/

.single-staff-container {
	box-sizing: border-box;
	display: flow-root;
	max-width: 1400px;
	min-height: 80dvh;
	margin: 1rem auto;
	padding: clamp(1rem, 4vw, 1.75rem);
	background-color: var(--staffed-surface);
	border: 1px solid var(--staffed-border);
	box-shadow: 2px 2px 6px 3px var(--staffed-shadow);
}

.single-staff-container h2 {
	margin: 0 0 1rem;
	padding: 0;
	font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem);
	line-height: 1.1;
}

/* Contains the floated image. */
.single-staff-container .single-staff-data {
	display: flow-root;
	margin: 0;
}

.single-staff-container .single-staff-image {
	float: right;
	box-sizing: border-box;
	max-width: min(45%, 460px);
	margin: 0 0 1rem clamp(1rem, 3vw, 2rem);
}

/* No image, no float: the text then uses the full width. */
.single-staff-container .single-staff-image:not(:has(img)) {
	display: none;
}

.single-staff-container .single-staff-image figure {
	margin: 0;
}

/* Keeps the image's own proportions, whatever they are. */
.single-staff-container .single-staff-image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(80vh, 640px);
	margin: 0 auto;
}

.single-staff-container .single-staff-info {
	display: block;
	margin: 0;
	padding: 0;
	overflow-wrap: break-word;
}

.single-staff-container .single-staff-contact {
	margin: 0 0 1rem;
}

.staffed-locations {
	margin-bottom: 8px;
}
.staffed-locations a {
	text-decoration: none;
}
.staffed-contact-line {
	display: flex;
	column-gap: 5px;
	align-items: center;
}
.staffed-contact-line a {
	display: flex;
	align-items: center;
}
.staffed-contact-icon {
	width: 20px;
}

/* Tablets and phones: image on top, text below. */
@media only screen and (max-width: 700px) {
	.single-staff-container .single-staff-image {
		float: none;
		max-width: 100%;
		margin: 0 0 1.25rem;
	}
	.single-staff-container .single-staff-image img {
		max-height: 60vh;
	}
}

@media only screen and (max-width: 400px) {
	.staffed-contact-line {
		column-gap: 12px;
		margin-top: 16px;
	}
	.staffed-contact-icon {
		width: 40px;
	}
}
