/* -----------------------------------------------
   BLOCK STYLE: core/post-terms — valencia-pill
   Taxonomy terms as pills. Shares the likes/dislikes badge vocabulary
   from pattern-badge-row.css (accent-strong fill tint, accent-strong text, 7px radius)
   so the theme has one pill look, not one per context.

   Not style_data: post-terms renders its terms as inner <a> elements
   and the pill treatment has to land on those. style_data reaches the
   block wrapper and elements.link only, so the shape lives here.
   ----------------------------------------------- */

.wp-block-post-terms.is-style-valencia-pill {
  display: block;
}

.wp-block-post-terms.is-style-valencia-pill a {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: var(--valencia-pill-pad-y, 7px) var(--valencia-pill-pad-x, 14px);
  border-radius: 7px;
  background-color: var(--wp--custom--accent-tint);
  color: var(--wp--preset--color--accent-strong);
  /* Defaults match the likes/dislikes badges in pattern-badge-row.css so the
     theme has one pill look. A pattern that needs a quieter chip sets
     --valencia-pill-size (and the padding vars) on its own container
     rather than redefining the pill — see pattern-tagged-list.css. */
  /* Display face, matching the reference's own tag row. The sheet had no
     font-family, so pills inherited body type where the reference sets the
     display family. */
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--valencia-pill-size, var(--wp--preset--font-size--small));
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  /* core-single-post.css puts a 2px accent border-bottom on every link
     inside .valencia-entry-content (its editorial underline). That rule
     already excludes .wp-element-button for the same reason it has to
     be neutralised here: a pill is a filled chip, not running text, and
     the underline paints across its bottom edge. Matches how the
     likes/dislikes badges in pattern-badge-row.css render — no border. */
  border-bottom: none;
}

.wp-block-post-terms.is-style-valencia-pill a:hover {
  /* accent-strong, not accent. The rest state is already accent-strong
     type on a tint; hovering to white-on-pale-accent measured 2.13:1,
     which made the hover state LESS legible than the resting one. Filling
     with accent-strong keeps the "hover darkens" intent and puts white
     type on a 3.58:1 ground -- acceptable for a filled UI chip, where the
     3:1 non-text/large threshold applies rather than 4.5:1. */
  background-color: var(--wp--preset--color--accent-strong);
  color: var(--wp--preset--color--base);
}

/* The separator text node between terms — post-terms has no element
   to target, so collapse it to zero width rather than leaving a gap
   between pills that the margins already handle. */
.wp-block-post-terms.is-style-valencia-pill .wp-block-post-terms__separator {
  display: none;
}
