/**
 * The theme's own chrome: cards, menus, sidebar, widgets, everything around the content.
 *
 * The content itself lives in ds-content.css (shared with the block editor), and rules general
 * enough to be framework rules live in the foundation fork at
 * spaces-markup/vendor/dol-lab/foundation-sites-template. Only this file is front-end only,
 * which is why it may nest freely.
 */

.defaultspace-settings-container ul:not(.tabs) {
	font-size: 0.9rem;

	/* Foundation's .radio sets 1rem; plugins' options take the menu's size instead. */
	& .radio {
		font-size: inherit;
	}
}

@view-transition {
	navigation: auto;
}

/* ! not in use? */
.info-label {
	font-size: 16.5px;
	font-weight: 300;
	color: var(--f-color-text-2);
	padding-bottom: 4px;
}

.info-content {
	color: var(--f-color-text-1);
	/* font-size: 0.85rem; */
}

h1 i {
	/* icons in post header */
	margin-right: 10px;
}

.widget ul:last-child {
	/* avoid bottom whitespace in list widgets */
	margin-bottom: 0;
}

/* don't show the default post status */
.type-post.status-publish .post-status-icon-publish {
	display: none;
}

/*
 * The status icon of a page title or menu item is a quiet mark, not a second headline: muted, and one size
 * in both places (rem: the title shrinks on small screens, the menu does not). Free has no outline lock.
 */
.page-title .post-status-icon,
.ds-nav-menu .post-status-icon {
	font-size: 0.875rem;
	color: var(--f-color-text-2);
	opacity: 0.9;
}

/* After a title (keeping its left edge in line with the content), raised past the glyph's descent onto the baseline. */
.page-title .post-status-icon {
	margin-left: 0.6em;
	vertical-align: 0.15em;
}

/* Taller than the menu's capitals, so the glyph's own descent centres it on them. */
.ds-nav-menu .post-status-icon {
	vertical-align: 0;
}

/* A post that is not published says so across its own body; each state only names its word. */
.status-draft,
.post-attribute-preview,
.status-trash {
	&:after {
		content: var(--ds-watermark);
		width: 100%;
		position: absolute;
		color: var(--f-color-text-0);
		opacity: 0.15;
		font-size: 60px;
		transform: translateX(20%) rotate(-6deg) translateY(4%);
		mix-blend-mode: multiply;
		pointer-events: none;
	}
}

/* A page card or section clips its overflow and can be a single line high: give the word room to show. */
.type-page:is(.status-draft, .post-attribute-preview, .status-trash) {
	position: relative;
	min-height: 7rem;

	&:after {
		top: 0;
		left: 0;
	}
}

.status-draft {
	--ds-watermark: "DRAFT";
}

.post-attribute-preview {
	--ds-watermark: "PREVIEW";
}

.status-trash {
	--ds-watermark: "TRASHED";

	&:after {
		color: var(--f-color-danger);
		opacity: 0.5;
	}
}

/* While it is being written it is obviously a draft. */
:is(.status-draft, .post-attribute-preview, .status-trash).editing {
	--ds-watermark: "";
}

/* Comment drafts live in the browser (js/ds-comment-drafts.js): without a post draft the button waits for one. */
html:not(.ds-has-comment-drafts) .ds-comment-drafts-only {
	display: none !important;
}

/* The comment drafts on /status/draft/, one card for all: each the post it answers, then the draft laid out as a comment. */
.ds-comment-drafts {
	position: relative;

	& > .card-divider {
		flex-wrap: wrap;
		align-items: baseline;
		gap: 0 0.5rem;
	}

	& .ds-comment-draft {
		border-top: 1px solid var(--f-color-border-0);
	}

	& .ds-comment-draft-text {
		-webkit-line-clamp: 6;
		line-clamp: 6;
		white-space: pre-line;
	}
}

.grid-container.current-space-header {
	margin-bottom: 8px;
	margin-top: 40px;
}

p:has(.fe-read-more),
.fe-read-more {
	/* legacy support for old read-more tags... recreate old excerpts */
	display: none;
}

/*
 * The two states of a post card.
 *
 * A card is rendered once and carries everything both states need (see
 * concept-post-card-expand.md and ds_get_post_card()). `.overview` is the collapsed state in the
 * stream, `.full` the opened one; everything below is what the two look like, and nothing here
 * may depend on markup the server only sends in one of them.
 */

/* Height of a collapsed post. A site overrides it on :root, e.g. in the Customizer's Additional CSS. */
:root {
	--ds-max-excerpt-height: 38vh;
}

.post-card.overview .post-content {
	max-height: var(--ds-max-excerpt-height);
	position: relative;
	overflow: hidden;
}

.post-card.overview.sticky .post-content {
	--ds-max-excerpt-height: 10vh;
}

.post-card.overview .post-content:has(.fe-read-more) .ds-read-more {
	/* this is legacy-support... */
	display: block;
}

/*
 * The author's own cut. With the whole post in the card, core marks the <!--more--> position with
 * a <span id="more-{ID}">, so the collapsed state hides everything behind it: the cut is honoured
 * exactly where it was made, and opening the card costs no request. The read-more button and
 * anything a plugin appended are not part of the post and stay.
 */
.post-card.overview .post-content > span[id^="more-"] ~ *:not(.ds-read-more-wrapper, .after-post-content),
.post-card.overview .post-content > *:has(> span[id^="more-"]) ~ *:not(.ds-read-more-wrapper, .after-post-content) {
	display: none;
}

/* There is provably more to read, so the button shows even if the teaser is short. */
.post-card.overview.has-more-tag .ds-read-more {
	display: block;
}

/* No read-more if the content ends 2vh or more short of the cap (see .ds-read-more-wrapper). */
@container (height < 2vh) {
	.post-card .ds-read-more {
		display: none;
	}
}

/*
 * Areas (concept-post-card-expand.md §4): a section the server left for the client to fill. It is
 * an empty placeholder until then, and comments belong to the open card either way — a filled area
 * stays in the DOM when the card collapses again, so the state, not the data, decides who sees it.
 */
.post-card .card-section[data-area-state="deferred"],
.post-card.overview .section_comments,
.post-card.overview .section_comment_editor {
	display: none;
}

