.group {
  display: inline-flex;
  justify-self: flex-start;
  margin: 0.5rem 1rem 0.5rem 0;

  & > * {
    margin: 0 !important;
  }

  &--vertical {
    flex-direction: column;

    & > * + * {
      margin-block-start: -1px;
    }

    & > *:not(:first-child) {
      border-top-left-radius: 0;
      border-top-right-radius: 0;
    }

    & > *:not(:last-child) {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }

    & > * {
      margin-top: -1px !important;
    }
  }

  &:not(.group--vertical) {
    & > * + * {
      margin-top: -1px !important;
    }

    & > *:not(:first-child) {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }

    & > *:not(:last-child) {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }
  }
}
