.ac-single-input {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;

  .prepend {
    position: absolute;
    left: 1px;
    top: 1px;
    width: 32px;
    height: 34px;
    display: flex;
    align-items: center;
    border-radius: 4px 0 0 4px;
    justify-content: center;
    border-right: 1px solid $color-border-dark;
    background-color: $white-100;
  }

  &.is-disable,
  &.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: no-drop;

    input,
    .button.is-information,
    .eye i.fa {
      cursor: not-allowed;
    }
  }

  &.is-information {
    input {
      padding-right: 45px;

      &[type="password"] {
        padding-right: 80px;
      }
    }

    span.eye i.fa {
      right: 35px;
    }
  }

  &.is-success {
    input,
    .ac-card,
    textarea,
    select {
      border: 1px solid $ac-primary !important;
    }

    p {
      color: $ac-primary;
    }
  }

  &.is-danger {
    input,
    .ac-card,
    textarea,
    select {
      border: 1px solid $danger;
    }

    p {
      color: $danger;
    }
  }

  &.is-loading {
    input,
    .ac-card,
    textarea {
      border: 1px solid $info;
      opacity: 0.5;
    }

    p {
      color: $info;
      opacity: 0.5;
    }
  }

  &.borderless-input {
    input {
      border: none;
      font-size: 1rem;
      padding: 4px 7px;
      height: 30px;
      background-color: $white-100;
      padding-right: 30px;

      &[type="password"] {
        padding-right: 30px;
      }

      &:focus {
        outline: none;
        border: none;
      }
    }

    span.eye {
      i.fa {
        padding: 9px;
        font-size: 12px;
      }
    }
  }

  &.is-normal {
    input,
    select {
      height: 45px;
      font-size: 15px;
      font-weight: 400;
    }

    .button {
      &.is-information {
        height: 45px;
        width: 45px;
        margin-top: 0;
      }
    }

    span.eye i.fa {
      padding: 14px 10px;
    }

    .ac-search-button {
      margin-top: -22.5px;
    }

    label {
      top: 14px;
      font-size: 1rem;

      &.show-label {
        font-size: 12px;
        color: $gray-40;
        top: -9px;
        font-weight: 500;
        background-color: $white-100;
      }
    }

    .control {
      &.has-icons-right {
        .icon {
          height: 45px;
          width: 30px;
          font-size: 1rem;
        }
      }
    }
  }

  &.is-small {
    input,
    select {
      height: 36px;
      font-size: 1rem;
      font-weight: 400;
    }

    .button {
      &.is-information {
        height: 36px;
        width: 36px;
        margin-top: 0;
        padding: 10px;
      }
    }

    span.eye i.fa {
      padding: 10px;
    }

    .ac-search-button {
      margin-top: -18px;
    }

    label {
      top: 8px;
      font-size: 1rem;

      &.switch-label {
        top: 0;
      }

      &.show-label {
        font-size: 12px;
        top: -9px;
        font-weight: 500;
        color: $gray-40;

        &.is-required {
          &:after {
            width: calc(100% + 10px);
          }
        }
      }
    }

    .control {
      &.has-icons-right {
        .icon {
          height: 36px;
          width: 25px;
          font-size: 1rem;
        }
      }
    }
  }

  &.is-extra-small {
    input,
    select {
      height: 32px;
      font-size: 1rem;
      font-weight: 400;
    }

    .button {
      &.is-information {
        height: 32px;
        width: 32px;
        margin-top: 0;
      }
    }

    span.eye i.fa {
      padding: 10px;
    }

    .ac-search-button {
      margin-top: 0px;
      top: 0;
      display: flex;
      align-items: center;
      width: 40px;
      justify-content: center;

      svg {
        width: 18px;
      }
    }

    label {
      top: 6px;
      font-size: 1rem;

      &.switch-label {
        top: 0;
      }

      &.show-label {
        font-size: 12px;
        top: -9px;
      }
    }

    .control {
      &.has-icons-right {
        .icon {
          height: 32px;
          width: 25px;
          font-size: 1rem;
        }
      }
    }
  }

  &:last-child {
    margin-bottom: 0;
  }

  label {
    font-size: 1rem;
    left: 15px;
    top: 11px;
    cursor: text;
    color: $color-heading;
    position: absolute;
    z-index: 2;
    transition: 0.1s ease-in-out;

    .is-required {
      color: $danger;

      img {
        position: absolute;
        top: 7px;
        padding-left: 3px;
      }
    }

    &.show-label {
      top: -9px;
      left: 10px;
      padding: 0 5px;
      font-size: 1rem;
      color: $gray-40;

      &:after {
        position: absolute;
        content: "";
        left: 0;
        top: 50%;
        background-color: $white-100;
        width: 100%;
        height: 2px;
        margin-top: -1px;
        z-index: -1;
      }
    }
  }

  .button {
    &.is-information {
      background-color: transparent;
      border: none;
      position: absolute;
      right: 0;
      height: 32px;
      width: 32px;
      margin-top: 0;

      &:focus {
        outline: none;
        box-shadow: none;
        background-color: #e4e8ef;
        transform: scale(0.8);
      }
    }
  }

  .ac-search-button {
    background-color: transparent;
    border: none;
    position: absolute;
    left: 0;
    top: 50%;
    width: 32px;
    height: 100%;
    margin-top: -15px;
    color: $color-text;
    cursor: pointer;
  }

  .ac-dropdown-content {
    position: absolute;
    background-color: $color-border;
    width: 100%;
    height: auto;
    box-shadow: 0px 4px 16px rgba(132, 147, 168, 0.6);
    border-radius: 4px;
    overflow: hidden;

    ul {
      li {
        a {
          color: $color-heading;
          display: block;
          font-size: 1rem;
          padding: 8px 20px;
          transition: 0.3s;

          &:hover {
            background-color: $primary-20;
            color: $ac-primary;
          }
        }
      }
    }
  }

  .ac-textarea {
    .ac-label {
      &.is-required {
        &:after {
          width: calc(100% + 10px);
        }
      }
    }

    textarea {
      border: 1px solid $color-border-dark;
      background-color: transparent;
      padding: 10px 15px;
      min-height: 150px;

      &.bg-white {
        background-color: transparent;
      }

      &:focus {
        outline: none;
        border: 1px solid $ac-primary;
      }
    }
  }

  input,
  .ac-card,
  textarea,
  select {
    background-color: $white-100;
    color: $color-heading;
    height: 45px;
    font-weight: 400;
    width: 100%;
    border-radius: 4px;
    border: 1px solid $color-border-dark;
    padding: 8px 15px;
    font-size: 1rem;

    &:hover {
      border-color: $ac-primary;
    }

    &.bg-white {
      background-color: $white-100;
    }

    &.StripeElement--focus {
      border: 1px solid $ac-primary;
    }

    &:focus {
      border: 1px solid $ac-primary;
      outline: none;
      background-color: $white-100;
    }

    &[type="password"] {
      padding-right: 40px;
    }

    &[type="search"] {
      padding-left: 30px;
    }

    transition: background-color 0.1s ease-in-out;
  }

  .ac-card {
    height: 36px;
    padding: 10px 20px;
  }

  textarea {
    height: 55px;
  }

  b.isRequired {
    color: $danger;
    font-size: 1rem;
    position: absolute;
    right: 5px;
    z-index: 9;
  }

  span.eye {
    i.fa {
      color: $color-border-dark;
      position: absolute;
      cursor: pointer;
      padding: 15px;
      right: 0;
      top: 0;
    }
  }

  .is-danger {
    font-size: 12px;
    line-height: 22px;
    color: $danger;
    text-align: left;

    i.fa {
      padding-right: 10px;
    }
  }
}

