@radio-cls: ~"@{prefix}-radio";

.@{radio-cls}-group {
  display: inline-flex;

  &-vertical {
    flex-direction: column;

    .@{radio-cls} {
      &:not(:first-child) {
        margin-top: 8px;
      }
    }
  }

  &-horizontal {
    .@{radio-cls} {
      &:not(:first-child) {
        margin-left: 8px;
      }
    }
  }
}

.@{radio-cls}-group-button {
  background-color: @gary-4;
  display: inline-flex;
  padding: 4px;
  border-radius: 4px;

  .@{radio-cls} {
    cursor: pointer;

    &-label {
      margin: 0;
      padding: 0 6px;
      min-width: 68px;
      width: 100%;
      border-radius: 2px;
      text-align: center;
      font-size: 13px;
      background-color: @gary-4;
      line-height: 1.8;
      transition: all 0.2s ease;

      &:hover {
        background-color: @gary-3;
        transition: all 0.2s ease;
      }
    }

    &-check-label {
      background-color: @gary-1;
      transition: all 0.2s ease;
      color: @primary-7;
      font-weight: 600;

      &:hover {
        background-color: @gary-1;
        transition: all 0.2s ease;
      }
    }
  }
}

.@{radio-cls} {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
  cursor: pointer;
  .no-select;

  &-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    opacity: 0;
    display: none;
  }

  &-radio {
    width: 14px;
    height: 14px;
    border: 1px solid @gary-5;
    display: inline-block;
    border-radius: 14px;
    box-sizing: border-box;
    transition: all 0.2s;
  }

  &-check {
    border: 5px solid @primary-6;
    transition: all 0.2s;
  }

  &:hover {
    .@{radio-cls}-radio {
      border: 1px solid @primary-6;
      transition: all 0.2s;
    }

    .@{radio-cls}-check {
      border: 5px solid @primary-6;
      transition: all 0.2s;
    }
  }

  &-label {
    color: @gary-10;
    font-size: 14px;
    font-weight: normal;
    margin-left: 6px;
  }
}

.@{radio-cls}-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
