.vci-staff-grid__modal[hidden] {
	display: none;
}

.vci-staff-grid__modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.vci-staff-grid__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.vci-staff-grid__modal-dialog {
	position: relative;
	width: min(1040px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow: hidden;
	background: #fff;
	border-radius: 10px;
	padding: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
}

.vci-staff-grid__modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	border: 0;
	background: transparent;
	width: 2.25rem;
	height: 2.25rem;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #1a1a1a;
	border-radius: 4px;
}

.vci-staff-grid__modal-close:hover,
.vci-staff-grid__modal-close:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.vci-staff-grid__modal-body {
	flex: 1;
	min-height: 0;
	overflow: auto;
}

/* 50% image | 50% content */
.vci-staff-grid__modal-pane {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	min-height: clamp(22rem, 62vh, 40rem);
}

.vci-staff-grid__modal-pane--no-media {
	grid-template-columns: 1fr;
}

.vci-staff-grid__modal-media {
	display: flex;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #e5e5e5;
	min-height: 0;
	align-self: stretch;
}

.vci-staff-grid__modal-photo {
	display: block;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	object-fit: cover;
	object-position: center top;
	margin: 0;
}

.vci-staff-grid__modal-main {
	padding: 2rem 2.25rem 2.25rem;
	overflow-y: auto;
	min-width: 0;
}

/* Room for close button over the text column */
.vci-staff-grid__modal-pane:not(.vci-staff-grid__modal-pane--no-media) .vci-staff-grid__modal-main {
	padding-top: 2.75rem;
}

.vci-staff-grid__modal-pane--no-media .vci-staff-grid__modal-main {
	padding-top: 2.75rem;
}

.vci-staff-grid__modal-name {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.15;
	color: #272727;
	font-family: var(--wp--preset--font-family--larken);
}

.vci-staff-grid__modal-title {
	margin: 1rem 0 0;
	font-family: var(--wp--preset--font-family--pp-mori);
	font-size: 1rem;
	font-weight: 600;
	color: #272727;
}

.vci-staff-grid__modal-description {
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--pp-mori);

	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #272727;
}

.vci-staff-grid__modal-description > :first-child {
	margin-top: 0;
}

.vci-staff-grid__modal-description > :last-child {
	margin-bottom: 0;
}

@media (max-width: 900px) {
	.vci-staff-grid__modal-pane:not(.vci-staff-grid__modal-pane--no-media) {
		grid-template-columns: 1fr;
		grid-template-areas:
			'media'
			'content';
		min-height: unset;
	}

	.vci-staff-grid__modal-media {
		grid-area: media;
		min-height: 16rem;
		max-height: 40vh;
		display: block;
	}

	.vci-staff-grid__modal-main {
		grid-area: content;
	}

	.vci-staff-grid__modal-photo {
		flex: none;
		height: 100%;
		min-height: 16rem;
		max-height: 40vh;
	}

	.vci-staff-grid__modal-pane:not(.vci-staff-grid__modal-pane--no-media) .vci-staff-grid__modal-main {
		padding-top: 2rem;
	}
}

.vci-staff-modal-open {
	overflow: hidden;
}