.ac-input.ac-search {
  width: 42px;
  transition: 0.3s ease-in-out;
  padding: 0;
}

.ac-search:focus {
  width: 200px !important;
  padding-right: 10px;
}

// check radio

.ac-single-radio {
  .is-checkradio[type="radio"] + label {
    padding-left: 25px;

    &:before {
      width: 16px;
      height: 16px;
      top: 4px;
      background: transparent;
    }

    &:after {
      width: 16px;
      height: 16px;
      top: 4px;
    }
  }
}

// .is-checkradio[type="radio"] + label::after,
// .is-checkradio[type="radio"] + label:after {
//   background: $ac-primary;
// }

// .is-checkradio[type="checkbox"]:checked + label::before,
// .is-checkradio[type="checkbox"]:checked + label:before,
// .is-checkradio[type="radio"]:checked + label::before,
// .is-checkradio[type="radio"]:checked + label:before {
//   border: 0.2rem solid $ac-primary;
// }

// .is-checkradio[type="checkbox"]:hover:not([disabled]) + label::before,
// .is-checkradio[type="checkbox"]:hover:not([disabled]) + label:before,
// .is-checkradio[type="radio"]:hover:not([disabled]) + label::before,
// .is-checkradio[type="radio"]:hover:not([disabled]) + label:before {
//   border-color: $primary-30 !important;
// }

// .switch[type="checkbox"].is-primary:checked + label::before,
// .switch[type="checkbox"].is-primary:checked + label:before {
//   background-color: $ac-primary;
// }

// .is-checkradio[type="checkbox"] + label::after,
// .is-checkradio[type="checkbox"] + label:after {
//   border-width: 0.2rem;
//   border-color: $ac-primary;
// }

// file upload
.file.ac-file {
  .file-name {
    border-color: $color-border-dark;
    max-width: 100%;
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
  }

  .file-label {
    width: 100%;
  }

  .file-cta {
    color: $color-heading;
    height: 100%;
    background-color: $secondary-light-gray;
  }

  &:hover {
    .file-cta,
    .file-name {
      border-color: $ac-primary;
    }
  }
}