/* Read more and the default category belong to the collapsed state. */
.post-card:not(.overview) .ds-read-more-wrapper,
.post-card.overview .info-chip-default-term {
	display: none;
}

/*
 * So do the stacked comment avatars: the open card lists the comments themselves. The list carries
 * the `flex` utility (`display: flex !important`), so this needs the same weapon — and it needs to
 * win, or the avatars flying into their comments would pair with themselves (tagCommentAvatars()
 * takes the first *visible* avatar per comment id).
 */
.post-card:not(.overview) .avatar-stack {
	display: none !important;
}

/* The editor says "add a comment" better than the link does (see $comment_footer_class). */
.post-card:not(.overview) .comment-footer.few-comments .respond-link {
	display: none;
}

/* A chip list (or its whole section) that is left with nothing visible takes up no room. */
.post-card.overview .info-chips:not(:has(.info-chip:not(.info-chip-default-term))),
.post-card.overview .section_many_taxonomies:not(:has(.info-chip:not(.info-chip-default-term))) {
	display: none;
}

/*
 * Smoothly grow the feature image when the card changes from overview to full content.
 * Only the post's own image: Space cards in its content carry the same classes.
 */
.post-card > .clipped.feature-image {
	height: 150px;
	transition: height 0.4s ease;
}

.post-card:not(.overview) > .clipped.feature-image {
	height: 200px;
}

/* Container queries can't read variables, so the height does the math: 4vh when clipped, < 2vh when short. */
.post-card.overview .post-content .ds-read-more-wrapper {
	container-type: size;
	height: calc(100% - var(--ds-max-excerpt-height) + 4vh);
	pointer-events: none;
	position: absolute;
	bottom: 0;
	width: 100%;
	z-index: 10;

	& .ds-read-more {
		--f-focus-offset: var(--f-focus-inset); /* it spans the clipped content */

		position: absolute;
		pointer-events: all;
		padding: 0;
		/* extends the shadow to the left, in case there is a full-width-image. */
		box-shadow: -80px 60px 15px 80px var(--ds-card-color, var(--f-color-bg-1));
		inset-inline: 0;
		bottom: 0;
		justify-content: start;
		text-align: left !important;
		font-weight: normal;
		background-color: var(--ds-card-color, var(--f-color-bg-1));
		color: var(--f-color-brand-text);
	}
}

.post-card.loading .ds-read-more {
	pointer-events: none;
 	&::after {
		content: '';
		display: inline-block;
		width: 0.7em;
		height: 0.7em;
		border: 1.5px solid currentColor;
		border-right-color: transparent;
		border-radius: 50%;
		animation: spin 0.6s linear infinite;
		margin-left: 0.45em;
		vertical-align: middle;
	}
}

.page-card,
.report-card {
	& .prose-layout {
		--f-prose-offset-left: 1fr;
	}
}

/* A page in the search results shows a short excerpt, not prose: it lines up with the title. */
.page-section.page-excerpt .prose-layout {
	display: block;
	padding-inline: var(--f-spacing-3);

	& > :last-child {
		margin-bottom: 0;
	}
}

.page-excerpt-protected {
	color: var(--f-color-text-2);
}

.spaces-editor-comment-form .ck-editor__main,
.user-generated.comment-content {
	--f-prose-offset-left: 48px;
}

.section_comments {
	& .editing #comment-submit {
		border-radius: 0;
	}

	& .card-header {
		justify-content: center;
	}
}

/* Linked-image affordance: a corner badge replaces the inline text-link icon on images. */
.user-generated a.image-link {
	position: relative;
	display: inline-block;
}

/* Never let the inline text-link icon render over image content. */
.user-generated a.image-link::after,
.user-generated a.image-link::before {
	content: none !important;
}

/* Position and colours shared with the PDF badge in ds-content.css. */
.user-generated a.image-link .image-link-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	pointer-events: none;
}

