/* drag handle */
.drag-handle {
  position: fixed;
  opacity: 1;
  transition: opacity ease-in 0.2s;
  height: 20px;
  width: 15px;
  display: grid;
  place-items: center;
  z-index: 5;
  cursor: grab;
  border-radius: 2px;
  transition: background-color 0.2s;

  &:hover {
    background-color: rgba(var(--color-background-80));
  }

  &:active {
    background-color: rgba(var(--color-background-80));
    cursor: grabbing;
  }

  &.hidden {
    opacity: 0;
    pointer-events: none;
  }
}

@media screen and (max-width: 600px) {
  .drag-handle {
    display: none;
    pointer-events: none;
  }
}

.drag-handle-container {
  height: 15px;
  width: 15px;
  display: grid;
  place-items: center;
}

.drag-handle-dots {
  height: 100%;
  width: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  place-items: center;
}

.drag-handle-dot {
  height: 2.5px;
  width: 2.5px;
  background-color: rgba(var(--color-text-300));
  border-radius: 50%;
}
/* end drag handle */

.ProseMirror:not(.dragging) .ProseMirror-selectednode {
  position: relative;
  cursor: grab;
  outline: none !important;
  box-shadow: none;
}

.ProseMirror:not(.dragging) .ProseMirror-selectednode::after {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  height: 100%;
  width: 100%;
  background-color: rgba(var(--color-primary-100), 0.2);
  border-radius: 4px;
}

.ProseMirror img {
  transition: filter 0.1s ease-in-out;
  cursor: pointer;

  &:hover {
    filter: brightness(90%);
  }

  &.ProseMirror-selectednode {
    filter: brightness(90%);
  }
}

:not(.dragging) .ProseMirror-selectednode.table-wrapper {
  padding: 4px 2px;
  background-color: rgba(var(--color-primary-300), 0.1) !important;
  box-shadow: rgba(var(--color-primary-100)) 0px 0px 0px 2px inset !important;
}
