/*
 * Solicitor profiles (Solicitors Guide). Loaded after firm.css on
 * pdir_professional pages: the page reuses the firm profile's shell, section
 * cards (.pdir-sec), masthead (.pdir-fhead), practice list, reviews and
 * sidebar, so this file only adds what a person's page needs: a round photo,
 * the role line and the details list. Tokens only (tokens.css).
 */

/* ---------- Masthead: photo and role ---------- */

.pdir-fhead--pro .pdir-fhead__mark--photo,
.pdir-fhead--pro .pdir-fhead__mark--round {
	width: 72px;
	height: 72px;
	padding: 0;
	border-radius: 50%;
	background: var(--sg-soft);
}

.pdir-fhead--pro .pdir-fhead__mark--photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pdir-fhead--pro .pdir-fhead__mark--round .pdir-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	font-size: 1.5rem;
}

.pdir-fhead__role {
	margin: 0 0 12px;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--sg-text);
}

.pdir-fhead__at {
	color: var(--sg-muted);
}

.pdir-profile .pdir-fhead__role a {
	font-weight: 600;
}

/* The firm link sits above the "Featured" badge's 44px hit area
   (components.css), which reaches up into it when the badge wraps under the
   name on phones. */
.pdir-fhead__role a:not(.sg-featbadge) {
	position: relative;
	z-index: 4;
}

@media (max-width: 599px) {
	.pdir-fhead--pro .pdir-fhead__mark {
		grid-row: 1 / span 2;
	}

	.pdir-fhead--pro .pdir-fhead__name {
		align-self: end;
	}

	.pdir-fhead--pro .pdir-fhead__role {
		grid-column: 2;
		align-self: start;
		margin: 4px 0 0;
		font-size: 0.9375rem;
	}
}

@media (min-width: 600px) {
	.pdir-fhead--pro .pdir-fhead__mark--photo,
	.pdir-fhead--pro .pdir-fhead__mark--round {
		width: 104px;
		height: 104px;
	}

	.pdir-fhead--pro .pdir-fhead__mark--round .pdir-avatar {
		font-size: 2rem;
	}

	.pdir-fhead--pro .pdir-fhead__name {
		margin-bottom: 6px;
	}
}

/* ---------- Details list ---------- */

.pdir-facts {
	display: grid;
	margin: 0;
	border-top: 1px solid var(--sg-line);
}

.pdir-facts__row {
	display: grid;
	gap: 2px;
	padding: 12px 0;
	border-bottom: 1px solid var(--sg-line);
}

.pdir-facts dt {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--sg-muted);
}

.pdir-facts dd {
	margin: 0;
	min-width: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--sg-ink);
	overflow-wrap: anywhere;
}

.pdir-facts__hint {
	margin-left: 8px;
	font-size: 0.8125rem;
	color: var(--sg-muted);
}

.pdir-profile .pdir-facts a {
	font-weight: 500;
}

@media (min-width: 600px) {
	.pdir-facts__row {
		grid-template-columns: 200px minmax(0, 1fr);
		gap: 16px;
		align-items: baseline;
	}

	.pdir-facts dt {
		font-size: 0.875rem;
	}
}

.pdir-pro-details__aspects-title {
	margin-top: 20px;
}

.pdir-pro-details .pdir-rsum__aspects {
	margin-top: 8px;
	padding-top: 0;
	border-top: 0;
}

/* ---------- Legacy sidebar block (professional-sidebar, unplaced) ---------- */

.pdir-pro-aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pdir-pro-aside__card {
	padding: 20px;
	border: 1px solid var(--sg-line);
	border-radius: var(--sg-radius-card);
	background: #fff;
	box-shadow: var(--sg-shadow-card);
}

.pdir-pro-aside__title {
	margin: 0 0 12px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--sg-ink);
}

.pdir-pro-firm,
.pdir-pro-teammate__link {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--sg-ink);
	text-decoration: none;
}

.pdir-pro-firm__mark img,
.pdir-pro-teammate__mark img,
.pdir-pro-firm__mark .pdir-avatar {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	object-fit: contain;
}

.pdir-pro-teammates {
	display: grid;
	gap: 10px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.pdir-pro-teammate__mark img {
	border-radius: 50%;
	object-fit: cover;
}

.pdir-pro-firm__meta,
.pdir-pro-teammate__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	font-size: 0.875rem;
}

.pdir-pro-firm__name,
.pdir-pro-teammate__name {
	font-weight: 600;
}

.pdir-pro-teammate__role {
	color: var(--sg-muted);
}