.user-generated a.image-link .image-link-badge svg {
	width: 15px;
	height: 15px;
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.comment-content img {
	max-height: 40vh;
	width: auto;
	margin: 0.5em 0;
}

.comment-content iframe {
	padding: 0.5em 0;
}

.comment-content .card-header {
	padding-bottom: 0.5rem;
}

.card-section.section_many_taxonomies {
	border-top: none;
	background-position: bottom;
	/* border-bottom: 1px solid var(--f-color-border-0); */

	& > .info-chips {
		flex-direction: row-reverse;
		flex-wrap: wrap-reverse !important;
	}
}

.space-header .privacy-icon.visible-registered-users-network {
	/* hide the default privacy icon in space-cards. ask leon :) */
	display: none;
}

.space-description-content {
	overflow-wrap: break-word;
	font-size: 0.9rem;
}

.space-description-overflow {
	position: relative;
	max-height: 250px;
	overflow: hidden;
	transition: max-height 0.5s ease;
}

.space-description-wrapper.extended .space-description-overflow {
	max-height: 3000px;
	padding-bottom: 20px;
}

.space-description-wrapper .read {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	margin: 0;
}

.space-description-wrapper:not(.extended) .read {
	padding-top: 60px;
	background-image: linear-gradient(
		to bottom,
		transparent,
		var(--f-color-bg-1) 70%
	);
}

.space-description-wrapper:not(.has-overflow) .read,
.space-description-wrapper.extended .read-more,
.space-description-wrapper:not(.extended) .read-less {
	display: none;
}

.space-description-overflow.is-mobile-search-page {
	max-height: 80px;
}

.add-header-image {
	position: absolute;
	right: 0.75rem;
	bottom: 0.75rem;
	width: 36px;
	height: 36px;
	display: flex;
}

/*
 * The header's bar (ds_get_space_bar_markup()): the header image and the bar read as one card, the
 * sidebar's menu cards in it, the notices at its end.
 */
.ds-has-space-bar {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* An auto column grows with the bar's content, past the page. */

	/* The add-header button shares the image's row, so it keeps to the image's corner, not the bar's. */
	& > .card.current,
	& > .add-header-image {
		grid-area: 1 / 1;
	}

	& > .add-header-image {
		position: relative;
		inset: auto;
		z-index: 1;
		align-self: end;
		justify-self: end;
		margin: 0.75rem;
	}
}

.ds-has-space-bar > .card.current {
	margin-bottom: 0;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;

	/* Across the page a 200px frame would crop most of the image: show it whole, at its own ratio. */
	& > .space-header:has(> .header-image[src]:not([src=""])) {
		height: auto;
		max-height: none;

		& > .header-image {
			position: static;
			height: auto;
		}
	}
}

.ds-space-bar {
	position: relative;
	border-top-left-radius: 0;
	border-top-right-radius: 0;

	/*
	 * Its items keep their width, so initSpaceBar() can tell when they overflow it. What still does not fit
	 * scrolls sideways as one strip. The dropdowns are placed in the bar, outside this box, so it does not clip them.
	 */
	& .ds-space-bar-start {
		display: flex;
		flex: 1 1 auto;
		align-items: center;
		min-width: 0;
		padding-inline: 0.5rem;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: none;

		@media (prefers-reduced-motion: no-preference) {
			scroll-behavior: smooth;
		}

		& > * {
			flex: none;
		}
	}

	/* A plugin's item (ds_space_bar_items) takes the rest of the bar and scrolls with it. */
	& .ds-space-bar-start > .ds-space-bar-item {
		flex: 1 0 auto;
	}

	/* An edge with more to scroll to fades out. Without overflow the scroll timeline is inactive and so are the fades. */
	@supports (animation-timeline: scroll()) {
		& .ds-space-bar-start::before,
		& .ds-space-bar-start::after {
			content: "";
			position: sticky;
			z-index: 1;
			flex: none;
			align-self: stretch;
			width: 2rem;
			pointer-events: none;
			opacity: 0;
			animation: ds-edge-fade linear both;
			animation-timeline: scroll(nearest inline);
		}

		& .ds-space-bar-start::before {
			left: 0;
			margin-right: -2rem;
			background: linear-gradient(to right, var(--f-color-bg-1), transparent);
			animation-range: 0 2rem;
		}

		& .ds-space-bar-start::after {
			right: 0;
			margin-left: -2rem;
			background: linear-gradient(to left, var(--f-color-bg-1), transparent);
			animation-direction: reverse;
			animation-range: calc(100% - 2rem) 100%;
		}
	}

	& .ds-sidebar-toggle {
		display: flex;
		align-items: center;
		min-height: 3rem;
		padding-inline: 1rem;
		font-size: 1.1rem;
		color: inherit;
		cursor: pointer;

		&:hover {
			color: var(--f-color-text-0);
		}

		&[hidden] {
			display: none;
		}
	}

	/* The sidebar's menu cards (initSpaceBar()), flat in the row; a tab's panel is a dropdown under it. */
	& .ds-space-bar-start > .cell {
		position: static; /* The dropdowns are placed in the bar, not in their card. */
		width: auto;

		& > .card {
			flex-direction: row;
			border: none;
			border-radius: 0;
			background: none;
		}

		& > .card > .tabs {
			font-size: 0.95rem;

			/* `.expanded` is for the sidebar: here each tab is as wide as its content. */
			& .tabs-title {
				width: auto;
			}

			/* Icons only: a tab shows its label while selected, as `.label-is-active` does, also in the main menu. */
			& .tabs-title > a > span {
				max-width: 150px;
				transition: max-width var(--f-transition-long);
			}

			& .tabs-title:not(.is-active) > a:not([aria-selected="true"]) > span {
				max-width: 0;
				margin-left: 0;
			}

			& .tabs-title > a {
				padding-inline: 1rem;
				min-height: 3rem;
			}
		}

		& > .card > .tabs-content {
			position: absolute;
			top: var(--ds-dropdown-top, 3rem);
			left: var(--ds-dropdown-left, 0.5rem);
			z-index: 40;
			min-width: 16rem;
			max-width: min(24rem, 100% - 1rem);
			max-height: 70vh;
			overflow-y: auto;
			border: 1px solid var(--f-color-border-0);
			border-radius: var(--f-radius);
			background: var(--f-color-bg-1);
			box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 15%);
		}

		/* Overview, Members, Settings: as wide as they are in the sidebar. */
		& > .defaultspace-settings-container > .tabs-content {
			width: min(25rem, 100% - 1rem);
			max-width: none;
		}

		&:not(.ds-dropdown-open) > .card > .tabs-content {
			display: none;
		}
	}
}

@keyframes ds-edge-fade {
	to {
		opacity: 1;
	}
}

/*
 * The sidebar as a drawer (initSidebarDrawer()): a popover from the left on a small screen, so Esc and a
 * click beside it close it; docked beside the content as a column on a large one. The two split at the
 * framework's large breakpoint (`--f-breakpoint-large`, theme.isMobile()), so undocking never slides
 * out the small screen's popover.
 */
@media (width < 45em) {
	#defaultspace-sticky-sidebar[popover] {
		position: fixed;
		inset: 0 auto 0 0;
		width: min(25rem, 88vw);
		height: 100dvh;
		max-height: none;
		margin: 0;
		padding: 1rem;
		border: none;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--f-color-bg-0, Canvas);
		color: inherit;
		box-shadow: 0 0 1rem rgb(0 0 0 / 15%);
		transform: translateX(-100%);
		transition: transform 0.3s ease, overlay 0.3s allow-discrete, display 0.3s allow-discrete;

		&:popover-open {
			transform: none;

			@starting-style {
				transform: translateX(-100%);
			}
		}

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

/* The grid classes (cell large-4) size it; this undoes the popover's own box. */
#defaultspace-sticky-sidebar.ds-drawer-docked {
	display: block;
	position: static;
	height: auto;
	padding: 0;
	border: none;
	overflow: visible;
	background: none;
	color: inherit;
}

/* Docking is a view transition (initSidebarDrawer()): the drawer fades in or out, the content resizes. */
.ds-drawer-docking {
	& #defaultspace-sticky-sidebar {
		view-transition-name: ds-drawer;
	}

	& .current-space-content {
		view-transition-name: ds-space-content;
	}
}

@media (max-width: 39.99em) {
	.ds-space-bar {
		& .ds-sidebar-toggle {
			padding-inline: 0.75rem;
		}

		& .ds-space-bar-start > .cell > .card > .tabs .tabs-title > a {
			padding-inline: 0.5rem;
		}
	}
}

