@import '../../Form/style/common.scss';

.radio {
  display: none;
}
.radio-label {
  user-select: none;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 5px;

  &.disabled {
    @include disabledStyle();
    background-color: transparent;

    .radio-icon {
      fill: $disable-color;
    }
  }

  &.mini {
    line-height: 16px;
    font-size: 12px;

    .radio-icon {
      width: 12px;
      height: 12px;
    }
  }
}
.radio-icon {
  fill: $primaryBlueColor;
  margin-right: 5px;
}
.radio-btn {
  display: inline-block;
  vertical-align: middle;
  border: 1px solid $basic-border-color;
  background-color: #fff;
  cursor: pointer;
  color: rgba(17, 18, 34, 0.5);
  font-size: 12px;
  font-weight: normal;
  border-radius: 4px;
  overflow: hidden;

  .radio-btn-item {
    display: inline-block;
    padding: 0px 10px;
    min-width: 44px;
    text-align: center;
    line-height: 20px;

    &:last-child {
      border-right: none;
    }
    &.active {
      background-color: rgba(17, 18, 34, 0.7);
      border-color: rgba(17, 18, 34, 0.7);
      color: #fff;
    }
    &.disabled {
      cursor: not-allowed;
      opacity: 0.5;
    }
  }
  &.mini {
    .radio-btn-item {
      min-width: unset;
      padding: 6px 10px;
    }
  }
  &.disabled {
    cursor: not-allowed;
    .radio-btn-item {
      &.active {
        background-color: $disable-color;
        border-color: $disable-color;
      }
    }
  }
  &.dark {
    .radio-btn-item {
      &.active {
        background-color: #3d3e52;
        border-color: #3d3e52;
      }
    }
  }
  &.green {
    .radio-btn-item {
      &.active {
        background-color: #038962;
        border-color: #038962;
      }
    }
  }
  &.radius {
    .radio-btn-item {
      &:first-child {
        border-top-left-radius: 2px;
        border-bottom-left-radius: 2px;
      }
      &:last-child {
        border-top-right-radius: 2px;
        border-bottom-right-radius: 2px;
      }
    }
  }
}
