/* ============================================================
   UH tag row: labelled tag chips on a light band.
   ============================================================ */

.uh-tag-row {
  --text-color: #000000;
  --background-color: #ffffff;
  background-color: var(--background-color);
  color: var(--text-color);
  padding: clamp(20px, 2.4vw, 44px) 42px;
}

/* Two classes: uh-home.css and uh-section-page.css set this and load after. */
.homepage > .uh-tag-row + * {
  margin-top: 0;
}

/* The podcast page puts a light band above this one. */
.uh-section-page > .uh-tag-row {
  margin-top: 0;
}

.uh-tag-row-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: clamp(10px, 1vw, 18px);
  row-gap: clamp(10px, 1vw, 18px);
  margin: 0;
  padding: 0;
}

.uh-tag-row-item {
  list-style-type: none;
  display: flex;
}

.uh-tag-row-link {
  font: var(--t-headline);
  position: relative;
  display: block;
  padding: 0.45em 0.7em;
  background-color: var(--text-color);
  color: var(--background-color);
  text-transform: uppercase;
  white-space: nowrap;
}

.uh-tag-row-link::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.5em;
  right: -0.5em;
  height: 2px;
  background-color: #000000;
  transform: translateY(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.uh-tag-row-link:hover::after,
.uh-tag-row-link:focus-visible::after {
  transform: translateY(-50%) scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .uh-tag-row-link::after {
    transition: none;
  }
}

@media (max-width: 991px) {
  .uh-tag-row {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Handlebars cannot read the viewport, so the row is rendered at its
     desktop count and trimmed here. */
  .uh-tag-row-item:nth-child(n + 16) {
    display: none;
  }
}

@media (max-width: 479px) {
  .uh-tag-row-item:nth-child(n + 11) {
    display: none;
  }
}
