/**
 * THEME TOKENS (AB#17465).
 *
 * Every visual decision a tenant might want to move is a custom property on the
 * widget roots, and every rule below consumes the property. The FALLBACKS ARE
 * TODAY'S VALUES, so a site that sets nothing renders byte-for-byte what it
 * rendered before this existed - tokens are an override surface, not a redesign.
 *
 * A tenant sets them through the css params that already exist on every widget:
 *
 *     [diverp_partner css=".diverp-partner{--diverp-accent:#1f7a5c}"]
 *
 * or site-wide via the filters. One block of properties instead of overriding N
 * selectors - which is the entire case for tokens, and why this waited until
 * two widgets existed to prove the selectors would otherwise multiply.
 */
:root {
	--diverp-muted: 0.7;
	--diverp-hairline: color-mix(in srgb, currentColor 20%, transparent);
	--diverp-avatar-bg: color-mix(in srgb, currentColor 20%, transparent);
	--diverp-accent: currentColor;
	--diverp-gap: 0.5rem;
}

/**
 * Structure for the partner space (AB#17470).
 *
 * Layout only. No fonts, no brand colours, no borders that assert a look - the
 * page is inside a dive centre's own theme and inherits its typography, its
 * headings and its palette. What is here is the part no theme can supply,
 * because no theme knows this markup exists: the shape of a list of agreements
 * and the states a region passes through while it is filling.
 *
 * Every selector is scoped to diverp-partner. A tenant who wants more says so
 * through the widget's own css option.
 */

.diverp-partner__section {
	margin: 0 0 2.5rem;
}

.diverp-partner__heading {
	margin: 0 0 0.75rem;
}

.diverp-partner__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.diverp-partner__item {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid rgba(127, 127, 127, 0.25);
	border-bottom: 1px solid var(--diverp-hairline, color-mix(in srgb, currentColor 20%, transparent));
}

.diverp-partner__item:last-child {
	border-bottom: 0;
}

.diverp-partner__item-title {
	font-weight: 600;
}

.diverp-partner__badge {
	font-size: 0.82em;
	opacity: var(--diverp-muted, 0.75);
	white-space: nowrap;
}

.diverp-partner__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 600;
}

.diverp-partner__share {
	font-size: 0.9em;
	word-break: break-all;
}

.diverp-partner__name {
	font-size: 1.15em;
	font-weight: 600;
	margin: 0 0 0.25rem;
}

.diverp-partner__tenant,
.diverp-partner__email {
	margin: 0 0 0.25rem;
	opacity: var(--diverp-muted, 0.8);
}

.diverp-partner__handles {
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
	opacity: var(--diverp-muted, 0.8);
}

/* Loading, empty and failed all read as deliberate states rather than as a
   broken page. `aria-busy` is not used: the regions fill independently and a
   reader should not be told the whole page is busy because one list is. */
.diverp-partner__loading,
.diverp-partner__empty,
.diverp-partner__error {
	margin: 0;
	opacity: var(--diverp-muted, 0.7);
}

.diverp-partner__guard {
	padding: 1.5rem 0;
}

/* --- board and agreement detail (AB#17483/AB#17486) --- */

.diverp-partner__stage {
	margin: 0 0 1.5rem;
}

.diverp-partner__stage-name {
	margin: 0 0 0.5rem;
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: var(--diverp-muted, 0.75);
}

.diverp-partner__count {
	opacity: 0.6;
}

/* A button that reads as a link, because it opens a panel rather than
   navigating - the appearance follows the behaviour the reader gets, and the
   element follows what it actually does. */
.diverp-partner__open,
.diverp-partner__back {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	text-decoration: underline;
	cursor: pointer;
}

.diverp-partner__back {
	margin: 0 0 1rem;
	text-decoration: none;
	opacity: var(--diverp-muted, 0.8);
}

.diverp-partner__targets,
.diverp-partner__deliverables,
.diverp-partner__milestones {
	margin: 1.5rem 0 0;
}

.diverp-partner__targets h4,
.diverp-partner__deliverables h4,
.diverp-partner__milestones h4 {
	margin: 0 0 0.5rem;
}

.diverp-partner__reward {
	font-weight: 600;
}

.diverp-partner__document {
	margin: 1.5rem 0 0;
}

.diverp-partner__hint {
	opacity: var(--diverp-muted, 0.7);
	font-size: 0.9em;
}

/* The campaign window beside its name (AB#17484). Quiet: it is context, not
   the thing the reader came to click. */
.diverp-partner__window {
	font-size: 0.85em;
	opacity: var(--diverp-muted, 0.7);
	white-space: nowrap;
}

/* --- the write forms (AB#17489/AB#17490) --- */
.diverp-partner__form {
	display: flex;
	flex-direction: column;
	gap: var(--diverp-gap, 0.5rem);
	margin: 0.5rem 0 0;
	max-width: 26rem;
}
.diverp-partner__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.diverp-partner__kinds {
	display: flex;
	gap: 1rem;
}
.diverp-partner__claim {
	font-size: 0.9em;
}
