/* @override
	http://localhost:8888/wp-content/themes/CAN-V7/assets/css/activity.css?* */

/**
 * Activity window (inc/window-handlers/activity.php) styling — its own
 * file rather than folded into style.css, since this integration keeps
 * growing (unlike Archives/API Docs/Reports, which stayed a handful of
 * rules each). Loaded client-side by assets/js/activity.js's
 * loadStylesheet(), same lazy-only-when-the-window-opens pattern as the
 * plugin's own CSS URL right alongside it (see that file's own comment).
 *
 * @package CAN_V7
 */

/* [post_grid_insert]/[event_grid_insert] (inc/template-tags.php) render
   our own .tui-grid-card here instead of the plugin's own .griditem.insert
   card (see those functions' own comments for why), which never gets the
   plugin's own width: var(--activityitemwidth) (its own style.css, loaded
   as-is, unmodified — defined on :root as 350px) since that only targets
   its own class. Reuses the same variable rather than a separate
   hardcoded value, so the two stay in step if the plugin's own value ever
   changes. */

/* Redefines the plugin's own --activityitemwidth (its own :root, flat
   350px) within our wrapper's scope, tied to --tui-font-size instead
   (320px at its 12px default — a smaller multiplier than the plugin's
   own 350px-at-12px ratio, per the user) — cascades to every consumer of
   that variable, both the plugin's own unmodified CSS (griditem.insert
   cards, #activity-map-container's width AND height, which is what keeps
   the map square — same variable, both dimensions, so it stays square at
   any size) and this file's own rules below, so the font-size picker
   scales Activity's cards/maps the same way it now does Latest/Archives/
   Saved's own grid (style.css's own .tui-listing--grid and friends). */
.tui-activity {
	--activityitemwidth: calc(var(--tui-font-size) * 26.6666);
}

/* The plugin's map script appends a hidden, position:absolute .map-tooltip
   to <body> with no top/left, so it sits at its static position below
   .tui-shell and adds its own height (~32px) of invisible page scroll.
   Pinned to the origin until the script positions it on hover. */
body > .map-tooltip {
	top: 0;
	left: 0;
}

/* Same system-font/0.8 rule as the rest of this theme's charts (see
   .can-code-block above, assets/js/reports.js) — !important since
   can-activity-maps.js sets font-family/font-size as inline styles
   (d3's own .style() calls), which only an !important external rule
   can override. */
.map-tooltip {
	font-family: system-ui, sans-serif !important;
	font-size: 0.8em !important;
}

.tui-activity a:hover {
	background: none;
	color: var(--darkcolor);
}


.tui-activity .tui-grid-card,
.tui-activity .tui-book-poster {
	width: var(--activityitemwidth, 350px);
	border: 1px dashed var(--linecolor);
	margin: 1em 0 0.5em 1.5em;
}

/* A book's poster card (template-parts/book/content-poster.php) takes the same width and edge as an article's card; its cover
   runs flush to a dashed rule and its title and tags get the same padding. */
