/*
Block: Team Profiles
Last updated: 01/08/2026
*/

.wp-block-acf-team-profiles,
.wp-block-acf-team-profiles .profiles-wrap,
.wp-block-acf-team-profiles .profile,
.wp-block-acf-team-profiles .sizer {
	box-sizing: border-box;
	min-width: 0;
}

.wp-block-acf-team-profiles .profiles-wrap {
	width: 100%;
}

/*
 * On the front end the sizer remains in the rerouted CSS grid so it always
 * resolves to exactly one generated column. Shuffle reads that width while
 * the element itself occupies no visible height.
 */
.wp-block-acf-team-profiles .profiles-wrap > .sizer {
	height: 0;
	min-height: 0;
	align-self: start;
	visibility: hidden;
	pointer-events: none;
}

/* The editor uses the CSS grid directly, so the measuring element is omitted. */
.editor-styles-wrapper .wp-block-acf-team-profiles .profiles-wrap > .sizer {
	display: none !important;
}


/* Full-card link for profiles that have an ACF link value. */
.wp-block-acf-team-profiles .profile {
	position: relative;
}

.wp-block-acf-team-profiles .profile-tile-link {
	position: absolute;
	z-index: 10;
	inset: 0;
	display: block;
	border-radius: inherit;
	color: inherit;
	cursor: pointer;
}

.wp-block-acf-team-profiles .profile-tile-link:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: -3px;
}

/* Profile presentation and filters. */
.wp-block-acf-team-profiles .item-media {
	object-fit: cover;
	width: 100%;
	display: block;
}
.wp-block-acf-team-profiles .photo-category {
	position: relative;
}

.wp-block-acf-team-profiles .position-role {
	font-weight: 400;
	font-size: 14px;
}

.wp-block-acf-team-profiles .profile-text {
	display: flex;
	flex-direction: column;
	gap: .5em;
}

.wp-block-acf-team-profiles .profile-text * {
	margin: 0;
}

.wp-block-acf-team-profiles .photo-category .category-actions {
	height: 40px;
	position: absolute;
	left: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
	bottom: var(--wp--preset--spacing--30);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wp-block-acf-team-profiles .photo-category .team-category {
	font-family: var(--wp--preset--font-family--stack-sans-text);
	font-size: 12px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.6;
	border-radius: 1em;
	padding: .2em .6em;
	width: fit-content;
}

.wp-block-acf-team-profiles .category-doctor .team-category {
	background-color: color-mix(in srgb, var(--wp--preset--color--custom-primary-teal) 90%, transparent);
	color: var(--wp--preset--color--custom-white);
}
.wp-block-acf-team-profiles .category-allied-health .team-category {
	background-color: color-mix(in srgb, var(--wp--preset--color--custom-light-teal) 90%, transparent);
	color: var(--wp--preset--color--petrol);
}
.wp-block-acf-team-profiles .category-practice-staff .team-category {
	background-color: color-mix(in srgb, var(--wp--preset--color--custom-sand) 90%, transparent);
	color: var(--wp--preset--color--custom-coral);
}

.wp-block-acf-team-profiles .profile-actions {
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: .5em;
	position: absolute;
	top: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
}

.wp-block-acf-team-profiles .profile .material-symbols {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid 
color-mix(in srgb, currentcolor 30%, transparent);
    border-radius: 50%;
    background-color: 
color-mix(in srgb, var(--wp--preset--color--custom-white) 70%, transparent);
    font-size: 28px;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: scale(.85) rotate(-45deg);
    transition: opacity .2s ease, transform .3s ease;
}

.wp-block-acf-team-profiles .profile:hover .material-symbols {
	opacity: 1;
	transform: scale(1) rotate(0deg);
}

.wp-block-acf-team-profiles .shuffle-filter {
	position: relative;
	isolation: isolate;
	display: flex;
	gap: 5px;
	width: fit-content;
	margin-bottom: 30px;
	padding: var(--wp--preset--spacing--20);
	border-radius: 5px;
	background-color: var(--wp--preset--color--custom-soft-teal);
}

.wp-block-acf-team-profiles .shuffle-filter::before,
.wp-block-acf-team-profiles .shuffle-filter::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	box-sizing: border-box;
	border-radius: 5px;
	pointer-events: none;
	transition:
		transform 320ms cubic-bezier(.22, 1, .36, 1),
		width 320ms cubic-bezier(.22, 1, .36, 1),
		height 320ms cubic-bezier(.22, 1, .36, 1),
		opacity 160ms ease;
}

