/**
 * @file
 * MLT Modern — Taxonomy term pills.
 *
 * Renders taxonomy term reference fields as solid blue pill buttons,
 * matching the CTA button aesthetic. Each pill is a link to the term's
 * page, so they double as navigation.
 *
 * Markup (emitted by per-field templates in templates/):
 *
 *   <div class="mlt-taxonomy-pills__label">Tags</div>   {# optional #}
 *   <div class="mlt-taxonomy-pills">
 *     <a class="mlt-taxonomy-pill" href="/taxonomy/term/3">EV Chargers</a>
 *     <a class="mlt-taxonomy-pill" href="/taxonomy/term/4">Rewires</a>
 *   </div>
 *
 * To bring a new taxonomy field into the pill treatment, create a new
 * field template at:
 *   templates/field--node--field-X.html.twig
 *
 * Copy any of the existing field-mt-*-tags templates as a starting point.
 * The CSS below applies automatically — no changes needed here.
 */

/* -----------------------------------------------------------------------
 * Wrapper — horizontal flex row of pills, wraps to multiple lines as
 * needed. Bottom margin keeps the pills off whatever follows them.
 * ----------------------------------------------------------------------- */
.mlt-taxonomy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px 0;
  padding: 0;
}

/* -----------------------------------------------------------------------
 * Optional label (when the field's display config shows the label).
 * ----------------------------------------------------------------------- */
.mlt-taxonomy-pills__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--mlt-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* -----------------------------------------------------------------------
 * The pills themselves — solid blue, white text, pill-shaped.
 * ----------------------------------------------------------------------- */
.mlt-taxonomy-pill {
  display: inline-block;
  background: var(--mlt-primary);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--mlt-radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  border: 1px solid var(--mlt-primary);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.mlt-taxonomy-pill:hover,
.mlt-taxonomy-pill:focus {
  background: var(--mlt-primary-dark);
  border-color: var(--mlt-primary-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.mlt-taxonomy-pill:focus-visible {
  outline: 2px solid var(--mlt-accent);
  outline-offset: 2px;
}