.tui-activity .tui-book-poster-cover img {
	border: 0;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-activity .tui-book-poster-title {
	margin: 0;
	padding: 1em 1em 0;
}

.tui-activity .tui-book-poster-tags {
	padding: 0 1em;
}

.tui-activity .tui-book-poster > :last-child {
	padding-bottom: 1em;
}

/* A shared construction's card (inc/construction-share.php) is a .tui-grid-card, so it takes the width, dashed edge and left
   margin of the cards above; this is just its map. */
.tui-activity .tui-construction-map {
	border-bottom: 1px dashed var(--linecolor);
}

/* [event_grid_insert]'s own .tui-event-card (card-activity-event-v7.php,
   the CAN Activity Logger plugin's own Event Added/Saved/Unsaved card)
   never gets a grid parent to size it the way the real Events listing's
   own .tui-listing--fixed[data-listing-type="events"] grid-template-columns
   does — same unconstrained-width problem .tui-grid-card has here, same
   fix. */
.tui-activity .tui-event-card {
	width: var(--activityitemwidth, 350px);
	border: 1px dashed var(--linecolor);
	margin: 1em 0 0.5em 1.5em;
}

/* The card's own save-toggle (can_v7_render_save_toggle(), inc/
   template-tags.php) is redundant here — the Activity entry itself
   already has its own Save button in the Comment/Like/Save/Share row
   right below the card, for the same post. Only hidden in Activity;
   the real Events listing's own card still wants it. */
.tui-activity .tui-event-card .tui-save-toggle {
	display: none;
}



/* The plugin's own cards (bio/status/skills/…) still use its flat
   margin-left: 20px (its own style.css, unmodified) — 1.5em here to match
   .tui-grid-card's own left margin just above, so every card type lines up
   the same. */
.tui-activity .activity-log-item div.griditem.insert {
	margin-left: 1.5em;
}

/* A blanket "hide every .tui-grid-card in thread view" rule used to live
   here (any inline [post_grid_insert]/[event_grid_insert] card, assuming
   it always duplicated an already-expanded full item elsewhere in the
   thread) — too broad: a comment on a REAL post (e.g. "left a comment on
   <post>") embeds a genuinely useful card for that post, no duplicate of
   it exists anywhere else in the thread, and hiding it left the thread
   with no visible reference to what's actually being discussed. The only
   case that ever needed suppressing — a comment/reply on an Activity
   Entry, whose [post_grid_insert id=<its own can_activity_log post ID>]
   isn't a real post at all — is now handled at the actual source instead:
   can_v7_render_post_grid_card() (inc/template-tags.php) renders nothing
   for a non-post/events/books id, correct in every context, not just
   thread view. */

/* No padding-bottom on .tui-grid-thumb itself (unlike title/excerpt below,
   plain text where breathing room before the rule makes sense) — that box
   also has aspect-ratio: 4/3 + overflow: hidden (style.css's own
   .tui-grid-thumb), so padding there shrinks the content area the image's
   own height: 100%; object-fit: cover fills, leaving a visible gap above
   this border instead of the image running flush to it. */
.tui-activity .tui-grid-card .tui-grid-thumb {
	border-bottom: 1px dashed var(--linecolor);
	margin-bottom: 0px;
}

.tui-activity .tui-grid-card .tui-grid-title,
.tui-activity .tui-grid-card .tui-grid-excerpt {
	border-bottom: 1px dashed var(--linecolor);
	padding-bottom: 0.5em;
	margin-bottom: 0px;
}

.tui-activity .tui-grid-card .tui-grid-title,
.tui-activity .tui-grid-card .tui-grid-excerpt {
	padding: 1em 1em;
}

.tui-activity .gridexcerpt {
	padding: 0.5em 1em;
	overflow-wrap: anywhere;
}

.tui-activity .tui-grid-card .tui-grid-meta {
	padding: 1em 1em;
}

.tui-activity .gridtitle {
	padding: 1em 1em;
}

/* Comment/Like/Save/Share — every .can-activity-btn (class-can-activity-
   buttons.php, the plugin's own file — unmodified) is a real <button>,
   which doesn't inherit font-size from its parent by default (same bug
   as .tui-featured-menu-item elsewhere in this theme, see that rule's
   own comment) — without this, the plugin's own .can-activity-btn svg
   { width: 1em; height: 1em } (also unmodified) sized itself off the
   browser's flat default button font-size instead of actually scaling
   with --tui-font-size. */
.tui-activity .can-activity-btn {
	font-size: inherit;
}

/* The .can-log-icon/.bi catch-all further up (1.3333em, this file's own)
   has higher specificity than the plugin's own .can-activity-btn svg
   (1em, its own style.css) and would otherwise win here too, making
   these visibly bigger than the plugin ever intended — not just
   "properly scaling" the way the fix above is. This restores the
   plugin's own 1:1 ratio to its own button's (now correctly inherited)
   font-size instead. */
.tui-activity .can-activity-btn svg {
	width: 1em;
	height: 1em;
}

/* The plugin's own .can-activity-buttons row (its own style.css) uses a
   flat 1em flex gap between Comment/Like/Save/Share — too wide once
   these buttons' own font-size actually scales correctly (the fix
   above), per the user. */
.tui-activity .can-activity-buttons {
	gap: 0.5em;
}

/* Term/taxonomy entries' own Save button (class-can-activity-buttons.php's
   own render_buttons(), delegated to can_v7_render_save_toggle_archive()
   for these — see that file's own comment) — .tui-save-toggle has no
   width/height of its own (style.css), unlike its siblings here
   (.can-activity-btn's own flat 2em x 2em box), so without this it
   sized off whatever font-size it happened to inherit instead, reading
   as a different size than Comment/Like/Share right next to it. */
.tui-activity .can-activity-buttons .tui-save-toggle {
	width: 2em;
	height: 2em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Always --bodycolor here, outline or filled, resting/hover/saved — like the
   plugin's own Comment/Like/Save/Share buttons beside it — not the bookmark's
   usual --darkcolor (.tui-save-toggle-outline/-fill, style.css). */
.tui-activity .can-activity-buttons .tui-save-toggle .tui-save-toggle-outline,
.tui-activity .can-activity-buttons .tui-save-toggle .tui-save-toggle-fill {
	color: var(--bodycolor);
}

/* An administrator's "See all Daps" (Admin window): the Dap button, its count and the "Daps by" line on an entry that is not their own are
   in --darkcolor, so what they are seeing that others can't is plain to see. The plugin marks them with .can-activity-daps-admin (the count
   is the span right after the button). */
.tui-activity .can-activity-btn.can-activity-daps-admin,
.tui-activity .can-activity-btn.can-activity-daps-admin + .can-activity-like-count,
.tui-activity .can-like-btn.can-activity-daps-admin,
.tui-activity .can-activity-daps-by-wrapper.can-activity-daps-admin,
.tui-activity .can-activity-daps-by-wrapper.can-activity-daps-admin a,
.tui-activity .post-likers-wrapper.can-activity-daps-admin,
.tui-activity .post-likers-wrapper.can-activity-daps-admin a {
	color: var(--darkcolor);
}

.tui-activity .can-like-btn {
	color: var(--bodycolor);
}

.tui-activity .can-like-btn:hover {
	background: var(--shadecolor);
}

/* .can-like-icon carries is-liked whenever the viewer has given this post
   a Dap (can-activity-logger plugin, mirrors the button's own
   data-liked="1"/"0") — layers on top of the icon's base color above,
   only when liked. !important because the plugin's own
   .can-like-btn .can-like-icon rule now makes color !important too (its
   own hover-specificity fix) — without matching that here, this would
   silently stop applying regardless of selector specificity. */
/* display: inline-block !important is required here, not just the
   transform — the plugin forces display: inline !important on
   .can-like-icon (its own style.css), and transform has no visible effect
   on an inline (non-replaced) box regardless of what value it's given.
   Our selector (3 classes) outweighs the plugin's (2 classes), so this
   display override wins despite both being !important. */
.tui-activity .can-like-icon.is-liked {
	display: inline-block !important;
	/* translateY listed first (outermost/applied last) so it's an exact
	   -2px shift regardless of the scale factor, not -2px scaled up too. */
	transform: translateY(-1px) scale(1.5) !important;
}

/* Radar ping when a Like is given (activity.js): a ring grows out from the icon and fades. Positioned by JS at the icon's
   centre; 1em wide at the start, 2.4x by the end. */
.tui-like-radar {
	position: absolute;
	width: 1em;
	height: 1em;
	margin: -0.5em 0 0 -0.5em;
	border: 2px solid var(--linkcolor);
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	animation: tui-like-radar 0.9s ease-out forwards;
}

@keyframes tui-like-radar {
	0% {
		opacity: 0.4;
		transform: scale(0.4);
	}
	100% {
		opacity: 0;
		transform: scale(2.4);
	}
}

.tui-activity button.can-delete-log-btn {
	color: red !important;
	font-size: 1em;
	font-family: var(--tui-font);
}

.tui-activity .can-activity-share-generate-image {
	font-family: var(--tui-font);
}

/* Share to Fediverse (assets/js/share-services.js adds it to Activity's Share menu): the same hover as Copy Link and Add to Constructor, which
   the plugin gives their own rule; without one `.tui-activity a:hover` above turned it the accent colour on no background. */
.tui-activity .can-activity-share-menu .tui-share-service:hover,
.tui-activity .can-activity-share-menu .tui-share-service:focus {
	background: var(--bodycolor);
	color: var(--backgroundcolor);
	outline: none;
}

.tui-activity .tui-event-body {
	margin-top: 0px;
	gap: 0px !important;
}

.tui-activity .tui-event-meta {
	border-bottom: 1px dashed var(--linecolor);
	padding: 1em;
	margin: 0px;
}

.tui-activity .tui-grid-meta-terms {
	margin-bottom:0px;
	padding-bottom:0px;
}

.tui-activity .tui-event-title {
	margin:0em;
	padding: 1em;
	border-bottom: 1px dashed var(--linecolor);
	margin-top:0px !important;
}

.tui-activity .tui-event-excerpt {
	margin:0em;
	padding: 1em;
	border-bottom: 1px dashed var(--linecolor);
}

.tui-activity .tui-event-link {
	margin:0em;
	padding: 1em;
}

.tui-activity .gridexcerpt {
	border-top: 1px dashed var(--linecolor);
}

.tui-activity .gridmeta {
	border-bottom: none !important;
	border-right: none !important;
	border-right: none !important;
}

.tui-activity .bio {
	font-family: var(--tui-font);
	font-style: italic;
	overflow-wrap: anywhere;
}

/* --tui-mono-font, not --tui-font — the latter follows the member's own
   font-picker choice (theme.css's html[data-tui-font="inter"] switches it
   to a sans-serif stack), which real code should never do regardless of
   what system/theme they're on. */
.tui-activity .can-code-block {
	font-family: var(--tui-mono-font);
	font-size: 0.80em;
}

.activity-log-item p a {
	font-family: var(--tui-font);
}

.tui-activity div.gridmeta {
	padding: 0.5em 1em;
	border-top: 1px dashed var(--linecolor);
}
.tui-activity .gridmeta li {
	list-style: none;
	font-size: 0.80em;
}
/* Image attachment card: the filename label under the preview, 0.8em and cut off with
   an ellipsis when long. Not for labels inside a <li> (the W / URL rows) or the URL
   card / .gridexcerpt captions: those already get 0.8em from their parent, and this
   stacked on top of it. */
.tui-activity .griditem.insert .gridmeta #metabutton:not(li #metabutton):not(.gridliveurl #metabutton):not(.gridexcerpt #metabutton) {
	display: block;
	max-width: 100%;
	font-size: 0.8em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tui-activity .user-location-updated div.griditem.insert div.gridmeta span#metabutton.title {
	margin-right: 0.5em;
}

/* Event Added card's own thumbnail — get_the_post_thumbnail_url(...,
   'large') straight from the plugin's own template, with no width
   constraint anywhere (its own style.css only has rules for the
   .website/.location modifiers, not bare .gridmedia.insert — the only
   card that ever renders exactly that, no modifier, is this one), so it
   rendered at full upload resolution. Same aspect-ratio/object-fit crop
   as .tui-event-thumb (style.css) for consistency with the real Events
   window's own cards.

   :not(.website):not(.location) matters — a plain CSS class selector
   matches on presence, not an exact set, so .gridmedia.insert alone also
   matched .gridmedia.insert.website (OG-image link-preview cards, e.g. an
   Activity Entry's own URL) and .gridmedia.insert.location, forcing THEM
   into this same fixed 4:3 box too even though the plugin's own CSS wants
   those two sized to their real image (height: auto !important — aspect-
   ratio still takes effect through an auto height, so this rule was
   winning anyway) — a wide/short source image left a large empty gap
   below it, up to this box's own forced height. */
.tui-activity .gridmedia.insert:not(.website):not(.location) {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--shadecolor);
	width: var(--activityitemwidth);
}

