/* Single team member — the live /staff/{slug} design. Type, colour and
   spacing are block attributes in Team_Member_Single; this file only carries
   what attributes cannot express: decorative pseudo-elements, image fitting,
   sticky and absolute positioning, nimue block overrides, hover states,
   post-content styling and responsive breakpoints. Selectors are plain block
   classes so the editor canvas renders the same as the front end. */

/* Hero: soft glows behind the content. */
.tm-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.tm-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(closest-side, rgba(176, 172, 5, 0.16), transparent 65%) -20% -40% / 70% 140% no-repeat,
		radial-gradient(closest-side, rgba(176, 172, 5, 0.08), transparent 70%) 120% 120% / 60% 120% no-repeat;
}

.tm-hero > * {
	position: relative;
}

/* nimue breadcrumbs have no colour support; these are the on-dark tones. */
.tm-crumbs a {
	color: rgba(217, 212, 168, 0.85);
	text-decoration: none;
}

.tm-crumbs a:hover {
	color: var(--accent);
}

.tm-crumbs .nb-breadcrumbs__separator {
	margin: 0 8px;
	color: rgba(217, 212, 168, 0.35);
}

.tm-crumbs [aria-current] {
	color: var(--fg-on-dark);
}

/* Eyebrow with the short rule before it. */
.tm-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.tm-eyebrow::before {
	content: "";
	display: inline-block;
	width: 28px;
	height: 1px;
	background: var(--accent);
}

/* Portrait: fitted image, bottom fade, badge pinned to the corner. */
.tm-portrait {
	position: relative;
	overflow: hidden;
	max-height: 640px;
}

.tm-portrait img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.96) contrast(1.02);
}

.tm-portrait::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(rgba(26, 25, 12, 0) 55%, rgba(26, 25, 12, 0.6) 100%);
}

.tm-portrait .tm-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	backdrop-filter: blur(8px);
}

.tm-badge::before,
.tm-avail::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--accent);
	box-shadow: 0 0 0 4px rgba(176, 172, 5, 0.26);
}

/* A member without a second chip or an experience figure loses the slot. */
.tm-chip:empty {
	display: none;
}

.tm-stat-value em {
	font-style: italic;
	font-weight: 400;
	color: var(--accent);
}

.tm-stat-years::after {
	content: " years";
	font-style: italic;
	font-weight: 400;
	color: var(--accent);
}

.tm-stats:has(.tm-stat-years:empty) {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tm-stat-experience:has(.tm-stat-years:empty) {
	display: none;
}

/* "book with <name> →" is a nimue hyperlink group (no colour or spacing
   support), styled as the primary pill. */
.tm-hero .tm-book {
	display: inline-flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 52px;
	padding: 14px 26px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition:
		background var(--dur-base) var(--ease-out),
		color var(--dur-base) var(--ease-out),
		box-shadow var(--dur-base) var(--ease-out);
}

.tm-hero .tm-book:hover,
.tm-hero .tm-book:focus-visible {
	background: var(--wp--preset--color--ink) !important;
	color: var(--accent);
	box-shadow: inset 0 0 0 1.5px var(--accent);
}

.tm-hero .tm-book p {
	color: inherit;
}

/* Trust marks: fitted, softened until hovered. */
.tm-mark img {
	display: block;
	width: auto;
	object-fit: contain;
	filter: saturate(0.9) opacity(0.85);
	transition: filter var(--dur-base) var(--ease-out);
}

.tm-mark:hover img {
	filter: none;
}

/* Profile copy comes from post content, so the template cannot set its
   attributes: headings, paragraphs and the focus-grid lists are styled here. */
.tm-article > h2,
.tm-article > h3 {
	font-family: var(--font-display);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.05;
	text-transform: lowercase;
	color: var(--fg);
}

.tm-article > h2 {
	font-size: clamp(28px, 4vw, 44px);
}

.tm-article > h3 {
	font-size: clamp(22px, 2.6vw, 28px);
}

.tm-article > p {
	max-width: 62ch;
	line-height: 1.65;
	color: var(--fg-soft);
}

.tm-article > ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
	padding: 0;
	list-style: none;
}

.tm-article > ul li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--wp--preset--color--white);
	font-family: var(--font-display);
	font-size: 15px;
	letter-spacing: -0.01em;
	text-transform: lowercase;
	color: var(--fg);
}

.tm-article > ul li::before,
.tm-check::before {
	content: "";
	flex: none;
}

.tm-article > ul li::before {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--accent);
}

/* Booking card sticks below the header. */
.tm-card {
	position: sticky;
	top: 112px;
}

.tm-avail {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
}

.tm-check {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tm-check::before {
	width: 18px;
	height: 18px;
	border: 1px solid var(--accent-soft);
	border-radius: 999px;
	background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FAF8EC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Central booking line is a nimue hyperlink group (no colour or spacing support). */
.tm-card .tm-phone-line {
	display: flex;
	flex-direction: column;
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--wp--preset--color--sand);
	text-decoration: none;
	transition: background var(--dur-base) var(--ease-out);
}

.tm-card .tm-phone-line:hover,
.tm-card .tm-phone-line:focus-visible {
	background: #e8e0a8 !important;
}

/* Stories: the section goes when the clinician has none; each card wears a quote mark. */
.tm-stories:has(.wp-block-query-no-results) {
	display: none;
}

.tm-story {
	position: relative;
}

.tm-story::before {
	content: "\201C";
	position: absolute;
	top: 4px;
	left: 20px;
	pointer-events: none;
	font-family: var(--font-display);
	font-size: 78px;
	font-style: italic;
	font-weight: 500;
	line-height: 1;
	color: var(--accent);
}

.tm-story-role:empty {
	display: none;
}

.tm-others .tm-all .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--accent);
}

/* Responsive */
@media (max-width: 1023px) {
	.tm-hero .tm-hero-grid {
		flex-direction: column;
		gap: 40px;
	}

	.tm-hero .tm-hero-grid > .wp-block-column {
		flex-basis: auto !important;
	}

	.tm-portrait {
		max-width: 420px;
	}

	.tm-body .tm-grid {
		flex-direction: column;
		gap: 32px;
	}

	.tm-body .tm-grid > .wp-block-column {
		flex-basis: auto !important;
	}

	.tm-card {
		position: static;
	}
}

@media (max-width: 719px) {
	.tm-hero .tm-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.tm-hero .tm-actions .wp-block-buttons,
	.tm-hero .tm-actions .wp-block-button,
	.tm-hero .tm-actions .wp-block-button__link {
		display: flex;
		justify-content: center;
	}

	.tm-hero .tm-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
