.vue-schema-form-array {
  .nested-body {
    // margin-bottom: 15px;
    display: flex;

    .form-left-item {
      margin-right: 16px;
      width: calc(100% - 108px);
    }
  }
}

.nested-header {
  .tabs.ac-tabs {
    margin-bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease-in-out;
  }

  &:hover {
    .tabs.ac-tabs {
      opacity: 1;
      visibility: visible;
    }
  }
}

.vue-openapi-form {
  margin-left: -20px;

  .ac-nested-elements {
    &:first-child {
      margin-left: 0;
    }

    .nested-body {
      padding-left: 0px;
    }

    .nested-header {
      width: 100%;
    }
  }

  .ac-single-switch {
    margin-left: -15px;
    margin-bottom: 35px;
  }

  .ac-single-input {
    margin-left: 25px;

    &:last-child {
      margin-bottom: 16px;
    }
  }
}

.vue-form-scema-body {
  .left-content {
    background-color: $primary-light-gray;
    border-right: 1px solid $color-border;
    padding: 30px;
    width: 500px;
  }

  .right-content {
    margin-top: 30px;
  }
}

.v-tooltip-open {
  background-color: $white-100;
}

.ac-nested-elements::after {
  top: 25px;
  width: 1px;
  height: calc(100% - 50px);
}

.ac-nested-elements::before {
  bottom: 12px;
}

.is-collapsed {
  &.ac-nested-elements::before,
  &.ac-nested-elements::after {
    display: none;
  }
}

.ui-builders-wrapper {
  .ac-nested-elements::before {
    bottom: 10px !important;
  }
}

// for vue-tooltip

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

    &.is-disable {
      opacity: 0.5;

      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 {
        border: 1px solid $ac-primary !important;
      }

      p {
        color: $ac-primary;
      }
    }

    &.is-danger {
      input,
      .ac-card,
      textarea {
        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 {
        height: 45px;
        font-size: 15px;
        font-weight: 400;
      }

      .button {
        &.is-information {
          height: 45px;
          width: 45px;
          margin-top: 0;
          &:focus {
            outline: none;
            box-shadow: none;
          }
        }
      }

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

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

      label {
        top: 13px;
        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 {
        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 {
        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: 8px;
        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;
    }

    &.is-dark {
      input {
        background-color: $primary-10;
        border-color: transparent;
        color: $white-100;

        &::placeholder {
          color: $color-heading;
        }

        button {
          i.fa {
            color: $white-100;
          }
        }
      }
    }

    label {
      font-size: 1rem;
      left: 15px;
      top: 11px;
      cursor: text;
      color: $color-heading;
      position: absolute;
      z-index: 2;
      transition: 0.3s 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;
        }

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

    .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: hsla(var(--hsl-hue), var(--hsl-saturation), var(--hsl-lightness), 0.2);
              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 16px;
        min-height: 50px;

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

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

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

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

    span.eye {
      i.fa {
        color: $gray-50;
        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;
  }

  .key-value-save > .ac-single-input {
    margin-left: 0;
  }
  .key-value-save > .ac-nested-elements {
    padding-left: 0;
    &:after {
      left: 8px;
    }
    &:before {
      left: 4px;
    }
  }
}

.is-refresh {
  i.fa {
    color: $secondary-30;
  }
}