.tui-activity .gridmedia.insert:not(.website):not(.location) img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Event Added card (plugin's own includes/card-activity-event.php,
   unstyled by either that plugin's own CSS or this file until now — no
   .date-box-left/.eventmonth/.eventday/.gridmeta.events rules existed at
   all, so it rendered as raw, unstacked text). Matches this theme's own
   real Events window (.tui-event-date-box/-month/-day, .tui-event-facts —
   style.css) as closely as this plugin's fixed, different markup allows,
   rather than inventing a third look just for Activity. */
.tui-activity .gridmeta.events {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	/* Both #metabutton.title labels below and .date-box-right's own bare
	   <li>s (no wrapping <ul> in the plugin's own markup) inherit the
	   generic .tui-activity .gridmeta li rule above (list-style:none,
	   0.85em) — this row just needs the flex layout on top of that. */
}

/* Same --tui-font-size tie as --activityitemwidth above (44px at the
   12px default) — matches .tui-event-date-box's own width, which style.css
   still hardcodes at a flat 44px rather than this same calc(); worth
   revisiting there too if the font-size picker should scale the real
   Events window's own date boxes the same way. */
.tui-activity .date-box-left {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: calc(var(--tui-font-size) * 3.6667);
}

.tui-activity .eventmonth {
	font-size: 0.80em;
	text-transform: uppercase;
	color: var(--darkcolor);
}

.tui-activity .eventday {
	font-size: 2.25em;
	line-height: 1.1;
	color: var(--darkcolor);
}

.tui-activity .date-box-right {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--midcolor);
	line-height: 1.6;
}

.tui-activity .date-box-right #metabutton.title {
	display: inline-block;
	min-width: 1.4em;
	margin-right: 0.5em;
	color: var(--midcolor);
	font-weight: bold;
}

/* Countdown highlight (card-activity-event.php's own $blink_class, <=5
   days out) — same --tui-red already used for "expired"/urgent states
   elsewhere in this theme (e.g. .tui-job-status--expired), not a new
   color invented just for this. */
.tui-activity .event-date.blink {
	color: var(--tui-red);
	font-weight: bold;
}

/* The event card's own URL row — a second .gridexcerpt (card-activity-
   event.php's own markup, same class as the real excerpt text above it,
   distinguished here by :has(#metabutton) since that's the only thing
   that tells the two apart) — caption size, not full reading size. */
.tui-activity .gridexcerpt:has(#metabutton) {
	font-size: 0.80em;
}

.tui-activity .bi-three-dots path {
	fill: var(--bodycolor);
}

.tui-activity .griditem {
	border: 1px dashed var(--linecolor);
}

.tui-activity .gridtitle {

}

.tui-activity .term-description-added .gridmeta {
	display: none;
}

/* the_excerpt()'s own <p> inherits the plugin's own
   .can-activity-log-container p { margin-left: 20px; } (its own
   style.css, unmodified) — zeroed here. */
.tui-activity .tui-grid-card .tui-grid-excerpt p {
	margin: 0px;
	padding: 0px;
}

/* .gridactivitycard.status (card-activity-post.php, the plugin's own
   file — loaded as-is, unmodified) wraps the Activity Entry text AND our
   card together, and is float:left in the plugin's own CSS — a float
   sits beside whatever inline content precedes it (the "@user posted:"
   line just above, in render_activity_log_item()) instead of dropping
   to a clean new line below it, and .griditem.insert.status's own
   width:auto!important shrink-wraps around it too. Cleared here so the
   whole text+card block drops below the log line and sits flush left
   (a block's own default, once nothing's floating it) instead of
   hugging whatever width its content happens to be. */
.tui-activity .gridactivitycard.status {
	float: none;
	display: block;
	clear: both;
	/* The plugin's own padding: 0.5em 1em 0.5em 1em (its own style.css,
	   unmodified) adds another 1em on top of .activity-log-item's own 1em
	   padding, so the card sits noticeably further right than the log
	   line's own icon/text (which only get .activity-log-item's edge) —
	   flush left here to match. */
	padding-left: 1em;
	padding-right: 0.5em;
}

.tui-activity .griditem.insert.status {
	width: auto;
}

/* .gridactivitycard.bio (card-activity-bio.php/-twitter.php/-instagram.php,
   the plugin's own files — loaded as-is, unmodified) wraps an icon +
   link, e.g. "instagram.com/<handle>" — the plugin's own .can-log-icon is
   float:left with a flat margin-top: 4px fudge to roughly line it up with
   the text baseline (its own style.css), which only lines up at one
   specific font-size/icon-size pairing and drifts at any other — a real
   flex row centers the icon against the link's own line-height instead,
   correct at any size. */
.tui-activity .gridactivitycard.bio {
	display: flex;
	align-items: center;
}

.tui-activity .gridactivitycard.bio .can-log-icon {
	float: none;
	margin-top: 0;
}

/* Every plugin-rendered icon — .can-log-icon (card icons above, the
   action-type icon beside each log line) and the Bootstrap-icon .bi-*
   classes (class-can-activity-buttons.php's like/comment/bookmark/flag/
   link/image icons) alike — carries flat width="16" height="16" HTML
   attributes and no CSS sizing class of its own (unlike this theme's own
   icons, can_v7_icon()'s .icon, which are already 1em/1em — style.css),
   so neither ever scaled with the font-size picker's --tui-font-size.
   A CSS width/height still wins over those HTML attributes (confirmed
   by .log-action-icon .can-log-icon's own pre-existing override, further
   down) — 1.3333em here reproduces that same 16px at this project's
   12px default font-size, but actually scales past it. */
.tui-activity .can-log-icon,
.tui-activity .bi {
	width: 1.3333em;
	height: 1.3333em;
}

/* Missing from the plugin's own CSS (no .gridmedia.author-featured rule at
   all there, only .gridmedia.insert/.location) — its own inline <script>
   (card-activity-term.php) absolutely-positions every .slide to crossfade
   them, which needs this container to actually BE the positioned ancestor
   they're absolute *within*; without it they escape to whatever unrelated
   ancestor happens to be positioned instead, all landing at the same wrong
   coordinates (looks like 3 images piled on each other, not a slideshow),
   and this container itself collapses to height:0 since 100% of its
   children left normal flow. */
/* --tui-font-size-relative (180px at the 12px default), same reasoning as
   --activityitemwidth above — both this and .slide below have to move
   together, since .slide's own JS-driven crossfade (article-progress-
   toc.js's own comment doesn't apply here, see the plugin's own inline
   <script> instead) sizes each slide to 100% of this container. */
.tui-activity .gridmedia.author-featured {
	position: relative;
	height: calc(var(--tui-font-size) * 15);
}

.tui-activity .gridmedia.author-featured div.slide {
	overflow: hidden;
	height: calc(var(--tui-font-size) * 15);
}

.tui-activity .sap-save-button, .tui-activity .sap-unsave-button {
	padding:0px;
	border: none;
	color: var(--bodycolor);
}

.tui-activity .sap-save-button:hover, .tui-activity .sap-unsave-button:hover {
	color: var(--darkcolor);
}

.tui-activity #metabutton.title {
	margin-right: 5px;
	background: var(--shadecolor);
	padding-right:2px;
}

/* Empty until now — get_the_post_thumbnail(..., 'medium') (card-activity-
   term.php) renders at its native size, which .slide's own overflow:hidden
   crops but doesn't fit/center, so it showed as an oversized, badly-
   cropped zoom instead of a clean photo filling the frame. Same
   width/height/object-fit treatment as the event card's own image above. */
