@import 'common/var.scss';

.qf-radio-button {
  position: relative;
  display: inline-block;
  outline: none;
  background-color: $--color-bg-light;
  height: 32px;
  line-height: 32px;

  &:first-child {
    .qf-radio-button__inner {
      border-left: 1px solid $--color-border;
      border-radius: 4px 0 0 4px;
      box-shadow: none !important;
    }
  }

  &:last-child {
    .qf-radio-button__inner {
      border-radius: 0 4px 4px 0;
    }
  }

  .qf-radio-button__orig-radio {
    opacity: 0;
    outline: none;
    position: absolute;
    z-index: -1;
    left: -999px;

    &:checked + .qf-radio-button__inner {
      color: #fff;
      background-color: $--color-primary;
      border-color: $--color-primary;
      box-shadow: -1px 0 0 0 $--color-primary;
    }

    &:disabled:checked + .qf-radio-button__inner {
      background-color: #f2f6fc;
    }

    &:disabled + .qf-radio-button__inner {
      color: #c0c4cc;
      cursor: not-allowed;
      background-image: none;
      background-color: #fff;
      border-color: #ebeef5;
      box-shadow: none;
    }
  }

  .qf-radio-button__inner {
    position: relative;
    display: inline-block;
    outline: none;
    height: 100%;

    line-height: inherit;
    white-space: nowrap;
    vertical-align: middle;
    background: #fff;
    border: 1px solid $--color-border;
    font-weight: 500;
    border-left: 0;
    color: #606266;
    -webkit-appearance: none;
    text-align: center;
    box-sizing: border-box;
    margin: 0;
    cursor: pointer;
    transition: all .3s cubic-bezier(.645, .045, .355, 1);
    padding: 0 8px;
    font-size: 12px;
    border-radius: 0;
  }
}
