/*
IBM Confidential
694970X, 69497O0
© Copyright IBM Corp. 2022, 2025
*/

@use "../../global/config" as *;
@use '@carbon/themes/scss/tokens' as theme;

.#{$prefix}--rich-text-editor {
  border: none !important;
  background: theme.$layer-01;
  border-bottom: 1px solid theme.$border-strong-01 !important;
  height: 6rem;

  em {
    font-style: italic;
  }

  .ql-container {
    height: 6rem;
  }

  .ql-editor {
    padding: 1rem;
    border-top: 1px solid theme.$border-subtle-00;
    height: 6rem;

    p {
      font-family: "IBM Plex Sans", "Helvetica Neue", Arial, Helvetica, sans-serif;
      font-size: 0.875rem;
    }

    &.ql-blank {
      &::before {
        font-style: normal;
      }
    }
  }
}

.#{$prefix}--rich-text-editor-disabled {
  background: none;
  border-bottom: 1px solid theme.$border-subtle-01 !important;

  .ql-editor {
    border-top: none;
  }
}

.#{$prefix}--rich-text-editor-error-border {
  outline: 2px solid theme.$support-error;
}

.#{$prefix}--rich-text-editor-toolbar {
  background: theme.$layer-01;
}

.#{$prefix}--rich-text-editor-labels {
  display: flex;
  justify-content: space-between;
}

.#{$prefix}--rich-text-editor-footer {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
}

.#{$prefix}--rich-text-editor-error {
  color: theme.$text-error;
}

.#{$prefix}--rich-text-editor-url-input {
  display: flex;
  flex-direction: row;
  border: 1px solid theme.$border-strong-01;

  .#{$prefix}--text-input {
    border-block-end: none;
  }
}