.tui-activity .gridmedia.author-featured div.slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 16px in the plugin's own SVG markup (class-can-activity-logger-icons.php,
   every icon carries width="16" height="16" — a CSS override still wins
   over those HTML attributes) — 30% smaller, ~11.2px, rounded up to a
   flat 1em (12px at this project's own 12px default font-size) so it
   scales with --tui-font-size same as the .can-log-icon/.bi catch-all
   above, rather than staying a flat px value forever. */
.tui-activity .log-action-icon .can-log-icon {
	width: 1em;
	height: 1em;
}

/* Overrides the plugin's own margin-left: 20px (its own style.css) — but
   that rule's own width: 100% (also its own, unmodified) is 100% of the
   *containing block*, not of "the space left after this margin", so
   margin-left + width:100% always overflows its container by the margin
   amount (box-sizing only ever absorbs padding/border into a width, never
   margin) — true at 20px, still true at this rule's own smaller 1.5em,
   just by less. This is the real, pre-existing cause of the whole feed
   needing horizontal scroll, unrelated to any one entry's own border. */
.tui-activity #activity-feed-buttons {
	margin-left: 1.5em;
	width: calc(100% - 1.5em);
}

/* Plugin's own render_activity_log_item() (class-can-activity-logger-
   shortcode-v3.php, unmodified) never prints a leading marker — added
   via ::before instead of touching that PHP. Floated left, same as
   .log-datetime right after it in source order (its own float:left, the
   plugin's own style.css) — an inline ::before here would otherwise
   render wherever normal flow places it relative to that float, not
   reliably in front of it. */
.tui-activity .activity-log-item::before {
	content: "▶︎";
	float: left;
	margin-right: 0.5em;
	color: var(--bodycolor);
}

.tui-activity .can-activity-back-to-feed-item::before {
	content: "";
}

.tui-activity .can-activity-channel-header-item {
	padding-top: 0.5em;
	padding-bottom: 0.5em;
}

.tui-activity .can-activity-channel-header-item a {
	font-size: 1.25em;
}

/* The composer row (.new-activity-entry, inc/activity-components/
   activity-post.php) is also an .activity-log-item, so it got this
   marker too, on top of its own blinking ▶︎
   (.activity-post-trigger.blink) — that one's the real, clickable
   trigger (focuses the status field), so this static duplicate is just
   noise here. */
.tui-activity .new-activity-entry::before {
	content: none;
}

/* "•••" per-item menu (Report/Edit/Delete —
   CAN_Activity_Logger_Report_Shortcode) — the plugin already positions
   this correctly (.activity-log-item has its own position: relative, so
   the menu anchors to each item's own corner, not the window's) and
   already uses this theme's own CSS variables throughout, just not this
   theme's own font or hover treatment (a full background/color
   inversion, same as Comment/Dap's own plugin default above, swapped
   here for the same subtle --shadecolor fill instead). */
.tui-activity .can-log-actions-toggle {
	appearance: none;
	color: var(--bodycolor);
}

.tui-activity .can-log-actions-toggle:hover {
	color: var(--darkcolor);
}

.tui-activity .can-log-actions-menu {
	font-family: var(--tui-font);
	font-size: 1em;
	border-radius: var(--tui-window-radius);
	overflow: hidden; /* a row's hover shade follows the rounded corners */
}

.tui-activity .can-log-actions-menu button,
.tui-activity .can-log-actions-menu a.can-report-log-btn,
.tui-activity .can-log-actions-menu a.can-edit-log-btn {
	appearance: none;
	font-family: var(--tui-font);
	color: var(--bodycolor);
}

.tui-activity .can-log-actions-menu button:hover,
.tui-activity .can-log-actions-menu a.can-report-log-btn:hover,
.tui-activity .can-log-actions-menu a.can-edit-log-btn:hover {
	background: var(--shadecolor);
	color: var(--bodycolor);
}

/* Comment popup ([can_leave_comment-v2]) styling moved to style.css —
   this file only loads once the Activity window/page itself opens
   (assets/js/activity.js's own loadStylesheet()), but the same shortcode
   also renders from template-parts/post/content.php's own single-post
   "Activity Log" section now, which never loads this file at all — see
   style.css's own copy of this comment for the rest. */

.activity-photo-btn, .activity-comments-btn {
	width: 15px;
	height: 15px;
}

.activity-code-btn {
	width: 18px;
	height: 18px;
}

.activity-liveurl-btn {
	width: 18px;
	height: 18px;
}

.gridliveurl .gridmeta #metabutton {
    display: inline-block;
    font-size: 0.8em;
		line-height: 1.4;   /* unitless; no !important needed */
}

/* .tooltip/.tui-tooltip-label (style.css's own generic mouse-following
   mechanism, assets/js/main.js) is the one and only tooltip convention
   now — the composer's own Live URL/Attach Image/Attach Code/Enable
   Comments buttons (inc/activity-components/activity-post.php) used to
   carry a second, separate .tooltip/.tooltiphover convention instead
   (CSS-only, anchored to the button's own corner, no mouse-tracking —
   this theme never ported the real CANV6 JS for it), migrated onto the
   shared mechanism instead of maintaining two, per the user. The Like
   button's own "+ Give Dap"/"- Remove Dap" (CAN_Activity_Logger_Like_
   Shortcode) and Copy Code/Apply Theme (card-activity-post.php's own
   can_render_code_block(), styled/positioned by its own embedded
   <style> block) were the convention's only other two uses — the first
   is already part of the old, hidden pre-[can_activity_buttons] row
   (.can-activity-og-buttons > *:not(.can-comment-popup) { display:
   none }, the plugin's own CSS), the second was always self-contained
   and never depended on anything in this file to begin with. */

/* #activity-comment (the comment body, on Comment/Term Comment/Event
   Comment log items) has the same float:left problem
   .gridactivitycard.status had (its own style.css) — sits beside the
   preceding inline log-line content instead of dropping to a clean new
   line below it. */
.tui-activity #activity-comment {
	float: none;
	display: block;
	clear: both;
	margin-top: 0.5em;
	/* Only as wide as the words need (up to the full width), not the whole row. */
	width: fit-content;
	max-width: 100%;
}

/* Edge-to-edge — same -20px bleed convention as .tui-window-thumb's own
   (negates .tui-window-body's own 16px 20px padding on both sides). */
.tui-activity {
	margin: 0 -1em;
}

.tui-activity .activity-log-item.is-post-author {
	border-left: 4px solid var(--midcolor);
}

.tui-activity .activity-log-item {
	border-left: none;
	border-right: none;
}

.tui-activity .can-activity-buttons-wrapper {
	margin-left: 1.25em;
}

/* The plugin's own margin-left: -1.5em (its own style.css) pulls the
   count in against the flex gap .can-activity-buttons' own 1em flex gap
   provided — now 0.5em (further up, per the user), so that same -1.5em
   overlaps even more, reading as too tight. -0.25em nets out to a small
   positive gap against the new 0.5em instead. */
.tui-activity .can-activity-like-count {
	margin-left: -0.8em;
}

/* "Mini" mode — same .tui-window--mini model as jobs'/Latest's/Events'
   (main.js's shared setWindowMini()), resolved server-side like Events'
   own (inc/window-handlers/events.php's can_v7_render_events_mini()):
   inc/window-handlers/activity.php's can_v7_render_activity_mini()
   renders a plain-text .tui-activity-mini preview up front, always,
   hidden here unless .tui-window--mini is active — same "no extra AJAX
   round trip" end result as jobs'/Latest's own pure-CSS toggle, just
   resolved up front since Activity's real content is a dozen+
   differently-shaped plugin card types with no single column to collapse
   via CSS alone. */
