@layer components {
  .quick-filter {
    position: relative;

    &:has([aria-checked="true"]):not(.quick-filter--with-default) {
      .input--select {
        --input-background: var(--color-selected);
      }
    }

    /* Hide a quick filter if there's nothing in it to filter by */
    &:not(:has(.popup__item)) {
      display: none !important;
    }

  }

  /* The order's menu is as wide as its longest line. */
  .quick-filter--sorted-by .popup {
    min-inline-size: 0;
  }
}