.wp-block-acf-team-profiles .shuffle-filter::before {
	z-index: 0;
	width: var(--filter-active-width, 0);
	height: var(--filter-active-height, 0);
	background-color: var(--wp--preset--color--custom-petrol);
	transform: translate3d(var(--filter-active-x, 0), var(--filter-active-y, 0), 0);
	opacity: 0;
}

.wp-block-acf-team-profiles .shuffle-filter[data-filter-pills-ready="true"]::before {
	opacity: 1;
}

.wp-block-acf-team-profiles .shuffle-filter::after {
	z-index: 1;
	width: var(--filter-hover-width, 0);
	height: var(--filter-hover-height, 0);
	background-color: rgba(0, 62, 83, .12);
	background-color: color-mix(in srgb, var(--wp--preset--color--custom-petrol) 12%, transparent);
	transform: translate3d(var(--filter-hover-x, 0), var(--filter-hover-y, 0), 0);
	opacity: var(--filter-hover-opacity, 0);
}

.wp-block-acf-team-profiles .filter-button {
	position: relative;
	z-index: 2;
	padding: 1em 2em;
	border: 1px solid transparent;
	border-radius: 5px;
	background: transparent;
	color: var(--wp--preset--color--custom-petrol);
	font-family: inherit;
	font-size: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: color 180ms ease;
}

.wp-block-acf-team-profiles .filter-button.is-active {
	background-color: var(--wp--preset--color--custom-petrol);
	color: white;
}

.wp-block-acf-team-profiles .shuffle-filter[data-filter-pills-ready="true"] .filter-button.is-active {
	background-color: transparent;
}

.wp-block-acf-team-profiles .filter-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--custom-petrol);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-acf-team-profiles .shuffle-filter::before,
	.wp-block-acf-team-profiles .shuffle-filter::after {
		transition: none;
	}
}

/* Biography-only tiles expand from their original grid position. */
.wp-block-acf-team-profiles .team-profile-toggle {
	position: absolute;
	z-index: 10;
	inset: 0;
	display: block;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	appearance: none;
	border: 0;
	border-radius: inherit;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.wp-block-acf-team-profiles .team-profile-toggle:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: -3px;
}

.wp-block-acf-team-profiles .team-profile-biography[hidden] {
	display: none !important;
}

.wp-block-acf-team-profiles.is-profile-expanded {
	overflow-anchor: none;
}

.wp-block-acf-team-profiles.is-profile-animating .profiles-wrap {
	transition: min-height 420ms cubic-bezier(.22, 1, .36, 1) !important;
	will-change: min-height;
}

.wp-block-acf-team-profiles .profile.is-expanded-source {
	visibility: hidden !important;
}

.wp-block-acf-team-profiles .profile.is-expanded-returning .team-category {
	opacity: 0;
	transform: translateY(4px);
}

