*,
:after,
:before {
  box-sizing: border-box;
  border: 0 solid #e2e8f0cc;
}

.ProseMirror {
  outline: 0;
  z-index: 0;
  font-size: 1rem;

  & > :first-child {
    margin-top: 0;
  }

  & > *:first-child,
  [data-type='column'] > * {
    margin-top: 0;
    margin-bottom: 0;
  }

  & > * + * {
    margin-top: 0.75em;
  }

  & > * {
    margin-left: auto;
    margin-right: auto;
    max-width: 42rem;
  }

  &:focus-visible {
    outline: none;
  }

  .selection {
    display: inline;
  }

  & > .react-renderer {
    margin-top: 2.1rem;
    margin-bottom: 2.1rem;

    &:first-child {
      margin-top: 0;
    }

    &:last-child {
      margin-bottom: 0;
    }
  }

  &.resize-cursor {
    cursor: col-resize;
  }

  .ProseMirror-gapcursor {
    position: relative;
    width: 100%;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;

    &:after {
      border-top-color: rgba(0, 0, 0, 0.4);
      border-top-color: rgba(255, 255, 255, 0.4);
      width: 100%;
      top: -1.5em;
      max-width: 42rem;
      margin-left: auto;
      margin-right: auto;
      left: 0;
      right: 0;
    }
  }

  [data-type='horizontalRule'] {
    margin-top: 2em;
    margin-bottom: 2em;
    padding-top: 1em;
    padding-bottom: 1em;
    transition: all 0.1s ease-in-out;
    cursor: pointer;
  }
}

.ProseMirror.darkMode {
  .selection,
  *::selection {
    background-color: rgba(255, 255, 255, 0.2);
  }
}

.ProseMirror.lightMode {
  .selection,
  *::selection {
    background-color: rgba(0, 0, 0, 0.1);
  }
}

@import './partials/placeholder.css';
@import './partials/typography.css';
@import './partials/lists.css';
@import './partials/code.css';
@import './partials/blocks.css';
