/**
 * BuddyNext Pro — shared suite "Portfolio" profile panel.
 *
 * One tab, many integration sections. BuddyNext design tokens only; relies on
 * the shared .bn-card / .bn-link primitives. Responsive to 390px.
 */

.bn-suite-portfolio {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.bn-suite-panel {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.1rem;
}

.bn-suite-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.bn-suite-panel__title {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-size: var(--bn-text-lg);
	font-weight: var(--bn-fw-semibold);
	color: var(--bn-ink);
}

.bn-suite-panel__title svg {
	width: 1.1rem;
	height: 1.1rem;
	color: var(--bn-ink-3);
}

/* Count chip — matches BN's .bn-tab__count pill. */
.bn-suite-panel__count {
	font-size: var(--bn-text-2xs);
	font-weight: var(--bn-fw-medium);
	color: var(--bn-ink-3);
	background: var(--bn-sunken);
	padding: 1px 6px;
	border-radius: var(--bn-r-full);
}

.bn-suite-panel__actions {
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
	flex-wrap: wrap;
}

.bn-suite-panel__cta {
	font-size: var(--bn-text-sm);
	white-space: nowrap;
}

.bn-suite-panel__manage {
	font-size: var(--bn-text-sm);
	font-weight: var(--bn-fw-semibold);
	white-space: nowrap;
}

.bn-suite-panel__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.bn-suite-panel__item {
	margin: 0;
	padding: 0;
}

/* Whole-row link reads as a card; hover lifts a subtle surface. */
.bn-suite-panel__item-link {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.55rem 0.6rem;
	margin: 0 -0.6rem;
	border-radius: var(--bn-radius-md);
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

a.bn-suite-panel__item-link:hover,
a.bn-suite-panel__item-link:focus-visible {
	background: var(--bn-surface-2);
	outline: none;
}

.bn-suite-panel__item-link.is-static {
	cursor: default;
}

/* Thumbnail or icon tile — fixed square keeps rows aligned. */
.bn-suite-panel__thumb {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: var(--bn-radius-md);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bn-surface-soft);
}

.bn-suite-panel__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Monogram fallback — a solid tone tile with initials, mirroring BN's avatar
   language. Deterministic tone per row (seeded from company/title) so rows read
   distinct instead of repeating the section icon. */
.bn-suite-panel__thumb.is-mono {
	color: #fff;
	font-weight: var(--bn-fw-semibold);
	font-size: var(--bn-text-sm);
	letter-spacing: 0.02em;
	background: oklch(58% var(--bn-chroma) 240);
}

.bn-suite-panel__thumb.is-mono[data-tone="1"] { background: oklch(58% var(--bn-chroma) 240); }
.bn-suite-panel__thumb.is-mono[data-tone="2"] { background: oklch(58% var(--bn-chroma) 155); }
.bn-suite-panel__thumb.is-mono[data-tone="3"] { background: oklch(58% var(--bn-chroma) 290); }
.bn-suite-panel__thumb.is-mono[data-tone="4"] { background: oklch(60% var(--bn-chroma) 60); }
.bn-suite-panel__thumb.is-mono[data-tone="5"] { background: oklch(60% var(--bn-chroma) 350); }
.bn-suite-panel__thumb.is-mono[data-tone="6"] { background: oklch(58% var(--bn-chroma) 195); }
.bn-suite-panel__thumb.is-mono[data-tone="7"] { background: oklch(56% var(--bn-chroma) 270); }
.bn-suite-panel__thumb.is-mono[data-tone="8"] { background: oklch(58% var(--bn-chroma) 25); }

.bn-suite-panel__item-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

/* Title row: the title takes the room and truncates; an optional highlight
   (e.g. a salary range) holds the end of the line as a compact emphasis. */
.bn-suite-panel__item-line {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	min-width: 0;
}

.bn-suite-panel__item-title {
	color: var(--bn-ink);
	font-weight: var(--bn-fw-medium);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bn-suite-panel__item-line .bn-suite-panel__item-title {
	flex: 1 1 auto;
	min-width: 0;
}

.bn-suite-panel__item-highlight {
	flex: 0 0 auto;
	margin-inline-start: auto;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	font-size: var(--bn-text-sm);
	font-weight: var(--bn-fw-semibold);
	color: var(--bn-ink);
	white-space: nowrap;
}

.bn-suite-panel__item-highlight svg {
	width: 0.9em;
	height: 0.9em;
	flex: 0 0 auto;
}

.bn-suite-panel__item-link:hover .bn-suite-panel__item-title,
.bn-suite-panel__item-link:focus-visible .bn-suite-panel__item-title {
	color: var(--bn-accent);
}

.bn-suite-panel__item-meta {
	font-size: var(--bn-text-sm);
	color: var(--bn-ink-3);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Each fact is an indivisible unit; the spaced middot between facts is the only
   place the line may break (so a fact never splits mid-word, and on mobile the
   row wraps cleanly between facts). */
.bn-suite-panel__fact {
	white-space: nowrap;
}

.bn-suite-panel__fact-sep {
	color: var(--bn-ink-4);
}

.bn-suite-panel__item-go {
	flex: 0 0 auto;
	display: inline-flex;
	color: var(--bn-ink-4);
	transition: transform 0.15s ease, color 0.15s ease;
}

.bn-suite-panel__item-go svg {
	width: 1rem;
	height: 1rem;
}

.bn-suite-panel__item-link:hover .bn-suite-panel__item-go {
	transform: translateX(2px);
	color: var(--bn-accent);
}

@media (max-width: 640px) {
	.bn-suite-panel__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.4rem;
	}

	.bn-suite-panel__thumb {
		width: 44px;
		height: 44px;
	}

	/* Mobile: horizontal room is scarce but vertical room is cheap, so let the
	   facts wrap to show every signal instead of truncating to one line. Each
	   fact stays intact (nowrap above); only the row between facts breaks. */
	.bn-suite-panel__item-meta {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
	}

	/* Phones are too narrow to share the title row with the salary without
	   crushing the title, so stack the salary on its own line beneath it - the
	   title gets the full width and the salary still reads prominently. */
	.bn-suite-panel__item-line {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.1rem;
	}

	.bn-suite-panel__item-highlight {
		margin-inline-start: 0;
	}
}
