@import "../../base.less";

@import "./_var.less";

.@{prefix}-radio {
  display: flex;
  align-items: center;
  padding: 16px;
  position: relative;

  &__former {
    display: none;
    position: absolute;
  }

  &__content-wrap {
    display: flex;
    align-items: flex-start;
    width: 100%;
    position: relative;
    overflow: hidden;
  }

  &__label-wrap {
    flex: 1;
  }

  &__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    color: transparent;
    border: 1.5px solid @radio-border-color;
    box-sizing: border-box;

    &--checked {
      color: #fff;
      border-color: @brand-color;
      background-color: @brand-color;
    }

    &--disabled {
      background-color: @gray-color-2;
      border-color: @radio-disable-color;
    }

    &--checked&--disabled {
      background-color: @radio-disable-color;
    }

    &--strock,
    &--custom {
      border: transparent;
      background-color: transparent;
    }

    &--strock {
      width: 24px;
      height: 24px;
      color: @radio-selected-color;
    }

    &--custom {
      width: inherit;
      height: inherit;
      color: @gray-color-4;
    }

    &--checked&--custom {
      color: @radio-selected-color;
    }

    &--checked&--disabled&--custom,
    &--checked&--disabled&--strock {
      color: @radio-disable-color;
      background-color: transparent;
    }
  }

  &__icon-wrap {
    width: @radio-icon-wrap-width;
    height: @radio-icon-wrap-height;
    font-size: @radio-icon-wrap-font-size;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: @gray-color-4;
  }

  &__icon-left-wrap {
    margin-right: @radio-icon-wrap-margin-right;
  }

  &__icon-right-wrap {
    margin-left: @radio-icon-wrap-margin-left;
  }

  &__content-title {
    font-size: @radio-title-font-size;
    color: @radio-title-font-color;
    position: relative;
    display: flex;
    align-items: flex-end;

    &.@{prefix}-is-disabled {
      color: @radio-content-color;
    }
  }

  &__content-inner {
    display: block;
    font-size: @radio-content-font-size;
    color: @radio-content-color;
    margin-top: @radio-content-inner-margin-top;
    position: relative;
  }

  &__original-left,
  &__original-right {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }

  &__border {
    position: absolute;
    bottom: 0;
    border-top: 1px solid @gray-color-3;

    &--left {
      right: 0;
      left: 40px;
    }

    &--right {
      right: 40px;
      left: 0;
    }
  }
}
