/**
 * @file
 * Default styling for the active filter thumbs.
 *
 *   Type : ( News  × )   Tags : ( Sport  × ) ( Culture  × )
 *
 * The filter label sits in front, in the normal text weight. Each value is a
 * light grey pill with the value in bold and a close cross. All sizes are in
 * em, so the thumbs scale with the font size of the exposed form.
 *
 * Change the look with the custom properties below, or replace this file
 * completely with libraries-override.
 */

.b14viewsactivefilters {
  /* Space between two filters, e.g. after "News ×" and before "Tags :". */
  --b14vaf-group-gap: 1.5em;
  /* Space between the label and a pill, and between pills of one filter. */
  --b14vaf-gap: 0.5em;
  /* The pill. */
  --b14vaf-padding: 0.65em 1em;
  --b14vaf-radius: 999px;
  --b14vaf-background: #f3f3f3;
  --b14vaf-background-hover: #e6e6e6;
  --b14vaf-color: inherit;
  --b14vaf-value-weight: 700;
  /* Space between the value and the cross. */
  --b14vaf-icon-gap: 1em;
  /* The box around the cross, and the cross itself. */
  --b14vaf-icon-size: 1em;
  --b14vaf-cross-size: 0.75em;
  --b14vaf-focus: 2px solid currentColor;

  display: flex;
  flex-wrap: wrap;
  gap: var(--b14vaf-gap) var(--b14vaf-group-gap);
  align-items: center;
  margin-block: 1em;
}

.b14viewsactivefilters__heading {
  width: 100%;
  margin: 0;
}

.b14viewsactivefilters__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--b14vaf-gap) var(--b14vaf-group-gap);
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.b14viewsactivefilters__group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--b14vaf-gap);
  align-items: center;
  margin: 0;
}

.b14viewsactivefilters__label {
  font-weight: 400;
}

/* Reset theme button styles, so the pill looks the same in every theme. */
.b14viewsactivefilters__remove,
.b14viewsactivefilters__clear {
  margin: 0;
  min-width: 0;
  min-height: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: var(--b14vaf-color);
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

.b14viewsactivefilters__remove {
  display: inline-flex;
  gap: var(--b14vaf-icon-gap);
  align-items: center;
  padding: var(--b14vaf-padding);
  border: 0;
  border-radius: var(--b14vaf-radius);
  background: var(--b14vaf-background);
  line-height: 1.2;
}

.b14viewsactivefilters__remove:hover {
  background: var(--b14vaf-background-hover);
}

.b14viewsactivefilters__remove:focus-visible,
.b14viewsactivefilters__clear:focus-visible {
  outline: var(--b14vaf-focus);
  outline-offset: 2px;
}

.b14viewsactivefilters__value {
  font-weight: var(--b14vaf-value-weight);
}

/*
 * The cross is an SVG, centred in a square box. A text "×" can't be centred
 * reliably: fonts draw it on the baseline, not in the middle of the line box.
 * To put the cross in a circle, give this box a background and
 * border-radius: 50%, and set --b14vaf-icon-size.
 */
.b14viewsactivefilters__icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--b14vaf-icon-size);
  height: var(--b14vaf-icon-size);
}

.b14viewsactivefilters__icon svg {
  display: block;
  width: var(--b14vaf-cross-size);
  height: var(--b14vaf-cross-size);
}

.b14viewsactivefilters__clear {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Feedback while the view refreshes. */
.b14viewsactivefilters__remove.is-removing {
  opacity: 0.4;
  cursor: progress;
}

@media (prefers-reduced-motion: no-preference) {
  .b14viewsactivefilters__remove {
    transition: background-color 150ms ease, opacity 150ms ease;
  }
}