/* An image dragged over the header; dropping it opens the crop dialog below. */
.ds-header-drop-target {
	position: relative;

	&::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 20;
		pointer-events: none;
		border: 3px dashed var(--f-color-success);
		border-radius: 3px;
		background: color-mix(in srgb, var(--f-color-success) 20%, transparent);
	}
}

/* Cropping an image before it becomes or is suggested as the header (inc/functions-header-suggestion.php). */
.ds-header-crop {
	width: min(48rem, calc(100vw - 2rem));
	max-width: none;
	padding: 1.25rem;
	border: 0;
	border-radius: 3px;
	color: var(--f-color-text-0);
	background: var(--f-color-bg-1);

	&::backdrop {
		background: rgb(0 0 0 / 0.5);
	}

	& .ds-header-crop-frame {
		position: relative;
		overflow: hidden;
		cursor: grab;
		touch-action: none;
		background: var(--f-color-bg-2);

		&:active {
			cursor: grabbing;
		}
	}

	& .ds-header-crop-frame img {
		position: absolute;
		top: 0;
		left: 0;
		max-width: none;
		height: auto;
		transform-origin: 0 0;
		user-select: none;
		pointer-events: none;
	}

	& .ds-header-crop-zoom {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		margin: 1rem 0;

		& input {
			flex: 1;
			margin: 0;
		}
	}

	& .ds-header-crop-actions {
		display: flex;
		justify-content: flex-end;
		gap: 0.5rem;
	}
}

/* Below the header: a pending header image suggestion (inc/functions-header-suggestion.php). */
.ds-header-suggestion {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;

	& .ds-header-suggestion-preview {
		flex: 0 0 auto;
		width: 12rem;
		max-width: 100%;
		aspect-ratio: 945 / 200;
		overflow: hidden;
		border-radius: 3px;
	}

	& .ds-header-suggestion-preview img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	& p {
		flex: 1 1 12rem;
	}

	& .ds-header-suggestion-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
	}
}

.customize-partial-edit-shortcut,
.widget .customize-partial-edit-shortcut {
	position: relative;
	float: right;
	width: 100%;
}

.customize-partial-edit-shortcut button {
	left: initial !important;
	right: -20px !important;
	top: -18px;
	border-radius: 20px;
}

/* The four move arrows are buttons of one menu row now, and a menu row is
   spaces-markup's (assets/css/menu.css): what they looked like here is what
   `.spaces-menu-item.is-secondary` looks like everywhere. */

/* A post's info chips one per line, so "Seen by" (initSeenBy()) has its line from the start. */
.spaces-menu[data-menu="post"] [data-entry-id="comments"] .info-chips {
	flex-direction: column;
	align-items: flex-start;
}

/* menu styles */

/* only show the menu's dot menu, if at least one tab is active. */
.ds-main-menu-dots {
	overflow: hidden;
	max-height: 0px;
	transition: all 1s ease-in-out;
}

.is-active ~ .ds-main-menu-dots {
	max-height: 40px;
}

#primary-swap-menu .customize-partial-edit-shortcut button,
#secondary-swap-menu .customize-partial-edit-shortcut button {
	right: 2px !important;
	top: 2px;
}

/* underlines links in a non-static menu, because the links behave different (page reload) */
.tabs-content:not(.menu-is-static) .has-submenu-toggle > a > span {
	text-decoration: underline;
	text-decoration-color: color-mix(
		in oklab,
		var(--f-color-text-0) 30%,
		transparent 70%
	);
}

.tabs-panel.menu-is-static {
	max-height: 70vh;
	/* limit the height of a static menu. */
}

.current .space-header .customize-partial-edit-shortcut-header_image {
	position: absolute;
	right: calc(25px + 0.75rem);
	bottom: calc(15px + 0.75rem);
}

/*
 * A titled widget folds (ds_get_card_widget_settings()). The caret is the theme's
 * .caret, as on the accordion menus: pointing right while closed, down while open.
 */
.ds-widget-details {
	& > summary {
		cursor: pointer;
		list-style: none;

		&::-webkit-details-marker {
			display: none;
		}

		&::after {
			content: "\f078";
			margin-left: auto;
			font-family: "Font Awesome 7 Free";
			font-size: 0.625em;
			font-weight: bold;
			transform: rotate(-90deg);
			transition: transform var(--f-transition-medium);
		}

		&:hover {
			background-color: var(--f-color-bg-2);
		}
	}

	&[open] > summary::after {
		transform: rotate(-180deg);
	}
}

/*
 * A card widget's ⋮ (ds_get_widget_edit_trigger()) sits left of the caret, outside the <summary>
 * so a click on it does not fold the widget. With a pointer it shows on hover only; it stays
 * focusable and shows on keyboard focus and while its menu is open.
 */
.widget > .card:has(> .ds-widget-menu) {
	position: relative;
}

/* Centered on the summary's first line: (2 × 0.75rem padding + 1.1rem line − 2.4rem button) / 2. */
.ds-widget-menu {
	position: absolute;
	top: 0.1rem;
	right: 1.75rem;
}

@media (hover: hover) {
	.ds-widget-menu {
		opacity: 0;
		transition: opacity var(--f-transition-medium);
	}

	.widget:hover .ds-widget-menu,
	.ds-widget-menu:focus-visible,
	.ds-widget-menu[aria-expanded="true"] {
		opacity: 1;
	}
}

.widget_archive .ds-widget-content {
	padding: 0.5rem 0.75rem;
}

.widget_archive ul,
.widget_categories ul {
	list-style: none;
	margin: initial;
}

.widget:not(.widget_shortcodes) .textwidget ul {
	list-style: initial;
	margin-left: 1.25rem;
}

.sidebar {
	z-index: 30;
}

/* Sticky sidebar requires this config: https://blixhavn.github.io/sticky-sidebar-v2/ */
#defaultspace-sticky-sidebar {
	will-change: min-height;
}

#defaultspace-sticky-sidebar > div {
	transform: translate(0, 0);
	/* For browsers don't support translate3d. */
	transform: translate3d(0, 0, 0);
	will-change: position, transform;
}

