// Same grid-of-checkbox-cards shape as `features/profile/profile-forms.scss`'s
// `.allergy-select` — kept as its own file/class rather than reused directly
// since this is household-scoped, not profile-scoped (see `SourceSelect.tsx`).
.source-select {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: var(--space-xs) var(--space-md);
  margin: var(--space-sm) 0 0;
  padding: 0;
  border: none;

  legend {
    grid-column: 1 / -1;
    padding: 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
  }

  &__option {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: 0;
    font-weight: 400;
    font-size: var(--font-size-base);
  }

  // The source's own logo — small and square, never bigger than the text
  // line it sits next to regardless of the source image's real dimensions.
  &__icon {
    width: 1.1em;
    height: 1.1em;
    object-fit: contain;
    flex-shrink: 0;
  }

  // Official/unofficial marker — same "small pill" language as
  // `settings-pages.scss`'s `.settings-page__member-badge`, neutral grey by
  // default (unofficial/scraped) and tinted primary once official.
  &__badge {
    padding: 0.1rem 0.4rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-surface-alt);
    border-radius: var(--radius-base);

    &.is-official {
      color: var(--color-primary);
    }
  }
}
