/* Project side panel (assets/js/project-panel.js): slides in from the right below the site header (whose bottom
   the script measures into --ipm-pp-top), over the dimmed page; the header stays as it is. Full screen on phones. Banner (logo, close, approach tag), project name, member, details, description; View profile fixed at
   the bottom. */

.ipm-pp {
	--ipm-pp-navy: #1c2b4a;
	--ipm-pp-blue: var(--dark-blue, #084d92);
	--ipm-pp-button: #224d7e;
	--ipm-pp-muted: #6b7486;
	--ipm-pp-icon: #8a94a6;
	--ipm-pp-line: #eceef2;
	--ipm-pp-font: var(--Runda-N, 'Runda-Normal'), var(--Runda, 'Runda'), sans-serif;
	--ipm-pp-font-m: var(--Runda-M, 'Runda-Medium'), sans-serif;
	--ipm-pp-speed: 0.3s;
	color: var(--ipm-pp-navy);
	font-family: var(--ipm-pp-font);
}

body.ipm-pp-open {
	overflow: hidden;
}

.ipm-pp [hidden] {
	display: none !important;
}

/* Closed: off screen to the right and hidden (not focusable, not read out) once it has slid away. */
.ipm-pp-overlay {
	position: fixed;
	top: var(--ipm-pp-top, 0px);
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100000; /* Above the sidebar and messaging widgets. */
	background: rgba(15, 23, 42, 0.28);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--ipm-pp-speed) ease, visibility 0s linear var(--ipm-pp-speed);
}

.ipm-pp-panel {
	position: fixed;
	top: var(--ipm-pp-top, 0px);
	right: 0;
	bottom: 0;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	width: clamp(400px, 30vw, 460px);
	max-width: 100%;
	background: #fff;
	box-shadow: -8px 0 32px rgba(16, 24, 40, 0.18);
	outline: none;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform var(--ipm-pp-speed) cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear var(--ipm-pp-speed);
}

.ipm-pp.is-open .ipm-pp-overlay {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--ipm-pp-speed) ease;
}

.ipm-pp.is-open .ipm-pp-panel {
	transform: none;
	visibility: visible;
	transition: transform var(--ipm-pp-speed) cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
	.ipm-pp .ipm-pp-overlay,
	.ipm-pp .ipm-pp-panel,
	.ipm-pp.is-open .ipm-pp-overlay,
	.ipm-pp.is-open .ipm-pp-panel {
		transition: none;
	}
}

/* Banner: the site's dark blue gradient (.darkblue-banner); a project image goes under a dark blue overlay. */
.ipm-pp-banner {
	position: relative;
	flex: none;
	height: 180px;
	overflow: hidden;
	background: linear-gradient(213deg, #004c96 -3.99%, #001830 100%);
}

.ipm-pp-banner-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

.ipm-pp-banner.has-image::after {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(213deg, rgba(0, 76, 150, 0.78) -3.99%, rgba(0, 24, 48, 0.9) 100%);
	content: "";
}

.ipm-pp-logo,
.ipm-pp .ipm-pp-close,
.ipm-pp-tag {
	position: absolute;
	z-index: 1;
}

.ipm-pp-logo {
	top: 20px;
	left: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
}

.ipm-pp-logo img {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
}

.ipm-pp .ipm-pp-close {
	top: 18px;
	right: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	min-width: 0;
	height: 28px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--ipm-pp-navy);
	box-shadow: none;
	cursor: pointer;
}

.ipm-pp .ipm-pp-close:hover {
	background: #eff2f6;
	color: var(--ipm-pp-navy);
}

.ipm-pp .ipm-pp-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ipm-pp-tag {
	bottom: 16px;
	left: 20px;
	padding: 3px 8px;
	border-radius: 4px;
	background: #fff;
	color: var(--ipm-pp-navy);
	font-family: var(--ipm-pp-font-m);
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
}

/* The part that scrolls: name, member, details, description. */
.ipm-pp-body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 22px 24px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ipm-pp-body:focus:not(:focus-visible) {
	outline: none; /* Focused on opening; a ring only when reached by keyboard. */
}

.ipm-pp-body:focus-visible {
	outline: 2px solid var(--ipm-pp-blue);
	outline-offset: -2px;
}

