.wp-block-post-terms.taxonomy-category a::before,
.wp-block-post-terms.taxonomy-post_tag a::before {
	content: '#';
}
.wp-block-post-terms a {
	text-decoration-color: transparent;
}
/* Match the post-title hover: the soft underline fades in. The global
   link hover fades decoration out, which is invisible on links whose
   underline is already transparent. Outline pills keep their own
   background hover. */
.wp-block-post-terms:not(.is-style-outline) a:hover {
	text-decoration-color: var(--wp--custom--text-decoration-color);
}
/*
 * WCAG 2.5.8 — give term links a 24px-tall hit area when used as card meta.
 * Scoped via .is-card-meta so other post-terms usages stay unchanged.
 */
.wp-block-post-terms.is-card-meta a {
	display: inline-block;
	line-height: 1.5rem;
}
/* Card meta shows at most one line of terms: inline-block links wrap as
   whole units, so clipping at the 1.5rem line height keeps only the tags
   that fit — no mid-tag truncation — and every card's meta area stays the
   same height however many terms a post has. The full list remains on the
   single post. */
.wp-block-post-terms.is-card-meta {
	max-height: 1.5rem;
	overflow: hidden;
}
/* The one-line clamp clips anything outside the links, offsetting the outline so it's visible. */
.wp-block-post-terms.is-card-meta a:focus-visible {
	outline-offset: -1px;
}
/* Editor only (.is-selected never renders on the front end): while the
   block is selected, let the clipped terms and the prefix/suffix
   rich-text affordances paint past the clamp instead of releasing it —
   overflowing content stays visible and clickable, but the block keeps
   its one-line layout size, so selecting and deselecting never moves
   the surrounding card layout. */
.wp-block-post-terms.is-card-meta.is-selected {
	overflow: visible;
}
/* Outline pills: a flex row with a gap, so the spacing between pills and
   between wrapped rows doesn't depend on the separator text or line height.
   Post Terms has no Block spacing control, so the gap is set here. */
.wp-block-post-terms.is-style-outline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.wp-block-post-terms.is-style-outline .wp-block-post-terms__separator {
	display: none;
}
/* Flex ignores text-align, so map the block's alignment to the row. */
.wp-block-post-terms.is-style-outline.has-text-align-center {
	justify-content: center;
}
.wp-block-post-terms.is-style-outline.has-text-align-right {
	justify-content: flex-end;
}
.wp-block-post-terms.is-style-outline a:hover,
.wp-block-post-terms.is-style-outline a:focus {
	background-color: var(--wp--preset--color--theme-5);
	color: var(--wp--preset--color--theme-1);
}
@media not (prefers-reduced-motion) {
	.wp-block-post-terms.is-style-outline a {
		transition: background-color 0.4s, border-color 0.4s, color 0.4s ease;
	}
}
