@import '../../src/style/tools.css';

.bx-input {
  position: relative;
  padding: 0 15px;
  background-color: var(--input-bg-color);
  color: var(--color-text-primary);
  font-size: 15px;

  & .bx-input-inner {
    display: flex;
    align-items: center;
  }

  &.bx-input--textarea {
    & .bx-input-inner {
      align-items: normal;
    }
  }

  &.bx-input--center {
    align-items: center;
  }

  &.bx-input--link {
    padding-right: 9px;
  }

  & .bx-input-label {
    width: 70px;
    padding: 15px 15px 15px 0;

    &.bx-input-label--lg {
      width: 110px;
    }
  }

  & .bx-input-value {
    position: relative;
    vertical-align: middle;
    flex: 1;

    & .bx-input-body {
      overflow: hidden;
      display: flex;
      align-items: center;
      padding: 15px 0;

      & .bx-input-control {
        border: 0;
        margin: 0;
        padding: 0;
        width: 100%;
        resize: none;
        display: block;
        box-sizing: border-box;
        background-color: transparent;
        font: inherit;
        -webkit-user-modify: read-write-plaintext-only;
        outline: none;
        box-shadow: none;
        text-align: left;
        flex: 1;
        color: inherit;

        &:disabled {
          color: var(--color-text-disabled);
          -webkit-text-fill-color: var(--color-text-disabled);
          opacity: 1;
        }

        &::-webkit-scrollbar {
          display: none;
        }

        &::-webkit-input-placeholder {
          font-weight: normal;
          color: var(--color-text-disabled);
        }
      }

      & .bx-input-textarea {
        flex: 1;
      }

      & .bx-input-center {
        text-align: center;
      }

      & .bx-input-right {
        text-align: right;

        &::-webkit-input-placeholder {
          direction: rtl;
        }
      }
    }

    & .bx-input-textarea--limit {
      padding-top: 9px;
      text-align: right;
      font-size: 11px;
      color: var(--color-text-assist);
    }

    & .bx-input-extra {
      position: relative;
    }
  }

  & .bx-input-icon {
    padding-left: 15px;
    line-height: 1;

    & .bx-input-icon--clearable {
      color: var(--color-text-assist);
      font-size: 18px;
    }

    &.bx-input-icon--withPadding {
      padding-right: 15px;
    }

    &.bx-input-icon--withoutPadding {
      padding-left: 0;
    }
  }

  & .bx-input-error {
    margin-top: 3px;
    padding-bottom: 9px;
    font-size: 12px;
    line-height: 15px;
    color: var(--color-feature-primary);
  }
}
