/**
 * Inoforest Bio Profile
 *
 * Contents
 * 1. Card (variables)
 * 2. Cover photo, Share button
 * 3. Photo, ring and its label
 * 4. Name, handle, bio, social links
 * 5. Start alignment, no cover, reduced motion
 *
 * Colours read the Design System (--inoforest-color-*) with fallbacks. Style-tab controls target the parts with three
 * classes, one more than the rules here, so a choice in the panel always wins.
 */

/* 1. Card ------------------------------------------------------------------- */
.inoforest-bio-profile {
	--ino-bp-primary: var(--inoforest-color-primary, #0b7a75);
	--ino-bp-heading: var(--inoforest-color-heading, #0d1b2a);
	--ino-bp-gutter: 24px;
	--ino-bp-photo: 128px;
	--ino-bp-overlap: 64px;
	--ino-bp-frame: 4px;
	--ino-bp-frame-color: #fff;
	--ino-bp-ring: 4px;
	--ino-bp-ring-1: var(--ino-bp-primary);
	--ino-bp-ring-2: #e0a43a;
	--ino-bp-ring-3: var(--inoforest-color-accent, #ff6a3d);
	position: relative;
	padding-bottom: 26px;
	overflow: hidden;
	text-align: center;
	background-color: var(--inoforest-color-background, #fff);
	border-radius: 24px;
	box-shadow: 0 6px 20px rgba(13, 27, 42, 0.08);
}

/* 2. Cover photo, Share button ------------------------------------------------------ */
.inoforest-bio-profile .inoforest-bio-profile__cover {
	aspect-ratio: 1000 / 400;
	background-color: var(--inoforest-color-surface, #f4f6f8);
}

/* Two classes to beat Elementor's `.elementor img` reset. */
.inoforest-bio-profile__cover .inoforest-bio-profile__cover-image {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

.inoforest-bio-profile .inoforest-bio-profile__share {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	z-index: 2;
	display: grid;
	justify-items: end;
	gap: 6px;
}

.inoforest-bio-profile .inoforest-bio-profile__share-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	margin: 0;
	padding: 0 16px;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ino-bp-heading);
	cursor: pointer;
	background-color: color-mix(in srgb, #fff 92%, transparent);
	border: 1px solid var(--inoforest-color-border, #e3e9ee);
	border-radius: 999px;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.inoforest-bio-profile .inoforest-bio-profile__share-button:hover,
.inoforest-bio-profile .inoforest-bio-profile__share-button:focus-visible {
	color: #fff;
	background-color: var(--ino-bp-primary);
}

.inoforest-bio-profile__share-button svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.inoforest-bio-profile .inoforest-bio-profile__copied {
	padding: 4px 12px;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.7;
	color: #fff;
	background-color: var(--inoforest-color-secondary, #0d1b2a);
	border-radius: 999px;
}

.inoforest-bio-profile .inoforest-bio-profile__copied[hidden] {
	display: none;
}

/* 3. Photo, ring and its label ---------------------------------------------------
   The photo sits on the first line's baseline, as an inline image does, so the line's descent is the space under it. */
.inoforest-bio-profile .inoforest-bio-profile__avatar {
	position: relative;
	z-index: 1;
	display: inline-block;
	margin-top: calc(var(--ino-bp-overlap) * -1);
	padding: var(--ino-bp-ring);
	background-color: var(--ino-bp-frame-color);
	border-radius: 50%;
}

.inoforest-bio-profile:where([data-ring="yes"]) .inoforest-bio-profile__avatar {
	background-image: conic-gradient(from 210deg, var(--ino-bp-ring-1), var(--ino-bp-ring-2), var(--ino-bp-ring-3), var(--ino-bp-ring-1));
}

.inoforest-bio-profile__avatar .inoforest-bio-profile__photo {
	display: block;
	box-sizing: border-box;
	width: var(--ino-bp-photo);
	max-width: none;
	height: var(--ino-bp-photo);
	object-fit: cover;
	border: var(--ino-bp-frame) solid var(--ino-bp-frame-color);
	border-radius: 50%;
}

.inoforest-bio-profile .inoforest-bio-profile__ring-label {
	position: absolute;
	bottom: -6px;
	left: 50%;
	padding: 2px 10px;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #fff;
	background-color: var(--ino-bp-primary);
	border: 2px solid var(--ino-bp-frame-color);
	border-radius: 999px;
	transform: translateX(-50%);
}

/* 4. Name, handle, bio, social links ----------------------------------------------- */
.inoforest-bio-profile .inoforest-bio-profile__name {
	margin: 14px 0 2px;
	padding: 0 var(--ino-bp-gutter);
	font-family: var(--inoforest-font-heading-family, inherit);
	font-size: 1.9rem;
	font-weight: var(--inoforest-font-heading-weight, 600);
	line-height: 1.15;
	color: var(--ino-bp-heading);
}

.inoforest-bio-profile .inoforest-bio-profile__handle {
	margin: 0;
	padding: 0 var(--ino-bp-gutter);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--inoforest-color-muted, var(--inoforest-color-text, #5a6a79));
}

.inoforest-bio-profile .inoforest-bio-profile__bio {
	max-width: 42ch;
	margin: 12px auto 18px;
	padding: 0 var(--ino-bp-gutter);
	box-sizing: border-box;
}

.inoforest-bio-profile .inoforest-bio-profile__social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	padding: 0 var(--ino-bp-gutter);
}

.inoforest-bio-profile .inoforest-bio-profile__social-link {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	font-size: 17px;
	color: var(--ino-bp-heading);
	background-color: var(--inoforest-color-surface, #f4f6f8);
	border-radius: 50%;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.inoforest-bio-profile .inoforest-bio-profile__social-link:hover,
.inoforest-bio-profile .inoforest-bio-profile__social-link:focus-visible {
	color: #fff;
	background-color: var(--ino-bp-primary);
}

.inoforest-bio-profile__social-link svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* 5. Start alignment, no cover, reduced motion ------------------------------------------ */
.inoforest-bio-profile:where([data-align="start"]) {
	text-align: start;
}

.inoforest-bio-profile:where([data-align="start"]) .inoforest-bio-profile__avatar {
	margin-inline-start: 20px;
}

.inoforest-bio-profile:where([data-align="start"]) .inoforest-bio-profile__bio {
	margin-inline: 0;
}

.inoforest-bio-profile:where([data-align="start"]) .inoforest-bio-profile__social {
	justify-content: flex-start;
}

.inoforest-bio-profile:where([data-layout="plain"]) .inoforest-bio-profile__avatar {
	margin-top: 36px;
}

@media (prefers-reduced-motion: reduce) {
	.inoforest-bio-profile .inoforest-bio-profile__share-button,
	.inoforest-bio-profile .inoforest-bio-profile__social-link {
		transition: none;
	}
}
