/*
 * Favorites: the star on a photo, and the "★ n" counter beside a name.
 * Colours come from the page's own tokens (--spk-* on a profile, ACSS
 * elsewhere), with fallbacks, so it follows a speaker's theme.
 */
.mmpsb-sr {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.mmpsb-fav {
	--fav-ink: var(--spk-ink, var(--text-light, oklch(0.98 0 0)));
	--fav-on: var(--mmpsb-star, oklch(0.86 0.17 92)); /* yellow, fixed: it does not follow a speaker's theme */

	position: absolute;
	inset-block-start: 0.75rem;
	inset-inline-end: 0.75rem;
	z-index: 3;
	display: grid;
	place-items: center;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	padding: 0;
	border: 1px solid color-mix(in oklch, var(--fav-ink) 35%, transparent);
	border-radius: 50%;
	background: color-mix(in oklch, oklch(0.2 0 0) 55%, transparent);
	backdrop-filter: blur(8px);
	color: var(--fav-ink);
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.mmpsb-fav svg {
	inline-size: 1.25rem;
	block-size: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linejoin: round;
}

.mmpsb-fav:hover,
.mmpsb-fav:focus-visible {
	transform: scale(1.08);
	outline: 2px solid var(--fav-on);
	outline-offset: 2px;
}

.mmpsb-fav[aria-pressed="true"] {
	color: var(--fav-on);
}

.mmpsb-fav[aria-pressed="true"] svg {
	fill: currentColor;
}

.mmpsb-fav[aria-busy="true"] {
	opacity: 0.6;
	pointer-events: none;
}

.mmpsb-favcount {
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	font-size: 0.8em;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	white-space: nowrap;
	opacity: 0.9;
}

.mmpsb-favcount__star {
	color: var(--mmpsb-star, oklch(0.86 0.17 92));
}

/* Archive/home cards: the <li> is the positioning parent so the star is a sibling of the card link, never inside it. */
.mb-speakers-item {
	position: relative;
}

@media (prefers-reduced-motion: reduce) {
	.mmpsb-fav {
		transition: none;
	}
}

/* Profile: the star sits on the portrait's top-right corner. */
.speaker-sidebar__image-frame,
.speaker-sidebar__star-only {
	position: relative;
}

.speaker-sidebar__star-only {
	min-block-size: 3.5rem;
}

.speaker-content__favorites {
	margin-block: 0.25rem 0.75rem;
}

/* Comment gate: shown to guests and to members who have not confirmed their email. */
.mmp-cform__gate {
	display: grid;
	gap: 0.75rem;
}

.mmp-cform__gate-text {
	margin: 0;
}

.mmp-cform__gate .mmp-cform__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin: 0;
}

.mmp-cform__gate a.mmp-cform__submit {
	text-decoration: none;
}

.mmp-cform__link {
	color: inherit;
	text-underline-offset: 0.2em;
}

/* Etch cards: glyph star (no SVG in the markup) and the positioning parents. */
.mb-home-cards__item,
.mb-home-feat {
	position: relative;
}

/* The featured slide's photo is a 70px thumbnail: the star goes on the card's corner, not on the face. */
.mb-home-feat .mmpsb-fav {
	inset-block-start: 0.6rem;
	inset-inline-end: 0.6rem;
	inline-size: 2rem;
	block-size: 2rem;
	font-size: 1rem;
}

.mmpsb-fav--glyph {
	font-size: 1.25rem;
	line-height: 1;
}

.mmpsb-fav--glyph .mmpsb-fav__on,
.mmpsb-fav--glyph[aria-pressed="true"] .mmpsb-fav__off {
	display: none;
}

.mmpsb-fav--glyph[aria-pressed="true"] .mmpsb-fav__on {
	display: inline;
}

.mb-speakers-card__name .mmpsb-favcount,
.mb-home-card__name .mmpsb-favcount,
.mb-home-feat__name .mmpsb-favcount {
	margin-inline-start: 0.5em;
	vertical-align: middle;
}

/* "My favorites 3": the number reads as a badge on the chip. */
.mmpsb-chipcount {
	display: inline-block;
	min-inline-size: 1.4em;
	margin-inline-start: 0.4em;
	padding-inline: 0.45em;
	border-radius: 999px;
	background: color-mix(in oklch, currentColor 14%, transparent);
	font-size: 0.85em;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

/* No photo to sit on: the star flows beside the counter. */
.mmpsb-fav--inline {
	position: static;
	display: inline-grid;
	vertical-align: middle;
	margin-inline-end: 0.5rem;
}

/* Profile header: star and counter sit beside the name, like a logo mark. */
.speaker-header__favorites {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-inline: 0.75rem auto; /* auto end: absorbs the header's free space so the buttons stay right and this stays by the name */
}

.speaker-header__favorites .mmpsb-fav--inline {
	margin-inline-end: 0;
	inline-size: 2rem;
	block-size: 2rem;
}

.speaker-header__favorites .mmpsb-fav svg {
	inline-size: 1rem;
	block-size: 1rem;
}
