@charset "UTF-8";
@import "./common/var.css";
@import './mixins/common.css';

@component-namespace el {
  @b radio {
    color: var(--radio-color);
    position: relative;
    cursor: pointer;
    display: inline-block;
    /*white-space: nowrap;*/
    @utils-user-select none;

    & + .el-radio {
      margin-left: 16px;
    }
  & .border {
     /*border: var(--color-black) solid 2px !important;*/
     border-radius: 50%;
   }
    @e input {
      /*white-space: nowrap;*/
      cursor: pointer;
      display: inline-block;
      line-height: 1;
      vertical-align: middle;
      position: absolute;
      vertical-align: middle;
      margin-top: 10px;

      @when disabled {
        .el-radio__inner {
          background-color: var(--radio-disabled-input-fill);
          /*border-color: var(--radio-disabled-input-border-color);*/
          cursor: not-allowed;
          border-color: transparent;

          &::after {
            cursor: not-allowed;
            background-color: var(--radio-disabled-icon-color);
          }

          & + .el-radio__label {
            cursor: not-allowed;
          }
        }
        &.is-checked {
          .el-radio__inner {
            background-color: var(--color-blue-10);

            &::after {
              background-color: var(--radio-disabled-checked-icon-color);
            }
          }
          .el-radio__inner:hover{
            background-color: var(--color-blue-10);
            border-color: transparent;
          }
        }

        & + .el-radio__label {
          color: var(--disabled-color-base);
          cursor: not-allowed;
        }
      }

      @when checked {
        .el-radio__inner {
          border-color: var(--radio-checked-input-border-color);
          background: var(--radio-checked-icon-color);

          &::after {
            transform: translate(-50%, -50%) scale(1);
          }
        }
      }

      @when focus {
        .el-radio__inner {
          /*@mixin focus-shadow;*/
          background-color: var(--color-gray-30);
          border-color: var(--color-gray-40);
          outline: auto -webkit-focus-ring-color;
          outline-offset: 4px;
        }
      }
    }
    @e inner {
      border:1px solid Transparent;
      border-radius: var(--radio-input-border-radius);
      circle: var(--radio-input-width) var(--radio-input-fill);
      position: relative;
      cursor: pointer;
      display: inline-block;
      box-sizing: border-box;
      border:1px solid var(--color-gray-30);

      &:hover {
        /*border-color: var(--radio-input-border-color-hover);*/
        border-color: transparent;
        background-color: var(--color-gray-20);
        border:1px solid var(--color-gray-30);
      }
      &.border::before {
         content: "";
         width: 18px;
         height: 18px;
         border-radius: 50%;
         /*border: 2px solid #000;*/
         background-color: transparent;
         position: absolute;
         left: -3px;
         top: -3px;
         /*z-index: -1;*/
       }
      &::after {
        circle: 5px var(--color-white);
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) scale(0);
        transition: transform .15s cubic-bezier(.71,-.46,.88,.6);
        border:1px solid Transparent;
      }
    }

    @e original {
      opacity: 0;
      /*outline: none;*/
      position: absolute;
      z-index: -1;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      margin: 0;
    }

    @e label {
      font-size: var(--radio-font-size);
      line-height: 36px;
      padding-left: 24px;
      display: inline-block;
    }
  }
}
.el-radio__input.is-checked .el-radio__inner:hover{
  background-color: var(--color-blue-60);
  border-color: var(--color-blue-60);
}
.el-radio__input.is-checked.is-focus .el-radio__inner{
  background-color: var(--color-blue-70);
  border-color: var(--color-blue-70);
}
@media screen and (-ms-high-contrast: active) {
  .el-radio__original:focus{
    outline: 1px dotted yellow;
  }
  .el-radio__input.is-focus .el-radio__inner {
    outline: 1px dotted yellow;
  }
}