/* custom.css forces regular Runda on headings and links with !important. */
.ipm-pp .ipm-pp-title {
	margin: 0 0 14px;
	color: var(--ipm-pp-navy);
	font-family: var(--ipm-pp-font-m) !important;
	font-weight: 700;
	font-size: 20px;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.ipm-pp-member {
	display: flex;
	gap: 10px;
	align-items: center;
	margin: 0 0 18px;
}

.ipm-pp-photo {
	display: inline-flex;
	flex: none;
	border-radius: 50%;
	text-decoration: none;
}

.ipm-pp-avatar {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	max-width: none;
	height: 32px;
	border-radius: 50%;
	background: #eaf2fb;
	color: var(--ipm-pp-blue);
	font-family: var(--ipm-pp-font-m);
	font-weight: 600;
	font-size: 12px;
	line-height: 1;
	object-fit: cover;
}

.ipm-pp-who {
	min-width: 0;
}

.ipm-pp .ipm-pp-name {
	color: var(--ipm-pp-navy);
	font-family: var(--ipm-pp-font-m) !important;
	font-weight: 700;
	font-size: 14px;
	line-height: 18px;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.ipm-pp a.ipm-pp-name[href]:hover {
	color: var(--ipm-pp-blue);
	text-decoration: underline;
}

.ipm-pp-meta {
	margin: 1px 0 0;
	color: var(--ipm-pp-muted);
	font-size: 12px;
	line-height: 16px;
	overflow-wrap: anywhere;
}

/* Details: icon and label on the left, value on the right, a thin line between rows. */
.ipm-pp-details {
	margin: 0 0 22px;
	padding: 0;
}

.ipm-pp-row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 8px 0; /* About 37px a row with the line. */
}

.ipm-pp-row + .ipm-pp-row {
	border-top: 1px solid var(--ipm-pp-line);
}

.ipm-pp-row dt {
	display: flex;
	flex: 0 0 116px;
	gap: 8px;
	align-items: center;
	margin: 0;
	color: var(--ipm-pp-muted);
	font-weight: normal;
	font-size: 12px;
	line-height: 20px;
}

.ipm-pp-row dt svg {
	flex: none;
	width: 14px;
	height: 14px;
	color: var(--ipm-pp-icon);
}

.ipm-pp-row dd {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: var(--ipm-pp-navy);
	font-family: var(--ipm-pp-font-m);
	font-weight: 500;
	font-size: 13px;
	line-height: 20px;
	overflow-wrap: anywhere;
}

.ipm-pp-row dd.is-undisclosed {
	color: var(--ipm-pp-muted);
	font-family: var(--ipm-pp-font);
	font-weight: normal;
}

.ipm-pp .ipm-pp-desc-title {
	margin: 0 0 6px;
	color: var(--ipm-pp-navy);
	font-family: var(--ipm-pp-font-m) !important;
	font-weight: 700;
	font-size: 14px;
	line-height: 20px;
}

.ipm-pp-desc {
	margin: 0;
	color: #4a5468;
	font-size: 13px;
	line-height: 1.6;
	white-space: pre-line; /* Line breaks as the member typed them. */
	overflow-wrap: anywhere;
}

/* View profile, in a footer fixed at the bottom. */
.ipm-pp-foot {
	flex: none;
	padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--ipm-pp-line);
	background: #fff;
}

.ipm-pp .ipm-pp-profile {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 12px 16px;
	border-radius: 4px;
	background: var(--ipm-pp-button);
	color: #fff;
	font-family: var(--ipm-pp-font-m) !important;
	font-weight: 600;
	font-size: 14px;
	line-height: 20px;
	text-decoration: none;
}

.ipm-pp .ipm-pp-profile:hover {
	background: var(--ipm-pp-blue);
	color: #fff;
}

.ipm-pp .ipm-pp-name:focus-visible,
.ipm-pp .ipm-pp-profile:focus-visible {
	outline: 2px solid var(--ipm-pp-blue);
	outline-offset: 2px;
}

/* Phones: the whole screen. */
@media (max-width: 767px) {
	.ipm-pp-overlay,
	.ipm-pp-panel {
		top: 0;
	}

	.ipm-pp-panel {
		width: 100%;
		box-shadow: none;
	}

	.ipm-pp-banner {
		height: 160px;
	}

	.ipm-pp-body {
		padding: 20px 16px;
	}

	.ipm-pp-foot {
		padding-right: 16px;
		padding-left: 16px;
	}
}