.tui-activity-mini {
	display: none;
	/* .tui-activity's own margin: 0 -20px (below, the edge-to-edge bleed
	   that negates .tui-window-body's own 16px 20px padding) bleeds this
	   too, unlike the plugin's own .activity-log-item rows, which carry
	   their own compensating 1em padding — without this, mini content
	   sits flush against/under the window's own left edge instead of
	   inset like everything else, which is what was actually swallowing
	   the marker the whole time this session, not any of the glyph/font/
	   box-sizing theories tried first. */
	padding: 0 1.25em;
}

/* Two real columns (symbol+timestamp | text) that line up across every
   row, not just a flex row wrapping within itself — the grid lives on
   the LIST (this element), not each row, with .tui-activity-mini-row
   (below) as display: contents so its own children (.tui-activity-mini-
   meta, .tui-activity-mini-text) become direct grid items here instead;
   a grid on each row individually would size its own first column off
   only that row's own content, not the widest one across the whole
   list, so rows wouldn't actually align. */
.tui-window--mini[data-content-type="activity"] .tui-activity-mini {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 1em;
}

.tui-window--mini[data-content-type="activity"] .tui-activity-full {
	display: none;
}

/* Quick-post input, above the mini preview rows (inc/window-handlers/
   activity.php's can_v7_render_activity_mini()) — posts straight to the
   real feed via the same new_activity_entry AJAX action/nonce the full
   composer uses (assets/js/activity.js's own listener), plain text only.
   grid-column: 1 / -1 spans both of .tui-activity-mini's own grid
   columns (its own rule above) instead of landing in just the first,
   narrow one. margin cancels .tui-activity-mini's own 1.25em side
   padding so this reaches the true edge, per the user — same
   bleed-then-repad convention as .tui-classic-page's own edge-to-edge
   rules elsewhere, with its own padding standing in for the cancelled
   amount instead of letting placeholder text sit flush against the
   window edge. */
.tui-activity-mini-quickpost {
	grid-column: 1 / -1;
	margin: 0 -1.25em 0.5em;
	padding: 0.5em 1.25em;
	border: none;
	outline: none;
	background: var(--backgroundcoloralt);
	color: var(--bodycolor);
	font-family: var(--tui-mono-font);
	font-size: 0.80em;
}

.tui-activity-mini-quickpost::placeholder {
	color: var(--bodycolor);
	opacity: 0.5;
}

.tui-activity-mini-row {
	display: contents;
}

.tui-activity-mini-meta {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	padding: 0.5em 0;
	font-size: 0.80em;
}

/* ▶︎ — plain text in the markup itself (inc/window-handlers/activity.php),
   not a ::before (wasn't rendering as a flex item here). The real bug
   that made every version of this marker look invisible/missing while
   testing turned out to be unrelated to the glyph itself: .tui-activity-
   mini's own missing padding (see that rule above) — fixed there. */
.tui-activity-mini-marker {
	flex: 0 0 auto;
	color: var(--bodycolor);
}

.tui-activity-mini-text {
	display: block;
	padding: 0.5em 0;
	font-size: 0.80em;
	min-width: 0;
	color: var(--linkcolor);
}

.tui-activity-mini-time {
	flex: 0 0 auto;
	color: var(--bodycolor);
	white-space: nowrap;
}

/* The plugin's own animated "..." loading dots (its own <style>, this
   window's own inline <script>'s can-load-dots keyframes) sit flush
   against the button's own label with no gap at all. */
.can-load-more-btn-V3.loading::after {
	padding-left: 1em;
}

.can-load-more-btn-V3 {
	display: inline-block;
	box-sizing: border-box;
	max-width: 100%;
	padding-left: 12px;
	margin-top: 6px;
}

/* Classic-nav mode (page.php's real render of this content when
   can_v7_user_wants_classic_nav() is on, inc/window-handlers/settings.php
   — a real page, not a floating window, so this theme's own
   window-chrome bleed/padding doesn't apply, and assets/js/activity.js's
   own init() skips the floating-sidebar treatment for it, see that
   file's own isWindow comment). Two columns instead: feed content, then
   the sidebar as a normal, position: sticky column next to it. */
.tui-classic-page .tui-activity {
	margin: 0;
	display: flex;
	align-items: flex-start;
	gap: 18px;
}

/* flex/order/margin-right belong on .tui-activity-full, not this element —
   .can-activity-log-container-V3 is nested a level deeper (inside
   .tui-activity-full, itself the direct sibling flex item next to
   #tui-activity-filters below — inc/window-handlers/activity.php's own
   $toolbar . $content concatenation), so it was never actually a flex
   item and these properties were dead CSS: without flex-grow anywhere on
   the *actual* flex item, .tui-activity-full shrank to its own content's
   width (measured ~717px on a 1416px-wide row) instead of filling the
   row, and this element's own width:auto then sized to fill *that*
   (717 − 240 margin = 477px) — nowhere near full width. Same mismatch
   the mobile rule further down already called out and fixed at the
   right level; this desktop rule just hadn't been yet. Kept here anyway,
   now genuinely inert (real block width:auto already fills whatever
   .tui-activity-full resolves to) — harmless, but removing it risks
   looking like an oversight to a future reader same as its absence
   already did once. */
.tui-classic-page .can-activity-log-container-V3 {
	min-width: 0;
}

.tui-classic-page .tui-activity-full {
	flex: 1 1 auto;
	min-width: 0;
	order: 1;
	/* The sidebar is position: fixed now (below), out of this flex row
	   entirely, so nothing here reserves it real space any more — without
	   this the feed runs full-width underneath it. Just the sidebar's own
	   width, a quarter of the page (#tui-activity-filters, below — kept in step by
	   hand, no shared variable), no extra gap on top (per the user) —
	   right: 12px on the sidebar (see that rule's own comment) is what
	   makes its right edge line up with the feed's. */
	margin-right: 240px;
}

/* Desktop: a quarter of the page, as wide as the sidebar (#tui-activity-filters below). */
@media (min-width: 769px) {
	.tui-classic-page .tui-activity-full {
		margin-right: 25%;
	}
}

/* Keeps #tui-activity-filters' own position: fixed (style.css). `order`
   turned out not to affect a fixed element's static-position reliably (it
   stayed left, under the flex flow's un-reordered DOM position), and with
   no z-index it painted behind the feed content that comes after it in
   DOM order — explicit top/right + a z-index above the feed fixes both.
   right: 12px, not .tui-shell's own 14px right padding — measured
   directly (getBoundingClientRect()) against the titlebar's/feed's own
   actual right edge, 14px left it 2px short of lining up, per the user. */
.tui-classic-page #tui-activity-filters {
	top: 100px;
	right: 13px; /* 1px further left than the feed's 12px edge, per the user */
	z-index: 10;
	box-shadow: none;
	border-radius: 0;
	border-left: 1px solid var(--linecolor); /* classic has no window edge beside it, so it gets its own left line */
}

/* Desktop: a quarter of the page's width (.tui-shell has 1em either side); the feed's and titlebar's margin-right is 25% to match. */
@media (min-width: 769px) {
	.tui-classic-page #tui-activity-filters {
		width: calc((100vw - 2em) * 0.25);
		right: 12px; /* desktop: its left line sat 1px over the feed's right line at 13px */
	}
}

/* Classic mode's own hide/show toggle (assets/js/activity.js, the
   .tui-classic-titlebar button it inserts) — a separate concept from
   the floating window's own .tui-activity-filters--collapsed (that one
   shrinks to a thin strip, still visible/clickable; this one fully
   hides, since on a narrow classic page the always-position:fixed
   sidebar now sits as an overlay on top of the feed rather than in a
   reserved column). */
/* #tui-activity-filters, not just the class — the base rule (style.css)
   is itself an id selector (display: flex), which otherwise always wins
   over a plain class selector on specificity regardless of source
   order, same mistake already made once this session for the window
   version's own collapsed state. */
