.radio-tabs {
  display: flex;
  flex-wrap: wrap;
}

.radio-tab {
  display: none;
}

.radio-tabs .radio-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: start;
  height: $btn-height;
  padding: $spacing-xs $spacing-md $spacing-xs $spacing-md;
  line-height: normal;
  color: $primary;
  background-color: transparent;
  border: $border-width solid $primary;
  &:hover, &:focus {
    color: $white;
    background-color: $link-hover-color;
    border-color: $link-hover-color;
    & .icon {
      color: $white;
    }
  }
  &:first-of-type {
    border-top-left-radius: $border-radius;
    border-bottom-left-radius: $border-radius;
  }
  &:last-of-type {
    border-top-right-radius: $border-radius;
    border-bottom-right-radius: $border-radius;
  }
}

.radio-tab:checked + .radio-tab-btn {
  position: relative;
  color: $white;
  border-color: $info;
  background-color: $info;
  background-image: none;

  &::after {
    display: block;
    position: absolute;
    height: 6px;
    width: 8px;
    top: 3px;
    left: 3px;
    background-color: $white;
    content: "";
    mask-image: url("@images/check-selectable-items.svg");
    mask-repeat: no-repeat;
  }

  & .icon-low, & .icon-high, & .icon-critical {
    color: $white;
  }
  &:hover, &:focus {
    color: $white;
    background-color: $link-hover-color;
    border-color: $link-hover-color;
    & .icon {
      color: $white;
    }
  }
}

.radio-tabs .radio-tab-content {
  display: none;
  width: 100%;
  margin-top: $spacing-xs;
  padding: $spacing-sm;
  background-color: $card-bg-gray;
  border-radius: $border-radius;
  order: 99;
}

.radio-tab:checked + .radio-tab-btn + .radio-tab-content {
  display: block;
}