.scoped-search {
	display: flex;
	align-items: center;
	position: relative;
	margin: 0;
	border-bottom: 1px solid var(--f-color-border-0);

	#scoped-search-input {
		flex: 1;
		margin: 0;
		border: none;
		border-radius: 0;
	}

	#scoped-search-input:focus {
		border: none;
	}

	#scoped-search-submit {
		--_scoped-search-button: 62%;
		--_scoped-search-fill: var(--f-color-border-1);
		display: flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 2.75rem;
		aspect-ratio: 1;
		margin: 0;
		padding: 0;
		/* closest-side keeps the circle centered on the icon; the 1px ramp anti-aliases its edge. */
		background: radial-gradient(
			circle closest-side,
			var(--_scoped-search-fill) calc(var(--_scoped-search-button) - 1px),
			transparent var(--_scoped-search-button)
		);
		transition:
			color 1s,
			--_scoped-search-fill 0.3s ease-in-out,
			--_scoped-search-button 0.3s ease-in-out;
		cursor: pointer;
		font-size: 0.75rem;
		line-height: 1;
		border-radius: 0;
		& i {
			color: var(--f-color-text-0);
		}
		&:hover {
			--_scoped-search-button: 70%;
			--_scoped-search-fill: color-mix(in oklab, var(--f-color-text-0) 22%, transparent);
		}
		&:focus-visible {
			outline-offset: var(--f-focus-inset);
			border-radius: 50%;
		}
		&.active {
			--_scoped-search-button: 70%;
			--_scoped-search-fill: var(--f-color-success);
			& i {
				color: var(--f-color-success-contrast);
			}
		}

		&.active:hover {
			--_scoped-search-button: 76%;
		}
	}
}

@property --_scoped-search-button {
	syntax: "<percentage>";
	initial-value: 0%;
	inherits: false;
}

@property --_scoped-search-fill {
	syntax: "<color>";
	initial-value: transparent;
	inherits: false;
}

/* avoid jumping when content is loaded. this is hacky. solve it by pre-populating the widgets with events in php.*/
#event-schedule {
	min-height: 120px;
}

.editor-button {
	width: 54px !important;
}

.editor-button .card {
	height: 100%;
	align-items: center;
	justify-content: center;
}

/* The dot is sized for the drafts chip; on a bare icon it would cover the glyph. */
.editor-button .notice-dot::after {
	width: 6px;
	height: 6px;
	right: -7px;
	top: -5px;
}

.ck.ck-content.ck-editor__editable.ck-editor__editable_inline {
	padding: var(--f-spacing-5) 0;
	display: inline-block;
}

.widget_spaces-editor-widget .drafts-container {
	display: flex;
}

.widget_spaces-editor-widget .editor-mini-view ~ .drafts-container {
	display: none;
}

.swap-container {
	position: relative;
	transition:
		transform 0.28s,
		opacity 0.28s;
	opacity: 0.5;
	margin-bottom: 45px;
}

.swap-container-parent .swap-container:not(.visible) {
	/* avoid display: none, because things might not render properly
	in hidden container (event-organizer fullcalendar) */
	position: absolute;
	pointer-events: none;
	width: 0;
	height: 0;
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
}

.swap-container-parent .swap-container {
	transform: translateX(-400px);
}

.swap-container-parent .swap-container:nth-child(2) {
	transform: translateX(400px);
}

.swap-container-parent .swap-container.visible {
	transform: translateX(0px);
	opacity: 1;
}

.swap-container-parent .swap-container.animate {
	display: block;
}

/* shows when your main menu does not show stream */
.back-to-stream {
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 2em;
	cursor: pointer;
	height: 100%;
	border-right: 1px solid var(--f-color-bg-0);
	border-left: 1px solid var(--f-color-bg-0);
	box-shadow: inset 0 -2px var(--f-color-bg-2);
}

.back-to-stream:hover {
	background-color: var(--f-color-bg-2) !important;
}

/*
 * A status icon means opposite things in the two places it appears: on a Space card it offers
 * what you have not done yet, in the sidebar of a Space it reports what you have.
 */
.space-card :is(.notification-status:not(.subscribed), .star-status:not(.starred)),
.sidebar :is(.notification-status.subscribed, .star-status.starred) {
	display: none;
}

.space-card .status-icon {
	flex-grow: 0;
}

/*
 * A dot menu stays quiet until you are on the card it belongs to: hover or keyboard focus
 * brings it out, and an open menu stays (aria-expanded, so the popover keeps its anchor).
 * Touch has no hover, so on mobile it is always there.
 */
body:not(.is-mobile) :is(.card-user, .post-card):not(:hover):not(:focus-within) .dots:not([aria-expanded="true"]) {
	opacity: 0;
	pointer-events: none;
}

:is(.card-user, .post-card) .dots {
	transition: color 150ms ease, opacity 150ms ease;
}

.ds-delete-failed {
	animation: ds-delete-shake 450ms ease-in-out;
}

.js-ds-delete-card-error {
	margin: 0;
	outline: 0;
}

.ds-post-delete-status {
	display: grid;
	place-items: center;
	min-height: 6rem;
	margin: 0;
	text-align: center;
}

/* Two sentences and two buttons. Below 30em every modal is a sheet as wide as the screen. */
@media (min-width: 30em) {
	#ds-delete-confirm-modal {
		max-width: 30rem;
	}
}

@keyframes ds-delete-shake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-0.5rem); }
	40%, 80% { transform: translateX(0.5rem); }
}

/*
 * A card the new-posts watcher just brought in (initNewPostsWatch() in ds-main.js), or the entry
 * the editor just published (initNewContentFromHash()). Only a `from` frame and no fill mode, so
 * the card ends on its own colours. The fork's .highlight-on-load is for text: it underlines
 * everything inside and keeps its radius and gradient afterwards.
 * A neutral wash, not the activity color: that defaults to the brand, and a red flash reads as an
 * error. The wash is one inherited percentage, so the read-more button and its fade shadow (solid
 * card color on top of the clipped content) tint with the card instead of staying a patch.
 */
@property --ds-new-wash {
	syntax: "<percentage>";
	initial-value: 0%;
	inherits: true;
}

.post-card.ds-new-post,
.page-section.ds-new-post {
	--ds-new-surface: color-mix(in oklab, var(--f-color-text-0) var(--ds-new-wash), var(--ds-card-color, var(--f-color-bg-1)));

	animation: ds-new-post 2s ease-in;
}

