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

  .editor-toolbar {
    background-color: var(--secondary-bg);
    border: 1px solid var(--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: var(--secondary-bg) transparent transparent;
      content: '';
      height: 0;
      left: 20%;
      position: absolute;
      top: 2.25rem;
      width: 0;
    }

    &:before {
      border: 0.5rem solid;
      border-color: var(--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: var(--text-default);
      cursor: pointer;
      display: flex;
      height: 1.75rem;
      justify-content: center;
      padding: 0.5rem;
      transition: all 0.2s ease-in-out;
      vertical-align: middle;
      width: 1.75rem;

      &.disabled {
        pointer-events: none;
        color: var(--icon-disabled);
      }

      .fa-stack {
        height: 1rem;
        line-height: 1;

        &-1x {
          background-color: var(--secondary-bg);
          font-size: 0.6rem;
          left: -0.2rem;
          top: -0.1rem;
          padding-right: 0.8rem;
        }

        &-2x {
          font-size: 1.1rem;
          left: -0.1rem;
        }
      }

      &:hover {
        background-color: var(--primary-bg);
        border-color: var(--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 var(--border-color);
      border-radius: 0px;
      box-shadow: none;
      display: block;
      margin: 0 $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;
      }

      @media (max-width: 991px) {
        top: 50px;
      }
    }
  }

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

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

.selection-quote-button {
  align-items: center;
  background-color: var(--secondary-bg);
  border: 1px solid var(--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: var(--secondary-bg) transparent transparent;
    content: '';
    height: 0;
    left: 0.7rem;
    position: absolute;
    top: 2.2rem;
    width: 0;
  }

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