.bbcodehl-wrap {
  position: relative;
  isolation: isolate;
}

.bbcodehl-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: normal;
  word-wrap: normal;
  hyphens: none;
  box-sizing: border-box;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  tab-size: 4;
}

.bbcodehl-overlay > .bbcodehl-content {
  min-height: 100%;
  white-space: inherit;
  word-break: inherit;
  overflow-wrap: inherit;
}


.bbcodehl-overlay,
.bbcodehl-overlay *,
textarea.bbcodehl-source {
  font-family: var(--bbcodehl-font-stack, ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace) !important;
}
textarea.bbcodehl-source {
  position: relative;
  z-index: 1;
  background: transparent !important;
  color: transparent !important;
  caret-color: var(--body-text-color, #111111);
}

textarea.bbcodehl-source::selection {
  background: rgba(80, 140, 255, 0.25);
}

textarea.bbcodehl-source::-moz-selection {
  background: rgba(80, 140, 255, 0.25);
}

textarea.bbcodehl-source::placeholder {
  color: transparent !important;
}

.bbcodehl-token-kw1 { color: #1AADEC; }
.bbcodehl-token-kw2 { color: #880000; background: #FFE6E7; }
.bbcodehl-token-kw3 { color: #800080; background: #F4E8FF; }
.bbcodehl-token-kw4 { color: #0000FF; background: #E6E6FF; }
.bbcodehl-token-kw5 { color: #0000FF; background: #FFFFBB; }
.bbcodehl-token-kw6 { color: #808080; background: #EBEBEB; }
.bbcodehl-token-kw7 { color: #EA7500; background: #FFE9DF; }
.bbcodehl-token-kw8 { color: #0000FF; }
.bbcodehl-token-op { color: #0000FF; }
.bbcodehl-token-folder { color: #006200; background: #CAFFCA; }
.bbcodehl-token-delim1 { color: #D50000; }
.bbcodehl-token-delim2 { color: #008080; }
.bbcodehl-token-delim3 { color: #FF0000; }
.bbcodehl-token-delim4 { color: #0000FF; }
.bbcodehl-token-delim5 { color: #616161; }
.bbcodehl-token-delim6 { color: #0000FF; }
.bbcodehl-token-delim7 { color: #0000FF; }
.bbcodehl-token-delim8 { color: #FF8040; background: #FFE8DD; }
.bbcodehl-token-error { color: #D50000; background: #FFF1F1; text-decoration: underline wavy #D50000; }

/* Optional: make sure native border/background of common phpBB textareas stays visible */
.bbcodehl-wrap textarea.bbcodehl-source {
  box-sizing: border-box;
}

.bbcodehl-wrap.notranslate,
.bbcodehl-overlay.notranslate,
.bbcodehl-content.notranslate,
textarea.bbcodehl-source.notranslate {
  -webkit-user-modify: read-only-plaintext-only;
}


.bbcodehl-wrap {
  --bbcodehl-font-stack: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
