/**
 * The team bio pop-up (inc/team.php, assets/js/team-popup.js). A native <dialog>, closed and hidden
 * until opened: a full-screen white sheet on phones; from 600 px a white panel 720 px wide, centred
 * over a navy veil. The panel inside scrolls, so a click on the <dialog> itself is the backdrop.
 */

html.seymour-team-popup-locked,
html.seymour-team-popup-locked body {
	overflow: hidden;
}

.seymour-team-popup {
	background: var(--white);
	border: 0;
	border-radius: 0;
	box-sizing: border-box;
	color: var(--ink);
	height: 100%;
	inset: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	overflow: hidden;
	padding: 0;
	position: fixed;
	width: 100%;
}

.seymour-team-popup[open] {
	display: flex;
	flex-direction: column;
}

.seymour-team-popup::backdrop {
	background: rgba(21, 42, 69, 0.72);
}

.seymour-team-popup__panel {
	border-top: 3px solid var(--gold-500);
	box-sizing: border-box;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 max(var(--gutter), 16px) var(--space-6);
}

/* The close button stays in view while the bio scrolls. */
.seymour-team-popup__head {
	background: var(--white);
	display: flex;
	justify-content: flex-end;
	padding: var(--space-3) 0 var(--space-2);
	position: sticky;
	top: 0;
	z-index: 1;
}

button.seymour-team-popup__close {
	align-items: center;
	background: var(--footer-bg);
	border: 0;
	border-radius: var(--radius);
	color: var(--white);
	cursor: pointer;
	display: inline-flex;
	flex: none;
	height: var(--touch-target);
	justify-content: center;
	min-height: 0;
	padding: 0;
	width: var(--touch-target);
}

button.seymour-team-popup__close:hover {
	background: var(--navy-900);
	color: var(--white);
}

button.seymour-team-popup__close:focus-visible {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
}

/* Phones: a small headshot above the name, so the phone and email lines get the full width. */
.seymour-team-popup__layout {
	display: grid;
	gap: var(--space-3);
	grid-template-columns: minmax(0, 1fr);
}

.seymour-team-popup__photo {
	max-width: 120px;
}

.seymour-team-popup__photo[hidden] {
	display: none;
}

.seymour-team-popup__photo img {
	aspect-ratio: 4 / 5;
	display: block;
	height: auto;
	object-fit: cover;
	object-position: center top;
	width: 100%;
}

.seymour-team-popup__photo[hidden] + .seymour-team-popup__main {
	grid-column: 1 / -1;
}

.seymour-team-popup__name {
	color: var(--navy);
	font-size: var(--fs-h2);
	line-height: var(--lh-tight);
	margin: 0;
}

.seymour-team-popup__role {
	color: var(--grey-600);
	font-size: var(--fs-meta);
	margin: var(--space-1) 0 0;
}

.seymour-team-popup__contact {
	display: grid;
	gap: var(--space-1);
	list-style: none;
	margin: var(--space-3) 0 0;
	padding: 0;
}

.seymour-team-popup__contact[hidden],
.seymour-team-popup__role[hidden],
.seymour-team-popup__bio[hidden],
.seymour-team-popup__status[hidden],
.seymour-team-popup__more[hidden] {
	display: none;
}

.seymour-team-popup__contact li {
	margin: 0;
}

.seymour-team-popup__contact a {
	align-items: center;
	color: var(--navy);
	display: inline-flex;
	gap: var(--space-2);
	min-height: var(--touch-target);
	overflow-wrap: anywhere;
}

.seymour-team-popup__contact .seymour-phone__label {
	color: var(--grey-600);
}

.seymour-team-popup__contact .seymour-icon {
	flex: none;
	height: var(--icon-size-button);
	width: var(--icon-size-button);
}

.seymour-team-popup__bio {
	border-top: 1px solid var(--line);
	margin-top: var(--space-5);
	padding-top: var(--space-5);
}

.seymour-team-popup__bio > :first-child {
	margin-top: 0;
}

.seymour-team-popup__status {
	color: var(--grey-600);
	margin: var(--space-5) 0 0;
}

.seymour-team-popup__more {
	margin: var(--space-5) 0 0;
}

.seymour-team-popup__profile {
	align-items: center;
	display: inline-flex;
	gap: var(--space-2);
	min-height: var(--touch-target);
}

.seymour-team-popup__profile .seymour-icon {
	height: 1em;
	width: 1em;
}

@media (min-width: 600px) {
	.seymour-team-popup {
		height: fit-content;
		margin: auto;
		max-height: calc(100% - var(--space-8));
		width: min(720px, calc(100% - var(--space-7)));
	}

	.seymour-team-popup__panel {
		padding: 0 var(--space-6) var(--space-6);
	}

	.seymour-team-popup__layout {
		align-items: end;
		gap: var(--space-5);
		grid-template-columns: 180px minmax(0, 1fr);
	}

	.seymour-team-popup__photo {
		max-width: none;
	}
}

/* A gold line under the number or email on hover (Kaz, October 26, 2026). */
.seymour-team-popup__contact a {
	text-decoration: none;
}

.seymour-team-popup__contact a:hover > span:last-child,
.seymour-team-popup__contact a:focus-visible > span:last-child {
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
