@import '~tc-ui/src/styles/tc-includes';

:global {
  .row {
    margin-bottom: 20px;
    &.center{
      display: table;
      margin: 0 auto;
      label{
        display: inline;
      }
      input{
        display: inline;
        width: 100px;
      }
    }
  }
  label{
    display:block;
    margin: 10px auto;
    text-transform: none;
    @include tc-label-md;
    color: $tc-gray-70;
    font-size: 13px;
  }
  
  .error-message{
    display:block;
    margin: 5px auto;
    @include roboto;
  
    color: $tc-gray-70;
    font-size: 13px;
    line-height:20px;
    font-style:italic;
    border: 1px solid $tc-red-30;
    background: $tc-red-10;
    color: $tc-red-70;
    padding:10px;
    border-radius: 2px;
    strong{
      @include roboto-bold;
    }
  }
  
  input {
    display:block;
    margin: 0 auto;
    color: $tc-black;
    background: $tc-gray-neutral-light;
    border-color: $tc-gray-20;
    @include tc-label-md;
  
    &[disabled]{
      color: $tc-gray-20;
      background: $tc-white;
    }
  
    &:hover{
      border-color: $tc-gray-40;
      background: $tc-gray-neutral-light;
    }
  
    &:focus{
      background: $tc-white!important;
      border-color: $tc-dark-blue-100!important;
    }
  
    &.error{
      border: 1px solid $tc-red-70!important;
      background: $tc-gray-neutral-light!important;
      &:focus{
        background: $tc-white!important;
        // border-color: $tc-dark-blue-100!important;
      }
    }
  }
  
  textarea{
    display:block;
    margin: 0 auto;
    height: 100px;
    color: $tc-black;
    background: $tc-gray-neutral-light;
    border-color: $tc-gray-20;
    @include tc-label-md;
    font-size:15px;
    line-height:20px;
    box-shadow: none;
  
    &[disabled]{
      color: $tc-gray-20;
      background: $tc-white;
    }
  
    &:hover{
      border-color: $tc-gray-40;
    }
  
    &:focus{
      background: $tc-white!important;
      border-color: $tc-dark-blue-100!important;
    }
  
    &.error{
      background: $tc-gray-neutral-light!important;
      border: 1px solid $tc-red-70!important;
      &:focus{
        background: $tc-white!important;
        // border-color: $tc-dark-blue-100!important;
      }
    }
  }

  .checkbox-group .checkbox-group-options {
    display: flex;
    flex-direction: column;
  }
  .checkbox-group.horizontal .checkbox-group-options {
    flex-direction: row;
    justify-content: space-between;
  }
  .checkbox-group.vertical .checkbox-group-options {
    flex-direction: column;
  }
  
  .checkbox-group-item {
    display: inline-block;
    margin-right: 42px;
    label {
      @include roboto-bold;
      color: $tc-gray-80;
      margin-right: 0;
    }
  }
  
  .radio-group-input {
    .radio-group-label {
      @include tc-label-md;
      margin-right: 20px;
    }
    .radio-group-options {
      display: flex;
      flex-direction: row;
      .radio {
        margin: 0;
        input[type="radio"] {
          opacity: 0;
          display: none;
        }
        label {
          display: inline-block;
          line-height: 19px;
          padding-left: 26px;
          position: relative;
          @include roboto-bold;
          font-size:14px;
          color: $tc-black;
          margin-right: 30px;
          &:before {
            border: 1px solid $tc-gray-20;
            border-radius: 50%;
            background-color: #fff;
            content: "";
            display: inline-block;
            height: 19px;
            left: 0;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 19px;
          }
        }
        input[type="radio"]:checked + label:after {
          background: $tc-dark-blue-100;
          border-radius: 50%;
          content: "";
          display: inline-block;
          left: 4px;
          position: absolute;
          top: 50%;
          margin-top: -5px;
          height: 11px;
          width: 11px;
        }
      }
    }
  }

  .radio-group-input .radio-group-options {
    display: flex;
    flex-direction: row;
  }
  .radio-group-input.horizontal .radio-group-options {
    flex-direction: row;
    justify-content: space-between;
  }
  .radio-group-input.vertical .radio-group-options {
    flex-direction: column;
  }
  
  .tiled-group-row {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
  }
  a.tiled-group-item {
    position: relative;
    -webkit-flex: initial;
    flex: initial;
    margin-right: 20px;
    height:155px;
    width:135px;
    border: 1px solid $tc-gray-20;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #dcdce0;
    border-radius: 4px;
    display: inline-block;
    margin: 10px 10px 0;
    position: relative;
    vertical-align: top;
  
    &:hover{
      border: 1px solid $tc-dark-blue-70;
    }
  
    &.active{
      background: $tc-gray-10;
      border-color: $tc-gray-10;
      &:after {
        content: '';
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        width: 15px;
        height: 15px;
        background: #1A85FF;
        border-radius: 2px;
      }
      &:before {
        content: '';
        position: absolute;
        z-index: 1;
        top: 12px;
        right: 15px;
        width: 5px;
        border-width: 0 2px 2px 0;
        border-style: solid;
        border-color: #fff;
        height: 10px;
        transform: rotate(45deg);
        -o-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
        -webkit-transform: rotate(45deg);
      }
      &:hover {
        border-color: $tc-gray-10;
      }
    }
  
  
    span.title{
      display:block;
      margin-top: 20px;
      @include roboto-bold;
      color: $tc-black;
      font-size: 13px;
      text-align:center;
    }
  
    span.icon {
      text-align: center;
      display:block;
      height: 50px;
      margin:30px auto 20px auto;
    }
    small {
      display:block;
      font-size: 11px;
      text-align:center;
      color: $tc-gray-50;
      @include roboto;
      margin-top:10px;
    }
    .check-mark {
      text-align: center;
      background: $tc-dark-blue-100;
      border-radius: 2px;
      display: none;
      height: 15px;
      position: absolute;
      right: 15px;
      top: 15px;
      width: 15px;
    }
  }

  // Using long selector for overriding other styles
  .checkbox-group .checkbox-group-options .checkbox-group-item.disabled,
  .radio-group-input .radio-group-options .radio.disabled,
  .tiled-group-row .tiled-group-item-container .disabled {
    cursor: default;
    color: $tc-gray-30;

    span, label, div, small, label.tc-checkbox-label {
      color: $tc-gray-30;
      cursor: default;
    }

  }
  
  .SliderRadioGroup {
    margin: 25px auto 0px auto;
    .rc-slider-dot,
    .rc-slider-handle {
      background: $tc-white;
      border: 4px solid $tc-gray-10;
      border-radius: 18px;
      width: 20px;
      height: 20px;
      bottom: -7px;
    }
  
    .rc-slider-handle {
      border-color: $tc-dark-blue-100;
      margin-left: -4px;
      bottom: -2px;
      display: none;
    }
  
    &:not(.null-value) .rc-slider-dot-active {
      border: none;
      background: $tc-dark-blue-100 url('./images/check-white.svg') no-repeat 2px 3px;
      // bottom: -2px;
      // margin-left: -5px;
    }
  
    .rc-slider-track,
    .rc-slider-rail {
      background-color: $tc-gray-10;
    }
  
    .rc-slider-mark {
      top: -30px;
      .rc-slider-mark-text {
        @include tc-label-lg;
        line-height: 5 * $base_unit;
        color: $tc-gray-80;
        letter-spacing: 0;
      }
    }
  }
}
  