#tui-activity-filters.tui-activity-filters--classic-hidden {
	display: none;
}

/* Mobile classic: the sidebar slides in from, and back out to, the right edge instead of popping in and out.
   Hidden it is moved off-screen (and visibility: hidden once the slide ends) rather than display: none, which can't
   animate. The transition is only switched on after the first toggle, so the page doesn't load with it sliding out. */
@media (max-width: 768px) {
	#tui-activity-filters.tui-activity-filters--classic-hidden {
		display: flex;
		transform: translateX( calc( 100% + 13px ) );
		visibility: hidden;
		pointer-events: none;
	}

	/* Not shown until the script has decided open/hidden (--classic-ready), so it doesn't flash on load. */
	.tui-classic-page #tui-activity-filters:not(.tui-activity-filters--classic-ready) {
		visibility: hidden;
	}

	.tui-classic-page #tui-activity-filters.tui-activity-filters--animated {
		transition: transform 0.25s ease, visibility 0s;
	}

	.tui-classic-page #tui-activity-filters.tui-activity-filters--animated.tui-activity-filters--classic-hidden {
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
	}
}

/* Desktop classic — the hide/show toggle and its hidden state are
   mobile-only, per the user: the sidebar is always visible here (same
   as before this feature existed), and the toggle button itself (added
   to .tui-classic-titlebar by assets/js/activity.js regardless of
   width) is hidden rather than left sitting there with nothing to do.
   Same specificity (id + class) as the rule above, so source order
   alone decides — this comes after it and so wins at this width. */
@media (min-width: 769px) {
	#tui-activity-filters.tui-activity-filters--classic-hidden {
		display: flex;
	}

	.tui-classic-page [data-window-action="activity-filters-toggle"] {
		display: none;
	}
}

.tui-activity-filters-version {
	margin-bottom: 0.5em;
}

/* Mobile classic: the page behind the open sidebar doesn't scroll. */
@media (max-width: 768px) {
	html.tui-activity-sidebar-open,
	html.tui-activity-sidebar-open body {
		overflow: hidden;
		overscroll-behavior: none;
	}
}

/* Mobile classic: the actions under the filters (Scroll to Top, Edit Profile, About, version) are hidden. */
@media (max-width: 768px) {
	.tui-classic-page #tui-activity-filters .tui-activity-filters-actions {
		display: none;
	}
}

/* .tui-activity .activity-log-item (further up) strips the plugin's own
   left/right borders entirely — redundant inside a real window, which
   already has its own edge. No window edge here either, and now the
   sidebar sits to the right with its own border-left (just above) — this
   gives the feed a matching right edge instead of the two just floating
   apart with nothing between them. */
.tui-classic-page .activity-log-item {
	border-left: 1px solid var(--linecolor);
	border-right: 1px solid var(--linecolor);
}

.tui-classic-page .new-activity-entry {
	border-top: 1px solid var(--linecolor);
}

/* Mobile classic-nav layout — same <768px breakpoint
   can_v7_user_wants_classic_nav()'s own default-on-mobile cookie uses
   (inc/window-handlers/settings.php), so this is exactly the width range
   a classic Activity page is actually likely to be viewed at. Just the
   feed column here now — a fixed-px --activityitemwidth (grid cards,
   maps, thumbnails) would otherwise run wider than the screen itself.
   The sidebar (#tui-activity-filters) no longer gets a special mobile
   treatment at all, per the user — it stays position: fixed same as
   desktop classic, which at this width means it now sits as an overlay
   on top of the feed instead of in a reserved column (nothing here
   reserves it any margin — see .tui-activity-full/
   .can-activity-log-container-V3 just below, which still run full width
   at this breakpoint), toggled via the hide/show button
   assets/js/activity.js adds to the classic titlebar
   (.tui-activity-filters--classic-hidden, defined above). */
@media (max-width: 768px) {
	.tui-classic-page .tui-activity {
		flex-direction: column;
		/* Edge-to-edge — negates .tui-shell's own 14px side padding
		   (style.css), the only thing otherwise inset-ing this from the
		   screen's real edges. Scoped to .tui-activity specifically (not
		   .tui-classic-page generally), so Archives' own classic mobile
		   layout is untouched. */
		margin-left: -14px;
		margin-right: -14px;
		/* The base rule's own gap: 18px (further up) is meant for the
		   desktop row — #tui-activity-filters is position: fixed there (and
		   stays fixed here too, an overlay rather than rejoining the flex
		   flow — see the hide/show toggle a few rules up), so that gap only
		   ever affected .tui-activity-full's own margin-right math, not a
		   real visual gap here either way — removed per the user. */
		gap: 0;
	}

	/* Flush against the screen's right edge and full width once it's an
	   overlay here, rather than the desktop rule's own right: 12px/240px
	   (lining up with the feed's own right edge, which doesn't read the
	   same way floating on top of it instead of beside it) — per the
	   user. box-sizing: border-box (global reset) keeps the border
	   inside that 100%, not overflowing it. */
	.tui-classic-page #tui-activity-filters {
		right: 0;
		width: 50%;
	}

	/* --activityitemwidth: 100% (further down) means these blocks now
	   fill the full bled width above — without their own right margin
	   they'd run flush to the true screen edge on that side too. 1.5em,
	   matching .tui-grid-card's own left margin exactly (further up), so
	   the gap from the screen edge reads the same on both sides — not
	   just some breathing room, per the user. Scoped to .tui-activity
	   specifically (not just .tui-classic-page), same reasoning as the
	   sibling rule just above — .tui-grid-card is the generic card class
	   every other classic-page grid (Latest, Archives, Saved, Related
	   posts, taxonomy listings) also uses, and this was leaking into all
	   of them, showing up as an oversized/uneven gap on mobile. */
	.tui-classic-page .tui-activity .tui-grid-card,
	.tui-classic-page .tui-activity .gridmedia.insert:not(.website):not(.location) {
		margin-right: 1.5em;
	}

	/* The plugin sizes the map's height from --activityitemwidth too, but a
	   percentage there resolves against an auto-height parent and collapses —
	   width:100% + aspect-ratio keeps it filling its card and square.
	   overflow: hidden + forcing the inner <svg> (the map library's own
	   D3/datamaps render, card-activity-map.php — never modified) to
	   width/height: 100% is needed too: that svg gets explicit pixel
	   width/height attributes baked in once, from whatever size its own
	   JS measured the container as at init — on classic mobile that can
	   run before this CSS's own aspect-ratio has settled the container's
	   real size, so the svg was drawing itself larger than the box and
	   spilling out of it instead of scaling down to fit. CSS width/height
	   on an <svg> overrides its own width/height attributes, and since it
	   has a viewBox (a D3 geo projection), 100% scales it proportionally
	   rather than just clipping it. */
	.tui-classic-page #activity-map-container {
		width: 100%;
		height: auto;
		aspect-ratio: 1 / 1;
		overflow: hidden;
	}

	.tui-classic-page #activity-map-container svg {
		width: 100% !important;
		height: 100% !important;
	}

	.tui-classic-page .new-activity-entry {
		border-top: none;
	}

	/* .can-log-actions (the plugin's own report/edit corner menu toggle,
	   can-activity-logger/assets/css/style.css) is position: absolute;
	   right: 0 by default — flush against its own relatively-positioned
	   ancestor's edge, which on classic mobile is the log item's own
	   edge-to-edge bled box (.tui-activity's own negative margins
	   above). Same 1.5em as the grid cards' own right margin just
	   above, so it sits the same distance from the screen edge as
	   everything else here instead of flush against it — per the user. */
	.tui-classic-page .can-log-actions {
		right: 1.5em;
	}

	/* Weekly activity chart (inc/activity-components/week-browser.php) —
	   hidden on classic mobile, per the user. */
	.tui-classic-page #tui-week-browser {
		display: none;
	}

	/* order/width belong on .tui-activity-full, not
	   .can-activity-log-container-V3 — that one's nested a level deeper
	   (inside .tui-activity-full, itself the direct sibling flex item
	   next to #tui-activity-filters below — inc/window-handlers/
	   activity.php's own $toolbar . $content concatenation), so it was
	   never actually a flex item order could do anything for. The
	   desktop rule above had this exact same mismatch on flex/margin-right
	   too (not just order) — genuinely not harmless there either, just
	   not yet noticed: without flex-grow on the real flex item, the feed
	   was shrinking to a fraction of the available row width. Fixed at
	   the same level there now, per the user. */
	.tui-classic-page .tui-activity-full {
		order: 2;
		width: 100%;
	}

	.tui-classic-page .tui-activity .can-activity-log-container-V3 {
		width: 100%;
		margin-right: 0;
	}

	/* calc(100% - 1.5em), not a flat 100% — .tui-grid-card/.gridmedia.insert
	   (further up) also get their own margin-right: 1.5em now, and
	   width: 100% plus that margin would overflow the container by that
	   same 1.5em (margin always sits outside the box regardless of
	   box-sizing: border-box) instead of leaving real breathing room on
	   the right. */
	.tui-classic-page .tui-activity {
		--activityitemwidth: calc(100% - 3em);
	}
}