/* At 0% the surface is the card's own color, so it may stay once the flash is over. */
.post-card.ds-new-post {
	background-color: var(--ds-new-surface);

	& .post-content .ds-read-more-wrapper .ds-read-more {
		background-color: var(--ds-new-surface);
		box-shadow: -80px 60px 15px 80px var(--ds-new-surface);
	}
}

@keyframes ds-new-post {
	from {
		--ds-new-wash: 10%;
		background-color: var(--ds-new-surface);
		box-shadow: 0 0 0 1px var(--f-color-border-2);
	}
}

/*
 * ?new-since= (inc/functions-new-since.php): the chips of what moved, and the line below them.
 * Unread they are ringed and lettered in the activity color, neutral once the line was seen
 * (`.is-seen`, initNewSinceSeen()). White, not filled: the unread pill holds the one solid accent.
 */
.ds-news-chips {
	display: inline-flex;
	vertical-align: middle;
}

.ds-news-label,
.ds-new-since .label {
	font-weight: var(--f-font-weight-bold); /* in both states: seeing must not change the width */
	transition: color 0.5s, box-shadow 0.5s;
}

.ds-news-label:not(.is-seen),
.ds-new-since:not(.is-seen) .ds-new-label {
	--_chip-ring: color-mix(in oklab, var(--f-color-activity) 50%, transparent);
	color: light-dark(oklch(from var(--f-color-activity) 0.42 c h), oklch(from var(--f-color-activity) 0.82 c h)); /* FST's hollow-label() */
}

.ds-new-since {
	position: relative; /* for the hint */
	display: flex;
	align-items: center;
	gap: var(--f-spacing-4);
	padding-block: var(--f-spacing-6); /* not margin: the grid owns a cell's margins */

	&::before,
	&::after {
		content: "";
		flex: 1;
		border-top: 1px solid var(--f-color-border-1);
	}

	/* A chip like the cards' (`--_chip-ring`), with a surface of its own on the page background. */
	& .label {
		--_chip-ring: var(--f-color-border-2);
		padding: 0.4em 1em;
		border-radius: var(--f-radius-full);
		background: var(--ds-card-color, var(--f-color-bg-1));
		box-shadow: inset 0 0 0 1px var(--_chip-ring), var(--f-drop-shadow-small);
		color: var(--f-color-text-1);
		font-size: 0.875rem;
		text-shadow: none;
	}

	/* The debugging click that marks the Space unread again (initNewSinceSeen()). */
	&[data-since].is-seen .label {
		cursor: pointer;
	}

	/* Why a pass did not mark the Space read (initNewSinceSeen()): FST's tooltip, held above the label so nothing moves. */
	& .ds-new-hint {
		position: absolute;
		z-index: 1;
		bottom: calc(50% + 1.5rem);
		left: 50%;
		width: max-content;
		translate: -50% 0;
		text-align: center;
		text-wrap: balance;

		&:empty {
			display: none;
		}
	}
}

/*
 * The unread pill (ds_get_unread_pill()): a sticky anchor without height above the news, so it
 * floats over the cards and moves nothing when it shows or hides. At rest it is centered on the gap
 * above the first card. Shown while the "New" line is off screen (`.is-shown`, initUnreadPill())
 * and not yet seen.
 */
.ds-unread {
	position: sticky;
	top: calc(var(--f-spacing-4) + 1rem); /* plus half a small button: the pill is centered on the anchor */
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	flex: 0 0 100%;
	height: 0;

	/* Neutral buttons without their ring, separated by seams: the shadow sets it off the cards. */
	& .button {
		box-shadow: none;
	}

	& .button + .button {
		box-shadow: inset 1px 0 0 var(--f-color-border-1);
	}

	/* The bell's badge (spaces-markup `.bell-icon .badge`). */
	& .badge {
		margin-right: 0.3em;
		font-size: 0.65rem;
		font-weight: var(--f-font-weight-bold);
		will-change: transform; /* a layer of its own snaps circle and digit to the pixel grid together; else Chromium at 1x rounds the digit off center */
	}

	& .button-group {
		flex: none;
		flex-wrap: nowrap;
		margin: 0;
		border-radius: var(--f-radius-full);
		box-shadow: var(--f-drop-shadow);
		white-space: nowrap;
		opacity: 0;
		translate: 0 calc(-50% - 0.5rem);
		visibility: hidden;
		transition: opacity 0.2s, translate 0.2s, visibility 0.2s;
	}

	&.is-shown:not(:has(~ .ds-new-since.is-seen)) .button-group {
		opacity: 1;
		translate: 0 -50%;
		visibility: visible;
	}

	/* "Start from oldest" lands below the pill: its offset twice plus a small button. */
	& ~ .cell:has(+ .ds-new-since) {
		scroll-margin-top: calc(var(--f-spacing-4) * 2 + 2rem);
	}
}

/* Information, not an action. */
.ds-unread-text {
	pointer-events: none;
}

/*
 * An older post with new comments: a teaser of the post, then the comments, in the overview state.
 * The comments area holds a `partial` stand-in, so it shows here although the overview hides
 * comments; the open card is an ordinary one. Read more always shows: the whole post is one click.
 */
.post-card.ds-activity-entry.overview {
	& .post-content {
		--ds-max-excerpt-height: 6rem;
	}

	& .section_thumbnail,
	& .comment-footer .avatar-stack {
		display: none !important;
	}

	& .ds-read-more {
		display: block;
	}

	& .section_comments {
		display: block;
	}
}

/*
 * The comments of an activity entry that are left out: a pill on a hairline, so the thread reads
 * as interrupted here, like `.ds-new-since`. The whole row is the link.
 */
