.lbaic-settings-contenteditable {
  --lbaic-settings-contenteditable-placeholder-right: unset;
  --lbaic-settings-contenteditable-placeholder-left: 0;
  --lbaic-settings-contenteditable-placeholder-padding-inline: 10px;
  --lbaic-settings-contenteditable-local-border: var(--lbaic-settings-contenteditable-border);
  --lbaic-settings-contenteditable-placeholder-transform: translate3d(0, 0, 0);
  --lbaic-settings-contenteditable-placeholder-pdi-transform:padding-inline 180ms ease-in-out;
  --lbaic-settings-contenteditable-bg: var(--lbaic-settings-white);

  width: 100%;


  &-h-42 {
    height: 42px;
  }

  &-has-value {
    --lbaic-settings-contenteditable-placeholder-padding-inline: 4px;
    --lbaic-settings-contenteditable-local-border: var(--lbaic-settings-primary);
    --lbaic-settings-contenteditable-placeholder-transform: translate3d(6px, -50%, 0) scale(0.857);
    --lbaic-settings-textarea-placeholder-height: 24px;
  }

  &-holder {
    position: relative;
    height: 100%;
    background-color: var(--lbaic-settings-contenteditable-local-bg, var(--lbaic-settings-contenteditable-bg));
    border: 1px solid var(--lbaic-settings-contenteditable-local-border);
    border-radius: 6px;

    &:focus-within {
      --lbaic-settings-contenteditable-placeholder-padding-inline: 4px;
      --lbaic-settings-contenteditable-local-border: var(--lbaic-settings-primary);
      --lbaic-settings-contenteditable-placeholder-transform: translate3d(6px, -50%, 0) scale(0.857);
      --lbaic-settings-textarea-placeholder-height: 24px;

      border: 1px solid var(--lbaic-settings-primary);
    }

  }

  &-in {
    width: 100%;
    height: 100%;
    max-height: 300px;
    padding-block: var(--lbaic-settings-contenteditable-pbs, 10px) var(--lbaic-settings-contenteditable-pbe, 10px);
    padding-inline: var(--lbaic-settings-contenteditable-pis, 10px) var(--lbaic-settings-contenteditable-pie, 10px);
    border-radius: 6px;
    font-size: var(--lbaic-settings-fs-13);
    font-weight: var(--lbaic-settings-fw-400);
    color: var(--lbaic-settings-contenteditable-color);
    word-break: break-word;
    white-space: pre-wrap;
    overflow-x: hidden;
    overflow-y: auto;
    resize: vertical;

    span {
      background-color: transparent !important;
    }

    &:empty {
      &:before {
        content: attr(data-placeholder);
        position: absolute;
        top: 0;
        left: 0;
        font-size: inherit;
        color: var(--lbaic-settings-contenteditable-placeholder-color);
        pointer-events: none;
      }
    }
  }

  &-variable {
    display: inline-flex;
    align-items: center;
    margin-inline: 10px;
    padding-inline: 8px;
    border-radius: 4px;
    background-color: var(--lbaic-settings-contenteditable-variable-bg);

    &-label {
      padding-inline-end: 10px;
      font-size: var(--lbaic-settings-fs-13);
      color: var(--lbaic-settings-contenteditable-variable-color);
      line-height: var(--lbaic-settings-lh-24);
    }

    &-i {
      width: 14px;
      height: auto;
      display: block;
      fill: var(--lbaic-settings-contenteditable-variable-fill);
    }
  }

  &-placeholder {
    position: absolute;
    top: 0;
    height: 100%;
    max-height: 48px;

    &-in {
      position: absolute;
      top: 0;
      right: var(--lbaic-settings-contenteditable-placeholder-right);
      left: var(--lbaic-settings-contenteditable-placeholder-left);
      height: var(--lbaic-settings-textarea-placeholder-height, 100%);
      display: flex;
      align-items: center;
      transform: var(--lbaic-settings-contenteditable-placeholder-transform);
      transform-origin: left;
      transition: transform 180ms ease-in-out, max-height 180ms ease-in-out;
      pointer-events: none;
    }

    &-desc {
      padding-inline: var(--lbaic-settings-contenteditable-placeholder-padding-inline);
      font-size: var(--lbaic-settings-fs-13);
      font-weight: var(--lbaic-settings-fw-400);
      color: var(--lbaic-settings-contenteditable-placeholder-color);
      background-color: var(--lbaic-settings-contenteditable-local-bg, var(--lbaic-settings-contenteditable-bg));
      transition: padding-inline 180ms ease-in-out;
    }
  }
}