themes/olivero/css/components/tags.pcss.css
/**
 * @file
 * Tags field styling.
 */

@import "../base/media-queries.pcss.css";

.field--tags {
  display: flex;
  font-family: var(--font-sans);
}

.field--tags__label {
  margin: 0;
  margin-inline-end: calc(var(--sp1-5) - (var(--sp0-5) / 2));
  letter-spacing: 0.02em;
  color: var(--color-text-neutral-soft);
  font-size: var(--font-size-s);
  font-weight: 600;
  line-height: 1.6;

  &::after {
    content: ":";
  }

  @media (--md) {
    line-height: 2;
  }
}

.field--label-inline .field--tags__label {
  padding-block: 0;
  padding-inline-start: 0;
  padding-inline-end: 0;
}

.field--tags__items {
  display: flex;
  flex-wrap: wrap;
  margin-block: calc((var(--sp0-5) / 2) * -1);
  margin-inline-start: calc((var(--sp0-5) / 2) * -1);
  margin-inline-end: calc((var(--sp0-5) / 2) * -1);
  padding-block: 0;
  padding-inline-start: 0;
  padding-inline-end: 0;
  list-style: none;
}

.field--tags__item {
  display: flex;
  margin-block: calc(var(--sp0-5) / 2);
  margin-inline-start: calc(var(--sp0-5) / 2);
  margin-inline-end: calc(var(--sp0-5) / 2);
}

.field--tags__item:nth-last-child(n + 2)::after {
  content: ",";
  font-size: var(--font-size-base);
  line-height: 1.5;
}

.field--tags__item a {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  letter-spacing: 0.02em;
  color: var(--color-text-primary-medium);
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: 1.5;
}

.node--view-mode-full {
  & .field--tags {
    margin-block-start: var(--sp4);
    margin-block-end: var(--sp4);
    padding-block: var(--sp1-5);
    padding-inline-start: var(--sp2);
    padding-inline-end: var(--sp2);
    background-color: var(--color--gray-100);
  }
}