/* Composer (.new-activity-entry, inc/activity-components/activity-post.php
   — see that file's own doc comment) — moved here from that file's own
   inline <style> block, same reasoning as everything else in this file:
   one place for all of Activity's own styling. Pure CSS, no PHP
   interpolation, so the move is a straight cut/paste. */
.status-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}
.status-value {
    outline: none;
    cursor: text;
    display: inline-block;
    width: 100%;
    word-break: break-word;
}
.status-value.empty::before {
    content: var(--status-placeholder, 'Set Status / Enter to Post');
    opacity: 0.3;
    pointer-events: none;
}
.status-value.empty.hide-placeholder::before {
    display: none;
}
.status-saved {
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
    position: absolute;
    left: 0;
    top: 0;
}

.activity-liveurl-btn,
.activity-photo-btn,
.activity-comments-btn {
    will-change: opacity;
}

.status-saved.visible {
    opacity: 0.4;
}
.activity-post-trigger {
    cursor: pointer;
    margin-right: 4px;
}
.activity-char-counter {
    font-size: 0.80em;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
    font-family: var(--tui-mono-font);
    margin-top: 6px;
    margin-right: 0;
    flex-shrink: 0;
}
.activity-char-counter.visible { opacity: 0.6; margin-right: 1em; }
.activity-char-counter.warning { opacity: 1; margin-right: 1em; }
.activity-char-counter.over { opacity: 1; color: red; margin-right: 1em; }
.activity-liveurl-btn {
    margin-right: 0.5em;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    margin-top: 4.5px;
}
.activity-liveurl-btn:hover { opacity: 1; }
.activity-liveurl-btn.active { opacity: 1; }
.activity-liveurl-btn svg { display: block; }

.activity-code-btn {
    margin-left: 0.75em;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    margin-top: 3px;
}
.activity-code-btn:hover { opacity: 1; }
.activity-code-btn.active { opacity: 1; }

.activity-photo-btn {
    margin-left: 0.5em;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}
.activity-photo-btn.disabled {
    opacity: 0.2;
    pointer-events: none;
}
.activity-photo-btn:hover { opacity: 1; }
.activity-photo-filename {
    font-size: 0.80em;
    opacity: 1;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--tui-mono-font);
    margin-top: 5px;
}
.activity-comments-btn {
    margin-left: 0.75em;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    margin-top: 5px;
}
.activity-comments-btn:hover { opacity: 1; }
.activity-comments-btn.disabled { opacity: 0.4; }
.activity-share-wrap {
    position: relative;
    margin-left: 0.75em;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-top: 5px;
}
.activity-share-btn {
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}
.activity-share-btn:hover,
.activity-share-btn.active,
.activity-share-wrap:has(.activity-share-menu:not([hidden])) .activity-share-btn { opacity: 1; }

/* The menu that switches on which services an entry also goes to: the look of the Share menus (a box in the theme's colours). */
.activity-share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5em;
    min-width: 11em;
    background: var(--backgroundcolor);
    border: 1px solid var(--linecolor);
    border-radius: var(--tui-window-radius);
    overflow: hidden; /* a row's hover shade follows the rounded corners */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    z-index: 100;
    white-space: nowrap;
}
.activity-share-menu[hidden] { display: none; }
.activity-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2em;
    padding: 0.35em 1em;
    color: var(--bodycolor);
}
.activity-share-row .tui-settings-toggle {
    font-size: 1.6em;
}
.mention-suggestions {
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-top: 2em;
    padding-bottom: 2px;
    scrollbar-width: none;
}
.mention-suggestions::-webkit-scrollbar { display: none; }
.mention-suggestions.visible { display: flex; }
.liveurl-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 0.5em;

}
.liveurl-input {
    flex: 1;
    border: 1px solid var(--linecolor);
    outline: none;
    background: var(--backgroundcoloralt) !important;
    font-size: 0.80em;
    font-family: var(--tui-mono-font);
    opacity: 0.7;
		padding: 0.5em;
    min-width: 0;
		color: var(--bodycolor);
}
.liveurl-input::placeholder {
    color: var(--bodycolor);
    opacity: 0.5;
}
.liveurl-input:focus { opacity: 1; }
.liveurl-input::placeholder { opacity: 0.4; }
.liveurl-input.is-blocked {
    border-bottom-color: red;
    color: red;
}
.liveurl-blocked-msg {
    font-size: 1em;
    color: red;
    white-space: nowrap;
    font-family: var(--tui-mono-font);
    line-height: 1;
    width: 16px;
    height: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.liveurl-confirm-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    display: flex;
    align-items: center;
    color: currentColor;
    transition: opacity 0.2s;
}
.liveurl-confirm-btn:hover { opacity: 1; }
.liveurl-confirm-btn svg { width: 16px; height: 16px; }

.code-input-wrap {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 0.5em;
}
.code-input-liner {
    display: flex;
    flex: 1;
    min-width: 0;
    border: 1px solid var(--linecolor);
    background: var(--backgroundcoloralt);
    overflow: hidden;
}
.code-input-ln-col {
    font-family: var(--tui-mono-font);
    font-size: 0.80em;
    line-height: 1.5;
    padding: 2px 6px 2px 4px;
    text-align: right;
    opacity: 0.25;
    user-select: none;
    white-space: pre;
    border-right: 1px solid var(--linecolor);
    min-width: 2em;
    color: var(--bodycolor);
    overflow: hidden;
}
.code-input {
    flex: 1;
    border: none !important;
    outline: none;
    background: transparent !important;
    font-size: 0.80em;
    font-family: var(--tui-mono-font);
    opacity: 0.7;
    padding: 2px 4px 2px 4px;
    margin: 0;
    resize: vertical;
    min-width: 0;
    line-height: 1.5;
    color: var(--bodycolor);
    box-sizing: border-box;
    vertical-align: top;
    /* Same transient sidescroll as .can-comment-text had (this file's own
       comment on that rule) — .code-input-wrap starts display: none and
       flips to flex when the code button is clicked, and a resize:
       vertical textarea's own layout pass can settle a beat after that.
       Horizontal scroll is never actually wanted here regardless (code
       lines wrap; .code-input-ln-col's own line numbers are the only
       thing that should ever need horizontal room, and that's a
       separate element). */
    overflow-x: hidden;
}
.code-input::placeholder {
    color: var(--bodycolor);
    opacity: 0.5;
}
.code-input:focus { opacity: 1; }
.code-confirm-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    display: flex;
    align-items: flex-start;
    color: currentColor;
    transition: opacity 0.2s;
    align-self: flex-start;
    margin-top: 2px;
}
.code-confirm-btn:hover { opacity: 1; }
.code-confirm-btn svg { width: 16px; height: 16px; }

