#editor, .editor {
    background: white;
    color: black;
    background-clip: padding-box;
    margin: -8px;        /* Set so that the .ProseMirror padding starts from edges */
    --padBottom: 0;                     /* MU.padBottom() sets this value in px based on fullHeight */
    padding-block: 0 var(--padBottom);
    overflow-x: clip;
    overflow-y: scroll;
    height: 100vh;
}
@media (prefers-color-scheme: dark) {
  #editor, .editor {
    background: black;
    color: white;
  }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font: -apple-system-body;
}

a {
    color: blue;
    text-decoration: none;
}
@media (prefers-color-scheme: dark) {
    a {
        color: #4183c4;
    }
}

a:hover {
    text-decoration: underline;
}

p, pre {
    font-size: 1.0rem;
}

p, ul, ol, dl, table, pre {
    margin: 0 0 15px;
}

ul, ol {
    padding-left: 30px;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2.0rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

h5 {
    font-size: 1.0rem;
}

h6 {
    font-size: .83rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    margin: 0 0 10px 0;
}

h1 + p, h2 + p, h3 + p {
    margin-top: 10px;
}

table {
    table-layout: fixed;
    border-collapse: collapse;
    width: 100%;
}

table th, table td {
    padding: 4px;
}

table th {
    font-weight: normal;    /* The default is bold, but we want to use paragraph styles and formatting */
}

/* Make the styling compact inside of a table */
table p, table h1, table h2, table h3, table h4, table h5, table h6 {
    margin: 0;
}

/* Table bordering options */
.bordered-table-none {
    border: none;
}

.bordered-table-outer, .bordered-table-header, .bordered-table-cell {
    border: 1px solid #DDD;
}

.bordered-table-header th {   /* border th not thead to refresh properly */
    border: 1px solid #DDD;
}

.bordered-table-cell th, .bordered-table-cell td {
    border: 1px solid #DDD;
}

/* Default table bordering is same as .bordered-table-cell but is only used when not specified */
table:not(.bordered-table-none, .bordered-table-outer, .bordered-table-header, .bordered-table-cell) {
    border: 1px solid #DDD;
}

table:not(.bordered-table-none, .bordered-table-outer, .bordered-table-header, .bordered-table-cell) td {
    border: 1px solid #DDD;
}

table:not(.bordered-table-none, .bordered-table-outer, .bordered-table-header, .bordered-table-cell) th {
    border: 1px solid #DDD;
}

li p {
    margin: 0px 0;
}

blockquote {
    margin-right: 0px; /* Because nested blockquotes just keep getting narrower */
}

code {
    overflow-x: scroll;
    display: block;
    background-color: #F8F8F8;
    border-radius: 3px;
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;
    white-space: pre;
}
@media (prefers-color-scheme: dark) {
    code {
        background-color: #808080;
    }
}

p code, h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
    display: inline;
}

.resize-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
}

/* Provide a slightly darkened or lightened overlay while search is active */
.searching {
    background-color: rgba(0, 0, 0, 0.10);
}
@media (prefers-color-scheme: dark) {
    .searching {
        background: rgba(255, 255, 255, 0.10);
    }
}

.resize-container img {
    display: block;
    outline: 1px black dashed;
    outline-offset: 4px;
    outline-width: 1px;
}
@media (prefers-color-scheme: dark) {
    .resize-container img {
        outline: 1px white dashed;
    }
}

.resize-handle-nw,
.resize-handle-ne,
.resize-handle-sw,
.resize-handle-se {
    position: absolute;
    display: block;
    width: 6px;
    height: 6px;
    outline: 1px black solid;
    background: white;
    z-index: 999;
}
@media (prefers-color-scheme: dark) {
    .resize-handle-nw,
    .resize-handle-ne,
    .resize-handle-sw,
    .resize-handle-se {
        outline: 1px white solid;
        background: black;
    }
}

/* A transparent child for each resize-handle that expands the clickable area */
.resize-handle-nw:after,
.resize-handle-ne:after,
.resize-handle-sw:after,
.resize-handle-se:after {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 16px;
  height: 16px;
}

/* The *-resize cursors do not work, at least in MacCatalyst.
 * Still specifying them below. They default to a pointer instead
 */
.resize-handle-nw {
    cursor: nw-resize;
    top: -8px;
    left: -8px;
}

.resize-handle-ne {
    cursor: ne-resize;
    top: -8px;
    right: -8px;
}

.resize-handle-sw {
    cursor: sw-resize;
    bottom: -8px;
    left: -8px;
}

.resize-handle-se {
    cursor: se-resize;
    bottom: -8px;
    right: -8px;
}

.placeholder[placeholder]:before {
    content: attr(placeholder);
    position: absolute;
    color: #ccc;
}

/* Classes set by prosemirror-search module, modified for MarkupEditor */
/* Note the dark and light mode are the same */

.ProseMirror-search-match {
  background-color: yellow;
  color: black;
}

.ProseMirror-active-search-match {
  background-color: orange;
  color: black;
  outline: 1px orangered solid;
  z-index: 2;
}