.ds-comment-fold {
	--f-avatar-small: 1.75rem;
	--f-avatar-stack-overlap: 0.55rem;
	display: flex;
	align-items: center;
	gap: var(--f-spacing-3);
	padding-block: var(--f-spacing-3);
	color: var(--f-color-text-2);

	&::before,
	&::after {
		content: "";
		flex: 1;
		border-top: 1px solid var(--f-color-border-1);
	}

	& .ds-comment-fold-pill {
		display: flex;
		align-items: center;
		gap: var(--f-spacing-2);
		padding: 0.15rem 0.75rem 0.15rem 0.2rem;
		border: 1px solid var(--f-color-border-1);
		border-radius: var(--f-radius-full);
		background: var(--ds-card-color, var(--f-color-bg-1));
		transition:
			background-color 0.15s,
			color 0.15s;
	}

	&:hover .ds-comment-fold-pill,
	&:focus-visible .ds-comment-fold-pill {
		background: var(--f-color-tint);
		color: var(--f-color-text-0);
	}

	& .avatar-stack {
		flex: none;
		max-width: none;
		flex-wrap: nowrap;
		margin-right: 0; /* the framework pulls the footer's text under the stack */
		padding-left: var(--_overlap);
	}

	& .fa-chevron-down {
		font-size: 0.65em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ds-delete-failed {
		animation: none;
	}
}

/*
 * Its icon's right edge lines up with the reaction button's at the card's bottom (the library's
 * `.icon-button` centers it in a 2.4rem square), and the icon matches that button's (Font Awesome
 * regular at 15px, emoji-reaction's `thumbs-up.svg`).
 */
.post-card .edit-bar > .edit-button {
	margin-right: 0.25rem;

	& i {
		font-size: 0.9375rem;
	}
}

.respond-link {
	flex: 1;
	color: var(--f-color-text-1);
}

/* WordPress' paginate_links() output inside a Foundation `.pagination`. */
.pagination .page-numbers {
	min-width: 2.25rem;
	min-height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.5rem;
	margin: 0 0.125rem;

	&.dots {
		font-weight: 500;
		font-size: 1.25rem;
		color: var(--f-color-text-1);
	}

	&:is(.prev, .next) i {
		font-size: 0.625em;
	}
}

.query-description {
	font-size: 0.875rem;
	color: var(--f-color-text-2);
	cursor: default;
	display: flex;
	flex-wrap: wrap;
	align-items: center;

	& > li {
		list-style: none;
	}
}

.query-description a:hover {
	text-decoration: underline;
}

.query-description > * {
	margin-right: 10px;
}

@keyframes pin-wiggle {
	0%   { transform: translateY(-28px) rotate(0deg); opacity: 0; }
	28%  { transform: translateY(3px) rotate(0deg); opacity: 1; }
	40%  { transform: translateY(0) rotate(-22deg); }
	54%  { transform: translateY(0) rotate(17deg); }
	65%  { transform: translateY(0) rotate(-10deg); }
	75%  { transform: translateY(0) rotate(6deg); }
	85%  { transform: translateY(0) rotate(-3deg); }
	100% { transform: translateY(0) rotate(0deg); }
}

.post-card.sticky {
	border: 1px solid var(--f-color-border-1);
	--ds-card-color: color-mix(in oklab, var(--f-color-bg-2) 70%, var(--f-color-bg-0));
	/* --ds-card-color: var(--f-color-bg-2); */
	background-color: var( --ds-card-color , var(--f-color-bg-1) );
}

.post-card.sticky .fa-map-pin {
	display: inline-block;
	transform-origin: bottom center;
	animation: pin-wiggle 0.7s ease-out 0.8s 1 both;
}

/* A term's archive shows its chip's count (spaces-markup cards.css hides it elsewhere). */
.swap-container.is_tax:not(.is_home) .info-chip-taxonomy .value {
	display: block;
}

/*
 * A chip truncates its value to fit the row (the library's .info-chip), but only once the flex
 * wrapper holding the chip set may go below its content width.
 */
.card-divider > .px-1:has(> .info-chips) {
	min-width: 0;
}

/* make sure featherlight images don't show larger than screen ... */
.featherlight .featherlight-image {
	max-width: 100% !important;
	max-height: 90vh !important;
	height: 100% !important;
	object-fit: contain;
}

.featherlight .featherlight-content {
	position: relative;
}

/*
 * The card header and the feature image link to the post in both states (one rendering, two
 * states). In the full state the reader is already there: the click is swallowed by
 * initPostClick() and the title reads as text rather than as a link.
 */
.card:not(.overview) .post-card-anchor,
.card:not(.overview) .section_thumbnail {
	cursor: text;
	-webkit-user-drag: none;
	user-drag: none;

	& > * {
		user-select: text;
	}
}

.post-card-anchor {
	width: 100%;
}

/*
 * Only the meta line shares its row with the edit bar; the title runs on below it to the card's
 * edge. `.card-header` spans the edit bar's column as a subgrid, so the meta line stops where the
 * edit bar starts. A class, not `:has()`: a `:has()` before `> *` makes every DOM change restyle
 * the whole page.
 */
.section_header.with-edit-bar {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;

	& > .card-header {
		grid-row: 1;
		grid-column: 2 / 4;
		display: grid;
		grid-template-columns: subgrid;
		align-content: start;

		& > * {
			grid-column: 1;
		}

		& > .post-card-anchor {
			grid-column: 1 / -1;
		}
	}

	/* Above `.card-header`, which is positioned and would otherwise take the edit bar's clicks. */
	& > .edit-bar {
		grid-row: 1;
		grid-column: 3;
		position: relative;
		z-index: 1;
	}
}

/* The card clips it: the focus ring goes inside. */
.card .post-card-anchor {
	--f-focus-offset: var(--f-focus-inset);
}

/* Tagify focuses an inner span: the field shows the library's focus ring. */
.card .tagify.tagify--focus {
	outline: var(--f-focus-width) solid var(--f-focus-color, var(--f-color-text-0));
	outline-offset: var(--f-focus-offset);
}

/* A card's title is outside .user-generated: it takes the content's h1 weight from the framework. */
.page-card h1,
.post-card h1 {
	font-weight: normal;
}

/*
 * The author's avatar sits under the feature image. Without one it fills the card's top-left
 * corner: foundation-sites-template does that for any avatar opening a card's first section.
 *
 * A card keeps its z-indexes (read more, edit bar, avatar stack) to itself, so what floats over the
 * stream (the unread pill) stays on top. Its menus and popups open in the top layer.
 */
.post-card {
	isolation: isolate;

	&.has-post-thumbnail .avatar-container {
		border-radius: var(--f-avatar-radius, 0 0 var(--f-radius) 0);
	}

	& .avatar-stack {
		max-width: 40%;
	}

	.fe-read-more {
		grid-column: -1 / 1;
	}
}

.post-card-footer {
	box-sizing: content-box;
	height: auto;
	min-height: 32px;

	& .info-chips:last-child {
		padding: 0.5rem 0.75rem;
	}
}

.avatar-stack .avatar-container:hover {
	z-index: 99 !important;
}

/**
 * Comment avatars are round: the ones next to single comments and the author of the comment
 * being written (the editor and the stand-in that holds its place). The stacked avatars on a
 * collapsed card get this from the framework, which reads --f-avatar-radius everywhere an
 * avatar has a corner.
 */
.gb-ci,
[data-editor-type="comment"] {
	--f-avatar-radius: 50%;
}

/**
 * Expanding a post card is a view transition (see ds-main.js): the card morphs
 * into its expanded self while the stacked comment avatars fly to their comments.
 */
::view-transition-group(ds-expanding-card) {
	animation-duration: 0.4s;
}

::view-transition-old(ds-expanding-card),
::view-transition-new(ds-expanding-card) {
	/* Reveal the taller card instead of stretching both snapshots into the new box. */
	height: 100%;
	overflow: clip;
	object-fit: none;
	object-position: top left;
}

/* Avatars travel above the card they are leaving, and take a little longer doing it. */
::view-transition-group(*.ds-flying-avatar) {
	z-index: 10;
	animation-duration: 0.5s;
	animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/**
 * Opening a Space is a cross-document view transition (@view-transition above): the header of
 * the card you clicked grows into the Space's own header. Card and Space render the same
 * `.clipped.space-header`, so the browser only has to morph the box.
 *
 * The Space a page *is* gets its name here rather than from ds-main.js, because the page
 * being arrived at is named in 'pagereveal', which fires while the document is still parsing and
 * no script of ours has run. tagSpaceHeader() names the card at the other end, and where a page
 * holds both (the home Space lists Space cards beside its own header) it sets the class below,
 * because two elements sharing one name make the browser skip the transition.
 */
.card.current > .space-header,
.card.current > a > .space-header {
	view-transition-name: ds-space-header;
}

.ds-space-header-on-card .card.current > .space-header,
.ds-space-header-on-card .card.current > a > .space-header {
	view-transition-name: none;
}

::view-transition-group(ds-space-header) {
	animation-duration: 0.4s;
}

::view-transition-old(ds-space-header),
::view-transition-new(ds-space-header) {
	/* Let both snapshots cover the growing box, the way the image inside `.clipped` does. */
	height: 100%;
	object-fit: cover;
}

/*
 * Nothing to grow into. The arriving page names its header from the stylesheet, so it is only
 * missing when the element has not been parsed at the moment the browser captures the page, and
 * an unpaired snapshot is the only child of its image pair. Left alone it would sit on top of
 * the new page and fade, which reads as a ghost of the card you just left; better to let the
 * page cross-fade on its own and say nothing.
 */
::view-transition-old(ds-space-header):only-child,
::view-transition-new(ds-space-header):only-child {
	animation: none;
	opacity: 0;
}

/**
 * Opening a profile is the same move one avatar smaller: the avatar you clicked grows into the
 * one the profile shows. Both ends name the same box, the `.clipped` square inside the
 * `.avatar-container` that holds nothing but the cover-fitted image: the container itself is not
 * that box on a profile, where it also holds the edit buttons, and a snapshot of those has
 * nowhere to grow from. The profile's image paints the thumbnail underneath the full file
 * (`--avatar-preview` in spaces-markup), so the two snapshots pair on the same pixels.
 *
 * Split the same way as the Space header above: the profile a page *is* gets its name here,
 * tagAvatar() names the avatar at the other end, and where a page holds both (a profile opened
 * from another profile) it sets the class below.
 */
.card-user.profile .avatar-container > .clipped {
	view-transition-name: ds-avatar;
}

.ds-avatar-on-trigger .card-user.profile .avatar-container > .clipped {
	view-transition-name: none;
}

::view-transition-group(ds-avatar) {
	/* Above the page it is leaving, the way the comment avatars travel. */
	z-index: 10;
	animation-duration: 0.4s;
}

::view-transition-old(ds-avatar),
::view-transition-new(ds-avatar) {
	height: 100%;
	object-fit: cover;
}

/* Nothing to grow into, as above: no ghost, just the page cross-fading. */
::view-transition-old(ds-avatar):only-child,
::view-transition-new(ds-avatar):only-child {
	animation: none;
	opacity: 0;
}

.page-template-template-card {
	& .page-title {
		padding-left: 1.5rem;
	}
}

.page-template-template-no-card-php .template-content .page-card {
	background-color: transparent;
	border: none;
}
.page-template-template-no-card details {
	background-color: var(--f-color-bg-1);
	border-radius: var(--f-radius);
	font-size: 1.05rem;
}
.page-template-template-no-card details > summary {
	padding-block: 1em;
}
.page-template-template-no-card .prose-layout {
	display: block;
	padding: 0.75em;
}
.page-template-template-no-card .mt-7 {
	margin-block-start: 0em;
}
.page-template-template-no-card .query-description {
	display: none;
}
.page-template-template-no-card .py-4 {
	padding-block: 0em;
}
.page-template-template-no-card .px-2,
body .details,
body .user-generated details {
	padding-inline: 1rem;
}
/*d
**
**  Emoji reactions: the popups of
**  @ /app/plugins/emoji-reaction/public/css/emoji-reaction-public.css
**  in our colors (they bring their own, for a theme that has none).
**
*/

.emoji-reaction-popup {
	border: 1px solid var(--f-color-border-1);
	background: var(--f-color-bg-1);
	color: var(--f-color-text-0);
	box-shadow: 0 2px 4px 0 var(--f-color-border-0);
	&.inverted {
		background: var(--f-color-text-0);
		color: var(--f-color-bg-1);
	}
	& .emoji-reaction-button:hover {
		background-color: var(--f-color-bg-2);
	}
}

/* The add button is an icon button on a card: the library's `.icon-button` look, by its tokens. */
.emoji-reaction-wrapper .emoji-reaction-button-addnew {
	color: var(--f-icon-color);

	&:hover,
	&:focus-visible,
	&[aria-expanded="true"] {
		color: var(--f-icon-hover-color);
	}
}