.wp-block-acf-team-profiles .profile.is-expanded-returned .team-category {
	animation: kb-team-profile-category-return 240ms cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes kb-team-profile-category-return {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wp-block-acf-team-profiles .team-profile-expanded {
	position: absolute;
	z-index: 30;
	left: 0;
	display: block;
	width: 100%;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	isolation: isolate;
	box-sizing: border-box;
	border-radius: 5px;
	background: transparent;
	color: var(--wp--preset--color--custom-petrol, #004c58);
	clip-path: inset(0 var(--profile-clip-right, 0) 0 var(--profile-origin-x, 0) round 5px);
	transition: none;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-animating {
	transition:
		clip-path 420ms cubic-bezier(.22, 1, .36, 1),
		height 420ms cubic-bezier(.22, 1, .36, 1);
	will-change: clip-path, height;
}

.wp-block-acf-team-profiles .team-profile-expanded::before {
	content: "";
	position: absolute;
	z-index: 0;
	inset: 0;
	background: var(--team-profile-panel-background, transparent);
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms ease 60ms;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-visible {
	clip-path: inset(0 0 0 0 round 5px);
}

.wp-block-acf-team-profiles .team-profile-expanded.is-visible::before {
	opacity: 1;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-closing::before {
	opacity: 0;
	transition-delay: 0ms;
}

.wp-block-acf-team-profiles .team-profile-expanded-media {
	position: absolute;
	z-index: 1;
	top: 0;
	left: var(--profile-origin-x, 0);
	width: var(--profile-origin-width, 100%);
	height: var(--profile-origin-media-height, 100%);
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	opacity: 1;
	transition: none;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-animating .team-profile-expanded-media {
	transition:
		left 420ms cubic-bezier(.22, 1, .36, 1),
		width 420ms cubic-bezier(.22, 1, .36, 1),
		height 420ms cubic-bezier(.22, 1, .36, 1);
	will-change: left, width, height;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-visible .team-profile-expanded-media {
	left: 0;
	width: 44%;
	height: 100%;
	opacity: 1;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-closing .team-profile-expanded-media {
	opacity: 1;
	transition-delay: 0ms;
}

.wp-block-acf-team-profiles .team-profile-expanded-media .item-media {
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: cover;
}

.wp-block-acf-team-profiles .team-profile-expanded-content {
	position: absolute;
	z-index: 2;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	justify-content: safe center;
	gap: .75rem;
	width: 56%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	padding: clamp(30px, 5vw, 80px);
	box-sizing: border-box;
	overflow: auto;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-12px);
	transition: opacity 180ms ease, transform 260ms ease, visibility 0s linear 260ms;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-visible .team-profile-expanded-content {
	opacity: 1;
	visibility: visible;
	transform: translateX(0);
	transition-delay: 120ms, 120ms, 0s;
}

.wp-block-acf-team-profiles .team-profile-expanded-content > * {
	margin-top: 0;
	margin-bottom: 0;
}

.wp-block-acf-team-profiles .team-profile-expanded-content .position-role {
	font-size: inherit;
}

.wp-block-acf-team-profiles .team-profile-expanded-biography {
	margin-top: .5rem;
}

.wp-block-acf-team-profiles .team-profile-expanded-biography > :first-child {
	margin-top: 0;
}

.wp-block-acf-team-profiles .team-profile-expanded-biography > :last-child {
	margin-bottom: 0;
}

.wp-block-acf-team-profiles .team-profile-close {
	position: absolute;
	z-index: 3;
	top: 20px;
	right: 20px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--custom-white, #fff) 82%, transparent);
	color: inherit;
	cursor: pointer;
	opacity: 0;
	transition: opacity 180ms ease 160ms, background-color 180ms ease;
}

.wp-block-acf-team-profiles .team-profile-expanded.is-visible .team-profile-close {
	opacity: 1;
}

.wp-block-acf-team-profiles .team-profile-close .material-symbols {
	font-size: 24px;
	line-height: 1;
	pointer-events: none;
}

.wp-block-acf-team-profiles .team-profile-close:hover,
.wp-block-acf-team-profiles .team-profile-close:focus-visible {
	background: var(--wp--preset--color--custom-white, #fff);
}

.wp-block-acf-team-profiles .team-profile-close:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

@media (max-width: 700px) {
	.wp-block-acf-team-profiles .team-profile-expanded.is-visible .team-profile-expanded-media {
		left: 0;
		width: 100%;
		height: 42%;
	}

	.wp-block-acf-team-profiles .team-profile-expanded-content {
		top: 42%;
		right: auto;
		left: 0;
		width: 100%;
		height: 58%;
		padding: 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-acf-team-profiles.is-profile-animating .profiles-wrap,
	.wp-block-acf-team-profiles .team-profile-expanded,
	.wp-block-acf-team-profiles .team-profile-expanded.is-animating,
	.wp-block-acf-team-profiles .team-profile-expanded::before,
	.wp-block-acf-team-profiles .team-profile-expanded-media,
	.wp-block-acf-team-profiles .team-profile-expanded.is-animating .team-profile-expanded-media,
	.wp-block-acf-team-profiles .team-profile-expanded-content,
	.wp-block-acf-team-profiles .team-profile-close {
		transition: none !important;
	}

	.wp-block-acf-team-profiles .profile.is-expanded-returned .team-category {
		animation: none;
	}
}