.can-activity-log-container-V3 .new-activity-entry {
	z-index: auto;
}

.activity-post-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    #activity-new-entry {
        flex-wrap: wrap;
    }
    #activity-new-entry .status-wrap {
      flex: 1 1 0% !important;
      min-width: 0;
      width: 0;
    }
    #activity-new-entry .activity-post-actions {
        flex-basis: 100%;
        width: 100%;
        margin-top: 6px;
    }
    #activity-new-entry .status-value {
    display: block;
    }

    .activity-post-actions {
      margin-left: 1em;
      margin-top: 0.5em;
    }
}

/* Desktop classic Activity: the titlebar spans just the feed column (same
   inset as .tui-activity itself, and stopping where the fixed sidebar
   starts — the feed's own 25% margin-right above), not edge to edge.
   Mobile keeps the edge-to-edge titlebar, since the layout stacks there. */
@media (min-width: 769px) {
	.tui-classic-page:has(.tui-activity) .tui-classic-titlebar {
		margin-left: 0;
		margin-right: 25%;
		border-left: 1px solid var(--linecolor);
		border-right: 1px solid var(--linecolor);
		margin-bottom: -1px;
	}
}

/* Widget mode (inc/window-handlers/activity.php's can_v7_render_activity_widget(),
   assets/js/main.js's WIDGET_MODE_TYPES) — hidden by default, shown
   instead of the toolbar/mini/full feed once .tui-window--widget is
   active (the reparented #tui-activity-filters sidebar is hidden via JS
   instead — assets/js/activity.js's own syncFilterPosition(), since it
   no longer lives inside this window's own DOM subtree by the time CSS
   here could reach it). Big count on the left, weekly chart on the
   right — same two-zone layout as the reference design (per the user). */
.tui-activity-widget {
	display: none;
}

.tui-window--widget[data-content-type="activity"] .tui-activity-mini,
.tui-window--widget[data-content-type="activity"] .tui-activity-full,
.tui-window--widget[data-content-type="activity"] .tui-activity-widget {
	display: flex;
}

.tui-window--widget[data-content-type="activity"] .tui-activity-mini,
.tui-window--widget[data-content-type="activity"] .tui-activity-full {
	display: none;
}

.tui-activity-widget {
	align-items: stretch;
	gap: 1em;
	width: 100%;
	box-sizing: border-box;
	padding: 0 1em;
}

/* Fixed outer width, like the other widgets (fit-content would shrink it near the screen edge). */
.tui-window--widget[data-content-type="activity"] {
	width: 380px !important;
}

.tui-activity-widget-stats {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	width: auto;
}

.tui-activity-widget-count {
	color: var(--darkcolor);
	font-size: 3.5em;
	line-height: 1;
}

.tui-activity-widget-count-label {
	color: var(--bodycolor);
	font-size: 0.80em;
	margin-top: 1em;
}

.tui-activity-widget-time {
	color: var(--bodycolor);
	font-size: 0.80em;
	opacity: 0.6;
	/* Only this one gets pushed to the bottom of the stretched column
	   (stats stretches to match the chart's own 140px height) — count
	   and label above it stay tight together instead of also being
	   spread across the full height the way justify-content: space-between
	   used to do. */
	margin-top: auto;
}

.tui-activity-widget-chart {
	flex: 1 1 auto;
	/* A flex item's default min-width is auto (its own content's
	   intrinsic size, not 0) — without this, the canvas's own default
	   width (300px, before Chart.js's responsive sizing ever kicks in)
	   refuses to shrink to fit the remaining row space, overflowing
	   .tui-activity-widget into a sidescroll instead. */
	min-width: 0;
	position: relative;
	border-left: 1px solid var(--linecolor);
	padding-left: 1em;
}

/* The latest entries above the chart: "▶ 1h @name" with the entry text under it,
   cut off to one line, a rule between rows. */
.tui-activity-widget-recent {
	margin-bottom: 0.5em;
}

.tui-activity-widget-entry {
	display: block;
	padding: 0.4em 0;
	border-bottom: 1px solid var(--linecolor);
	color: var(--bodycolor);
	text-decoration: none;
}

.tui-activity-widget-entry-meta,
.tui-activity-widget-entry-text {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.80em;
}

.tui-activity-widget-entry-meta {
	color: var(--darkcolor);
}

.tui-activity-widget-entry-text {
	opacity: 0.8;
}

.tui-activity-widget-plot {
	position: relative;
	height: 140px;
}

/* week-browser.php's own wrapper div (#tui-activity-widget-week-browser,
   the id override can_v7_render_activity_widget() passes it) — no
   explicit size of its own by default (unlike the sidebar's real
   #tui-week-browser, style.css), so Chart.js's own responsive sizing
   (which resizes to match the canvas's *immediate* parent) would
   otherwise have nothing to measure. Fills .tui-activity-widget-plot
   (the chart's own 140px box, under the recent entries) instead. */
.tui-activity-widget-plot > div {
	height: 100%;
	position: relative;
}

/* Classic Activity on a touch tablet (iPad): the page is exactly as tall as the visible screen and only the feed scrolls, so Safari's
   address bar contracting never scrolls the page and the fixed sidebar stays put. Mirrored in assets/js/activity.js. */
@media (min-width: 769px) and (hover: none) and (pointer: coarse) {
	html[data-classic-nav="1"] .tui-shell:has(.tui-classic-page > .tui-activity) {
		height: 100dvh;
		min-height: 0;
		overflow: hidden;
	}

	html[data-classic-nav="1"] body:has(.tui-classic-page > .tui-activity) {
		overflow: hidden;
	}

	html[data-classic-nav="1"] .tui-shell:has(.tui-classic-page > .tui-activity) .site-main {
		flex: 1 1 0;
		min-height: 0;
		display: flex;
		flex-direction: column;
	}

	.tui-classic-page:has(> .tui-activity) {
		flex: 1 1 0;
		min-height: 0;
		display: flex;
		flex-direction: column;
	}

	.tui-classic-page > .tui-activity {
		flex: 1 1 0;
		min-height: 0;
		align-items: stretch;
	}

	.tui-classic-page > .tui-activity > .tui-activity-full {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: none;
	}
}

/* The feed's scroll area runs down to just above the footer link: less space between them. */
@media (min-width: 769px) and (hover: none) and (pointer: coarse) {
	html[data-classic-nav="1"] .tui-shell:has(.tui-classic-page > .tui-activity) .site-footer {
		margin-top: 0;
		padding-top: 6px;
		padding-bottom: 8px;
	}
}

/* The video card's Expand and Mute buttons (CAN Activity plugin, card-activity-post.php): no background, the symbol white and inverted
   (difference blend) against whatever is behind it, so it reads on light and dark footage. Scoped to .tui-activity so V6 keeps its own look. */
.tui-activity .gridliveurl-expand,
.tui-activity .gridliveurl-mute,
.tui-activity .gridliveurl-expand:hover,
.tui-activity .gridliveurl-mute:hover {
	background: none;
	color: #fff;
	mix-blend-mode: difference;
}

.tui-activity .gridliveurl-expand {
	top: 0.5em;
	right: 0.5em;
}

.tui-activity .gridliveurl-mute {
	bottom: 0.5em;
	right: 0.5em;
}

.tui-activity .gridliveurl-expand:hover svg,
.tui-activity .gridliveurl-mute:hover svg {
	opacity: 0.5;
}

/* The Add to Constructor icon in an Activity entry's Share menu: the size it has in the post's own Share menu (1em), not the plugin's
   fixed 16px. */
.tui-activity .can-activity-share-constructor svg {
	width: 1em;
	height: 1em;
}
