.btn-group {
  > form.btn_to:first-child .btn {
    margin-left: 0px;
  }

  > form.btn_to:not(:first-child) .btn {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  > form.btn_to:not(:last-child) .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  > form.btn_to:last-child .btn {
    margin-right: 0px;
  }
}

.btn-group-vertical {
  > form.btn_to ~ .btn {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
  }

  > form.btn_to:not(:last-child) .btn:not(.dropdown-toggle) {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }

  > form.btn_to:not(:first-child) .btn {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  > form.btn_to .btn {
	width: 100%;
    position: relative;
    flex: 1 1 auto;
  }

  > form.btn_to {
    width: 100%;
  }

  > form.btn_to:not(:first-child) .btn {
    margin-top: -1px;
  }
}

@media (max-width: 767px) {
  .btn-group {
    > form.btn_to {
      margin-left: 1px;
      width: 100%;
    }

    > form.btn_to:first-child .btn {
      margin-top: -1px;
      margin-bottom: -1px;
      margin-left: -1px;
      border-top-left-radius: 0.25rem !important;
      border-top-right-radius: 0.25rem !important;
    }

    > form.btn_to:not(:first-child) .btn {
      margin-top: -1px !important;
      margin-bottom: 0;
      border-top-left-radius: 0;
      border-top-right-radius: 0;
    }

    > form.btn_to:not(:last-child) .btn {
      margin-top: 0;
      margin-bottom: -1px !important;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }

    > form.btn_to:last-child .btn {
      margin-top: -1px !important;
      margin-bottom: 0px;
      border-bottom-left-radius: 0.25rem !important;
      border-bottom-right-radius: 0.25rem !important;
    }
  }
}

form.btn_link > button {
  line-height: normal;
  margin: 0;
  padding: 0;
  border: none;
  background: inherit;
  text-transform: inherit;
  color: var(--rwth-blue);
}
