.text-black {
  color: black;
  font-size: 16px !important;
}

.display-flex {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.flex-align-center {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.flex-direction-row {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.flex-direction-column {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.flex-content-space-between {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.the-editor-area {
  display: flex;
  flex-direction: column;
  border: 2px solid grey;
  resize: both;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: fit-content;
  max-width: 65vw;
  background: white;
  color: black;
  position: relative;
  border-radius: 6px;
}

.the-editor-area::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' style='width:24px;height:24px' viewBox='0 0 24 24'%3E%3Cpath d='M22,22H20V20H22V22M22,18H20V16H22V18M18,22H16V20H18V22M18,18H16V16H18V18M14,22H12V20H14V22M22,14H20V12H22V14Z' /%3E%3C/svg%3E");
  position: absolute;
  color: white;
  bottom: 0;
  right: 0;
  width: 1em;
  height: 1em;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(2) translate(-12px, -2px);
  font-size: 1.3em;
}

.the-editor-area::-webkit-resizer {
  transform: scale(3);
}

.editor-content-rendered {
  max-height: 85vh;
  overflow-y: auto;
}

.editor-content-rendered.jinjaSyntaxHighlightActivated .jinja-syntax {
  background: rgba(0, 255, 0, 0.205) !important;
  border-bottom: 1px solid rgb(0, 38, 255) !important;
  margin-bottom: -1px !important;
}

.menubar {
  display: none;
}

.menubar.show {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 2px solid grey;
  padding: 1rem 0.5rem;
}

.menubar button {
  margin: 0 4px 2px 2px;
  height: 30px;
  min-width: 30px;
  font-size: 1.3em;
  background-color: white;
  border: none;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.menubar button:not([id$="-addTable"]) {
  display: flex;
  justify-content: center;
  align-items: center;
}

.menubar button:hover {
  background-color: rgba(87, 87, 87, 0.199);
  -webkit-transition: none;
  transition: none;
}

.menubar button.disabled:hover {
  cursor: not-allowed;
}

.menubar button.disabled svg {
  fill: #ced4da;
}

.menubar button.is-active {
  background-color: #586b84;
}

.menubar button.is-active svg {
  fill: white;
}

.menubar button[id$="-addTable"] svg {
  transform: translateY(2px);
}

.menubar button[id$="-addTable"]:hover .table-config {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  cursor: initial;
}

.menubar button[id$="-addTable"]:hover .table-config .add-table-button {
  font-size: 1.2rem;
  margin: 5px 0 5px 0;
  background-color: #586b84;
  cursor: pointer;
  border-radius: 6px;
  color: white;
  padding: 4px;
}

.menubar button[id$="-addTable"] .table-config {
  display: none;
  position: absolute;
  background-color: white;
  z-index: 10000;
  -webkit-box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.3);
  padding: 1em;
  border-radius: 4px;
  transform: translate(-1em, 0);
}

.menubar button[id$="-addTable"] .table-config input {
  height: 1.5rem;
  border-radius: 6px;
  border: 2px solid grey;
  font-size: 1.2rem;
  min-width: 100px;
  padding: 4px;
}

.menubar button[id$="-addTable"] .table-config input:first-of-type {
  margin-right: 4px;
}

.menubar button[id$="-addTable"] .table-config input:last-of-type {
  margin-left: 4px;
}

.menubar button[id$="-addTable"] .table-config .inputs-container {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 1em;
}

.table-dimension-input {
  width: 40%;
}

.menubar
  button[id$="-addTable"]
  .table-config
  .inputs-container
  .table-dimension-input {
  color: black;
  background-color: white;
}

.not-saved-text {
  display: none;
}

.not-saved-text.show {
  display: inline;
  color: #ee0e29;
  font-weight: bold;
  font-size: 1.3em;
  height: 100%;
  align-self: center;
  margin: 0 0 0 0.5rem;
}

.not-saved-text-spacer {
  display: none;
}

.not-saved-text-spacer.show {
  display: block;
}

.ProseMirror {
  color: black !important;
  padding: 1rem 1.75rem;
  outline: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 0 !important;
}

.ProseMirror * {
  color: black !important;
}

.ProseMirror p {
  font-size: 16px !important;
}

.ProseMirror h1 {
  display: block !important;
  font-size: 2em !important;
  margin-block-start: 0.67em !important;
  margin-block-end: 0.67em !important;
  margin-inline-start: 0px !important;
  margin-inline-end: 0px !important;
  font-weight: bold !important;
}

.ProseMirror h2 {
  padding: 0;
  display: block !important;
  font-size: 1.5em !important;
  margin-block-start: 0.83em !important;
  margin-block-end: 0.83em !important;
  margin-inline-start: 0px !important;
  margin-inline-end: 0px !important;
  font-weight: bold !important;
  background: white !important;
}

.ProseMirror h3 {
  display: block !important;
  font-size: 1.17em !important;
  margin-block-start: 1em !important;
  margin-block-end: 1em !important;
  margin-inline-start: 0px !important;
  margin-inline-end: 0px !important;
  font-weight: bold !important;
  padding: 0 !important;
}

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

.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #a8a8a8;
  pointer-events: none;
  height: 0;
}

.ProseMirror ol {
  padding-left: 0px !important;
  list-style-type: decimal !important;
}

.ProseMirror ol li::marker {
  font-size: 16px !important;
}

.ProseMirror ol > li > ol {
  padding-left: 10px !important;
  margin-left: 10px !important;
  list-style-type: lower-latin !important;
}

.ProseMirror ol > li > ol > li > ol {
  padding-left: 10px !important;
  margin-left: 10px !important;
  list-style-type: lower-roman !important;
}

.ProseMirror ol > li > ol > li > ol > li > ol {
  padding-left: 10px !important;
  margin-left: 10px !important;
  list-style-type: upper-latin !important;
}

.ProseMirror ol > li > ol > li > ol > li > ol > li > ol {
  padding-left: 10px !important;
  margin-left: 10px !important;
  list-style-type: upper-roman !important;
}

.ProseMirror ul {
  list-style-type: disc !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  margin-inline-start: 0px !important;
  margin-inline-end: 0px !important;
}

.ProseMirror ul li {
  list-style: disc !important;
}

.ProseMirror ul > li > ul {
  padding-left: 10px !important;
  margin-left: 10px !important;
  list-style-type: disc !important;
}

.ProseMirror {
  margin: 1rem 0;
}

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

.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3,
.ProseMirror h4,
.ProseMirror h5,
.ProseMirror h6 {
  line-height: 1.1;
  text-transform: none;
  padding: 0;
}

.ProseMirror pre {
  background: #0d0d0d !important;
  color: #fff !important;
  font-family: "JetBrainsMono", monospace !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem !important;
}

.ProseMirror pre code {
  color: #fff !important;
  padding: 0 !important;
  background: none !important;
  font-size: 0.8rem !important;
}

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

.ProseMirror blockquote {
  padding-left: 1rem;
  border-left: 2px solid rgba(13, 13, 13, 0.1);
}

.ProseMirror hr {
  border: none;
  border-top: 2px solid rgba(13, 13, 13, 0.1);
  margin: 2rem 0;
}

.ProseMirror a {
  text-decoration: underline;
}

/* Table-specific styling */
.ProseMirror table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.ProseMirror table td,
.ProseMirror table th,
.ProseMirror table[show_borders="false"]:hover td,
.ProseMirror table[show_borders="false"]:hover th {
  min-width: 1em;
  border: 2px solid #ced4da;
  padding: 3px 5px;
  vertical-align: top;
  box-sizing: border-box;
  position: relative;
}

.ProseMirror table[show_borders="false"] td,
.ProseMirror table[show_borders="false"] th {
  border: none;
  box-sizing: border-box;
}

.ProseMirror table td > *,
.ProseMirror table th > * {
  margin-bottom: 0;
}

.ProseMirror table th {
  font-weight: bold;
  text-align: left;
  background-color: #f1f3f5;
}

.ProseMirror tr {
  background-color: white !important;
}

.ProseMirror table .selectedCell:after {
  z-index: 2;
  position: absolute;
  content: "";
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(200, 200, 255, 0.4);
  pointer-events: none;
}

.ProseMirror table .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: -2px;
  width: 4px;
  background-color: #adf;
  pointer-events: none;
}

.tableWrapper {
  overflow-x: auto;
}

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

div[data-tippy-root] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.selectedCell:after {
  z-index: 2;
  position: absolute;
  content: "";
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(200, 200, 255, 0.4);
  pointer-events: none;
}

.column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: -2px;
  width: 4px;
  background-color: #adf;
  pointer-events: none;
  cursor: col-resize !important;
}

.tableWrapper {
  padding: 1rem 0;
  overflow-x: auto;
}

.ProseMirror.resize-cursor {
  cursor: ew-resize !important;
  cursor: col-resize !important;
}

.spacer {
  height: 30px;
  border-right: 2px solid grey;
  margin: 0 6px 0 6px;
}
