/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

.ouiMarkdownEditorDropZone {
  display: flex;
  position: relative;
  flex-direction: column;
  min-height: $ouiMarkdownEditorMinHeight;

  &__input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    overflow: hidden;

    &:hover {
      cursor: pointer;
    }

    &:hover:disabled {
      cursor: not-allowed;
    }
  }

  &--isDragging {
    .ouiMarkdownEditorFooter,
    .ouiMarkdownEditorTextArea,
    .ouiMarkdownEditorTextArea:focus,
    .ouiMarkdownEditor:focus-within .ouiMarkdownEditorTextArea {
      // sass-lint:disable-block no-important
      background-color: transparentize($ouiColorPrimary, .9) !important;
    }

    .ouiMarkdownEditorTextArea,
    .ouiMarkdownEditorTextArea:focus {
      // sass-lint:disable-block no-important
      background-image: ouiFormControlGradient($ouiColorPrimary) !important;
    }
  }

  &--isDraggingError {
    .ouiMarkdownEditorFooter,
    .ouiMarkdownEditorTextArea,
    .ouiMarkdownEditorTextArea:focus,
    .ouiMarkdownEditor:focus-within .ouiMarkdownEditorTextArea {
      // sass-lint:disable-block no-important
      background-color: transparentize($ouiColorDanger, .9) !important;
    }
  }

  &--hasError {
    .ouiMarkdownEditorTextArea,
    .ouiMarkdownEditorTextArea:focus {
      // sass-lint:disable-block no-important
      background-image: ouiFormControlGradient($ouiColorDanger) !important;
    }
  }
}
