.editor-field {
  height: 100%;
  position: relative;
  width: 100%;

  .editor-toolbar {
    background-color: $secondary-bg;
    border: 1px solid $border-color;
    border-radius: 20px;
    box-shadow: 0 20px 30px 0 rgba(33, 55, 74, 0.1);
    display: inline-flex;
    opacity: 0;
    padding: 0.25rem;
    position: absolute;
    right: 0;
    top: -3rem;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    visibility: hidden;
    z-index: 999;

    &:after {
      border: 0.5rem solid;
      border-color: $secondary-bg transparent transparent;
      content: '';
      height: 0;
      left: 20%;
      position: absolute;
      top: 2.25rem;
      width: 0;
    }

    &:before {
      border: 0.5rem solid;
      border-color: $border-color transparent transparent;
      content: '';
      height: 0;
      left: 20%;
      position: absolute;
      top: 2.35rem;
      width: 0;
    }

    .editor-btn {
      align-items: center;
      background-color: transparent;
      border: 1px solid transparent;
      border-radius: 1rem;
      color: $text-default;
      cursor: pointer;
      display: flex;
      height: 1.75rem;
      justify-content: center;
      padding: 0.5rem;
      transition: all 0.2s ease-in-out;
      width: 1.75rem;

      &.disabled {
        pointer-events: none;
      }

      &:hover {
        background-color: $primary-bg;
        border-color: $border-color;
      }

      &.image-btn {
        position: relative;

        input {
          cursor: pointer;
          height: 1.75rem;
          left: 0;
          margin: 0;
          opacity: 0;
          position: absolute;
          top: 0;
          width: 1.75rem;

          &::-webkit-file-upload-button {
            cursor: pointer;
          }
        }
      }
    }
  }

  .editor-toolbar:hover {
    opacity: 1;
    visibility: visible;
  }

  &.sticky-toolbar {
    .editor-toolbar {
      border: none;
      border-bottom: 1px solid $border-color;
      border-radius: 0px;
      box-shadow: none;
      display: block;
      margin: 0 1px;
      position: sticky;
      text-align: center;
      top: 100px; // header height

      &:after,
      &:before {
        display: none;
      }

      .editor-btn {
        display: inline-flex;
      }

      & + .textarea-container {
        margin-top: -42px !important;
      }
    }
  }

  & > .textarea-container > textarea {
    min-height: clamp(100%, 28rem, 28rem);
  }

  .textarea-container {
    height: 100%;
  }
}

.selection-quote-button {
  align-items: center;
  background-color: $secondary-bg;
  border: 1px solid $border-color;
  border-radius: 25px;
  box-shadow: 0 20px 30px 0 rgba(33, 55, 74, 0.1);
  cursor: pointer;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  position: absolute;
  user-select: none;
  width: auto;
  z-index: 3;

  &:after {
    border: 0.5rem solid;
    border-color: $secondary-bg transparent transparent;
    content: '';
    height: 0;
    left: 0.7rem;
    position: absolute;
    top: 2.2rem;
    width: 0;
  }

  &:before {
    border: 0.5rem solid;
    border-color: $border-color transparent transparent;
    content: '';
    height: 0;
    left: 0.7rem;
    position: absolute;
    top: 2.3rem;
    width: 0;
  }
}
