/*
 * CRM-blokkenes egne komponenter. Alt andet (kort, filtre, kontakt, hero)
 * kommer fra rodekors-blokke ("rk-blokke"), som dette stylesheet afhænger af.
 *
 * Mål fra Figma "Personerne bag" (379:12305) og komponenten "Ansat" (177:14747).
 * Farver bruger rodekors-blokkes custom properties med designets værdier som
 * fallback.
 */

/* "Se flere aktiviteter" er en knap her (ikke et link), men ser ud som linket. */
.rkcrm-more {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.rk-activities__list > li[hidden] {
	display: none;
}

/* Overskrift og intro over fanerne (Figma 379:12309): 36/44 rød, 24px ned til
   introteksten, 40px videre til fanerne. */
.rkcrm-people__intro {
	margin-bottom: 40px;
}

.rkcrm-people__title {
	margin: 0 0 24px;
	font-size: 36px;
	line-height: 44px;
}

@media (max-width: 1024px) {
	.rkcrm-people__title {
		font-size: 30px;
		line-height: 38px;
	}
}

/* Mobil (382:20848): 24/32 og 16px ned til teksten. */
@media (max-width: 767px) {
	.rkcrm-people__intro {
		margin-bottom: 24px;
	}

	.rkcrm-people__title {
		font-size: 24px;
		line-height: 32px;
		margin-bottom: 16px;
	}
}

/* Faner — Navigation/Local (379:12312) */
.rkcrm-people {
	box-sizing: border-box;
	width: calc(100% - 48px);
	max-width: 1200px;
	margin: 0 auto;
	/* Figma 379:12307 og 379:12317: 80px fra headeren ned til overskriften og
	   80px fra sidste kortrække ned til footeren. Blokken står alene på siden,
	   så luften skal komme herfra — der er ingen .rk-section om den. */
	padding: 80px 0;
	font-family: var(--rk-font, 'Gotham', 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
}

@media (max-width: 1024px) {
	.rkcrm-people {
		padding: 56px 0;
	}
}

/* Mobil (382:20846/382:20855): 16px over overskriften, 32px under kortene.
   Asymmetrisk med vilje — det er rammens egne mål. */
@media (max-width: 767px) {
	.rkcrm-people {
		width: calc(100% - 32px);
		padding: 16px 0 32px;
	}
}

.rkcrm-tabs {
	display: flex;
	gap: 40px;
	margin-bottom: 80px;
	border-bottom: 1px solid var(--rk-grey-200, #E9E7E9);
}

.rkcrm-tabs__tab {
	position: relative;
	padding: 0 0 12px;
	background: none;
	border: 0;
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	color: var(--rk-ink, #373538);
	cursor: pointer;
}

.rkcrm-tabs__tab.is-active {
	font-weight: 700;
	color: var(--rk-red, #E30A0B);
}

.rkcrm-tabs__tab.is-active::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 4px;
	background: var(--rk-red, #E30A0B);
}

.rkcrm-tabs__tab:focus-visible {
	outline: 2px solid var(--rk-red, #E30A0B);
	outline-offset: 4px;
}

/* Kortgitter — 276px kort, 32px mellemrum, centreret */
.rkcrm-people__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rkcrm-people__list > li {
	width: 276px;
	margin: 0;
}

/* Personkort — "Ansat" */
.rkcrm-person {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	isolation: isolate;
}

.rkcrm-person__photo {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	width: 140px;
	height: 140px;
	margin-bottom: -70px;
	border: 1px solid var(--rk-gray, #F7F7F5);
	border-radius: 999px;
	object-fit: cover;
}

.rkcrm-person__photo--initials {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rk-red-200, #FFDEDE);
	color: var(--rk-red, #E30A0B);
	font-size: 30px;
	line-height: 38px;
	font-weight: 700;
}

.rkcrm-person__card {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 20px;
	flex: 1;
	width: 100%;
	padding: 110px 20px 20px;
	background: var(--rk-gray, #F7F7F5);
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	color: var(--rk-ink, #373538);
	overflow-wrap: anywhere;
}

.rkcrm-person__name {
	margin: 0;
	font-size: 18px;
	line-height: 26px;
	font-weight: 700;
	color: var(--rk-ink, #373538);
}

.rkcrm-person__role {
	font-size: 14px;
	line-height: 22px;
	color: var(--rk-grey-600, #5A585B);
}

.rkcrm-person__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rkcrm-person__chips li {
	padding: 2px 8px;
	background: var(--rk-white, #FFFFFF);
	border-radius: 999px;
	font-size: 12px;
	line-height: 20px;
	color: #333;
}

/* rk_contact_details() i kortet: lodret, 12px mellem linjerne */
.rkcrm-person .rk-contact__details {
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
}

@media (max-width: 767px) {
	.rkcrm-people {
		width: calc(100% - 32px);
	}

	.rkcrm-tabs {
		margin-bottom: 48px;
		gap: 24px;
	}

	/* To kort pr. række (Figma 382:20855: 172,5px kort med 16px imellem i en
	   361px bred spalte) — ikke ét i fuld bredde. */
	.rkcrm-people__list {
		gap: 16px;
		justify-content: flex-start;
	}

	.rkcrm-people__list > li {
		width: calc(50% - 8px);
		max-width: none;
	}

	/* Kortet skrumper med (Figma I382:20856;312:20192): portrættet er 64px og
	   overlapper med 35px, teksten er 16/24 og 12/20, og kontaktlinjerne har
	   12px ikoner. */
	.rkcrm-person__photo {
		width: 64px;
		height: 64px;
		margin-bottom: -35px;
	}

	.rkcrm-person__photo--initials {
		font-size: 16px;
	}

	.rkcrm-person__card {
		gap: 20px;
		padding: 48px 16px 16px;
	}

	.rkcrm-person__name {
		font-size: 16px;
		line-height: 24px;
	}

	.rkcrm-person__role {
		font-size: 12px;
		line-height: 20px;
	}

	.rkcrm-person .rk-contact__details {
		gap: 4px;
	}

	.rkcrm-person .rk-contact__detail {
		gap: 4px;
		font-size: 12px;
		line-height: 20px;
	}

	.rkcrm-person .rk-contact__detail svg {
		width: 12px;
		height: 12px;
	}
}
