
/* Dark mode (default) color variables */
:root {
  /* Core theme colors */
  --body-bg: #111;
  --body-text: #999;
  --link-color: cyan;
  --text: white;

  /* Component colors */
  --control-panel-bg: #444;
  --version-border: yellow;
  --border-primary: #888;

  /* Interactive elements */
  --button-hover: #555;
  --button-active: #8888;
  --twopill-selected-bg: #7774;
  --twopill-selected-border: cyan;
  --twopill-unselected-text: gray;
  --submit-border: white;
  --submit-text: white;
  --hover-highlight: #7777;

  /* Modal system */
  --modal-bg: #333;
  --modal-border: #999;
  --modal-shadow: 0px 2px 0.5rem #333;

  /* Syntax highlighting */
  --syntax-type: #4EC9B0;
  --syntax-attr: #DCDCAA;
  --syntax-string: #CE9178;
  --syntax-modifier: #569CD6;
  --syntax-int: #B5CEA8;
  --syntax-attr-dim: #DCDCAA66;

  /* Status/result colors */
  --elp-success-bg: #3933;
  --elp-fail-bg: #9333;
  --elp-probe-bg: #3993;
  --elp-stored-bg: #3993;
  --elp-flash: yellow;
  --elp-actual-result: lightseagreen;

  /* Output colors */
  --captured-stdout: cyan;
  --captured-stderr: pink;

  /* Test colors */
  --test-suite-hover: #555;
  --test-case-hover: #777;
  --test-border: white;

  /* Tab colors */
  --test-tab-active-bg: #FFF;
  --test-tab-inactive-bg: #555;
  --test-tab-border: #222;

  /* Workspace colors */
  --workspace-shadow: #555;
  --workspace-row-active-outline: #6aaf;

  /* Misc colors */
  --separator-border: white;
  --context-menu-bg: #3d3d3d;
  --context-menu-text: white;
  --context-menu-border: black;
  --action-link: #3794ff;
  --spinner-bg: #fff;
  --input-field-text: white;
  --minimized-probe-border: #CCC;
}

/* Light mode color overrides */
body[data-theme-light="true"] {
  /* Core theme colors */
  --body-bg: white;
  --body-text: black;
  --link-color: #00E;
  --text: black;

  /* Component colors */
  --control-panel-bg: #eee;
  --version-border: hotpink;
  --border-primary: #eee;

  /* Interactive elements */
  --button-hover: #ddd;
  --button-active: #bbb;
  --twopill-selected-bg: #aaa4;
  --submit-border: #333;
  --submit-text: black;
  --hover-highlight: #aaa7;

  /* Modal system */
  --modal-bg: #f4f4f4;
  --modal-shadow: 0px 2px 0.5rem #aaa;

  /* Syntax highlighting */
  --syntax-type: #267F99;
  --syntax-attr: #795E26;
  --syntax-string: #A31515;
  --syntax-modifier: #0000FF;
  --syntax-int: #098658;
  --syntax-attr-dim: #795E2633;

  /* Status/result colors */
  --elp-success-bg: #efe7;
  --elp-fail-bg: #fee7;
  --elp-probe-bg: #eff7;
  --elp-stored-bg: #ffe7;
  --elp-flash: magenta;
  --elp-actual-result: hsl(177, 90%, 20%);

  /* Output colors */
  --captured-stdout: darkblue;
  --captured-stderr: darkred;

  /* Test colors */
  --test-suite-hover: #aaa7;
  --test-case-hover: #AAAA;
  --test-border: black;

  /* Tab colors */
  --test-tab-active-bg: #999;
  --test-tab-inactive-bg: white;
  --test-tab-border: #CCC;

  /* Workspace colors */
  --workspace-shadow: #ccc;
  --workspace-row-active-outline: #299f;

  /* Misc colors */
  --separator-border: black;
  --context-menu-bg: white;
  --context-menu-text: #616161;
  --context-menu-border: #777;
  --action-link: #006ab1;
  --spinner-bg: #555;
  --input-field-text: black;
  --minimized-probe-border: #333;
}

#root {
  display: grid;
  min-height: 98vh;
  height: 98vh;
  max-height: 98vh;
  grid-template-columns: 3fr 1fr;
  grid-template-rows: auto 1fr;
}
body.workspace-visible #root {
  grid-template-columns: auto 3fr 1fr;
}
html {overflow: hidden;}


body.fullscreen #input-header,
body.fullscreen #settings-header-wrapper,
body.fullscreen #control-panel,
body.hideModals .modalWindow {
  display: none;
}

#workspace-wrapper {
  border-right: 0.25rem groove var(--border-primary);
  width: 16rem;
  padding: 0.25rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
}

body.fullscreen #root {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

#settings-header-closed { display: none ;}
body.hide-settings #settings-header-closed {
  display: block;
  align-self: flex-start;
  margin-left: auto;
}
body.hide-settings #root {
  grid-template-columns: unset;
  grid-template-columns: auto 1fr 1.5rem;
  grid-template-areas: "w1 a b"
                       "w2 c c";
}
body.hide-settings #input-header { grid-area: a; }
body.hide-settings #settings-header-wrapper {
  grid-area: b;
}
body.hide-settings #input-wrapper { grid-area: c; }

body.hide-settings #settings-header-open { display: none; }
body.hide-settings #control-panel { display: none}

body.hide-settings #workspace-header { grid-area: w1 }
body.hide-settings #workspace-wrapper { grid-area: w2 }

#workspace-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
#workspace-test-runner {
  cursor: pointer;
  border-radius: 0.25rem;
  margin-top: 0.125rem;
  margin-bottom: 0.125rem;
  margin-right: 0.25rem;
  width: 5rem;
}

.workspace-test-failure-log {
  display: flex;
  flex-direction: column;;
  padding: 0.25rem;
  border: 1px solid crimson;
  max-height: 16rem;
  overflow: scroll;
}
.workspace-test-failure-log-entry > button{
  margin-left: 0.25rem;
}

.input-Monaco {
  overflow: auto;
}
.input-CodeMirror {
  position: relative;
  font-size: 12px; /* 12px matches monaco */
  display: flex;
  max-height: 100%;
  overflow: auto;
}
.input-CodeMirror > .cm-editor {
  flex-grow: 1;
}


.input-Ace .feedback-highlight {
  position: absolute;
  background: rgba(255, 233, 237, 0.2);
  border: 1px solid red;
}

.feedback-highlight {
  color: red;
  border-bottom: 1px solid red;
  border-radius: 4px;
  outline: red;
}

.monaco-editor {
  resize: vertical;
}

body {
  background: var(--body-bg);
  color: var(--body-text);
}

#control-panel {
  min-width: 20vw;
  padding: 0.5rem 0.25rem;
  background: var(--control-panel-bg);
  color: var(--text);
  border-left: 0.25rem ridge var(--border-primary);
  position: relative;
  overflow: scroll;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#control-panel label {
  user-select: none;
}
#version a {
  border: 1px solid var(--version-border);
  padding: 0.5rem;
  display: block;
  text-align: center;
  animation: flash-new-version 0.5s;
}

@keyframes flash-new-version {
  from { background: lightblue }
  to { background: transparent }
}
a {
  color: var(--link-color);
}
body[data-theme-light="true"] #control-panel {
  border-left-style: groove;
}
body[data-theme-light="true"] #workspace-wrapper {
  border-right-style: ridge;
}

.attr-arg-list {
  padding: 0.5rem;
  display: grid;
  row-gap: 0.5rem;
  grid-template-columns: auto auto;
}
.attr-list-submit {
  width: -webkit-fill-available;
  width: fill;
  border: 1px solid var(--submit-border);
  border-radius: 0.25rem;
  padding: 0 0.125rem;
  background: none;
  cursor: pointer;
  color: var(--submit-text);
}
.attr-list-submit:hover {
  background: var(--button-hover);
}
.attr-list-submit:active {
  background: var(--button-active);
}
.attr-input-twopill {
  border: 1px solid var(--border-primary);
  border-radius: 0.25rem;
}

.nodeLocatorContainer {
  cursor: pointer;
}

body.locator-request-active .nodeLocatorContainer {
  position: relative;
}
body.locator-request-active .nodeLocatorContainer::after {
  content: ' ';
  position: absolute;
  z-index: 99;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border: 2px dashed red;
  animation: nodeLocatorContainerBlink infinite 1s;
}
@keyframes nodeLocatorContainerBlink{
  0% { border-color: red; }
  50% { border-color: white; }
}
body.locator-request-active  .nodeLocatorContainer:hover::after {
  background: #F77A;
  cursor: pointer;
}

.attr-input-twopill-selected {
  background-color: var(--twopill-selected-bg);
  border-color: var(--twopill-selected-border);
}
.attr-input-twopill-unselected {
  color: var(--twopill-unselected-text);
  border-color: var(--twopill-unselected-text);
}

.modalWindow {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: absolute;
  min-width: 4rem;
  top: 1px;
  left: 1px;
  font-size: 1rem;
  cursor: move;
  user-select: none;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: auto;
}
.modalWindow:focus,
.modalWindow:focus-within {
  border-color: #aff;
}

.modalWindowColoring {
  border: 1px solid var(--modal-border);
  border-radius: 0.25rem;
  background: var(--modal-bg);
  color: var(--text);
  box-shadow: var(--modal-shadow);
}

.subWindow {
  border-top: 1px dashed black;;
}

.modalTitle {
  background: var(--body-bg);
  padding: 0.125rem 0.25rem;
  position: sticky;
  top: 0;
  left: 0;
  border-bottom: 1px solid #555;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  overflow: auto;
  min-height: 1rem;
}

.modalTitle .button-holder {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}
.modalEditButton {
  width: 18px;
  top: 3.5px;
  position: relative;
}
.modalOverflowButton {
  width: 22px;
}

.modalEditButton,
.modalOverflowButton,
.workspace-row-overflow {
  opacity: 0.8;
}
.modalCloseButton {
  min-width: 1.5rem;
  text-align: center;
  border-radius: 0.75rem;
  color: white;
  display: flex;
}
.modalCloseButton > span {
  margin: auto;
  height: 1.125rem;
}

body[data-theme-light="true"] .modalOverflowButton,
body[data-theme-light="true"] .modalEditButton,
body[data-theme-light="true"] .workspace-row-overflow {
  filter: invert();
}
body[data-theme-light="true"] .modalCloseButton,
body[data-theme-light="true"] .modalOverflowButton,
body[data-theme-light="true"] .modalEditButton {
  color: black;
}

.syntax-type { color: var(--syntax-type); }
.syntax-attr { color: var(--syntax-attr); }
.syntax-string { color: var(--syntax-string); }
.syntax-modifier { color: var(--syntax-modifier); }
.syntax-int { color: var(--syntax-int); }
.stream-arg-msg { color: var(--syntax-int); }

.bg-syntax-attr-dim,
.syntax-attr-dim-focus:focus {
  background: var(--syntax-attr-dim);
}

#input-header {
  display: flex;
  justify-content: space-between;
  padding-right: 0.25rem;
}

#input-header span {
  margin-top: auto;
  margin-bottom: auto;
}
#input-header button,
select {
  /* font-size: 1rem; */
  height: 1.5rem;
}

#input-header,
#settings-header-wrapper {
  margin: auto 0 auto 0;
}

#show-tests {
  border-radius: 0.25rem;
}
#input-wrapper, #control-panel {
  margin-top: 0.125rem;
}

#settings-header-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: end;
}
#settings-header-open {
  padding-left: 0.5rem;
  display: flex;
  justify-content: space-between;
  /* align-self: flex-end; */
  vertical-align: bottom;
}

#display-help {
  margin-top: 2rem;
  padding: 0 0.25rem;
}

.override-main-args-live-view {
  background: #111;
}
body[data-theme-light="true"] .override-main-args-live-view {
  background: #EEE;
}

textarea {
  min-height: 50vh;
}
#output {
  color: black;
}

.monaco-rag-highlight,
.cm-highlight-rag {
  font-style: oblique;
  background: #8888;
}
body[data-theme-light="true"] .monaco-rag-highlight,
body[data-theme-light="true"] .cm-highlight-rag {
  background: #8884;
}

.elp-flash, .elp-flash-multiline {
  font-style: oblique;
  background: #8804;
}
body[data-theme-light="true"] .elp-flash,
body[data-theme-light="true"] .elp-flash-multiline {
  background: #8081;
}

/* Fix multiline highlights in CodeMirror */
.cm-editor .monaco-rag-highlight-sticky,
.cm-editor .elp-flash-multiline {
  display: inline-block;
}

/* Progressively higher alpha values so that overlapping sticky highlights are easier to distinguish */
.monaco-rag-highlight-sticky-0 { background: rgba(  0, 255,   0, 0.200); /* lime */ }
.monaco-rag-highlight-sticky-1 { background: rgba(255, 166,   0, 0.225); /* orange */ }
.monaco-rag-highlight-sticky-2 { background: rgba(255, 105, 180, 0.250); /* hotpink */ }
.monaco-rag-highlight-sticky-3 { background: rgba(124, 104, 238, 0.275); /* mediumslateblue */ }
.monaco-rag-highlight-sticky-4 { background: rgba(255,  99,  71, 0.300); /* tomato */ }
.monaco-rag-highlight-sticky-5 { background: rgba(255,   0, 255, 0.325); /* magenta */ }
.monaco-rag-highlight-sticky-6 { background: rgba( 65, 105, 225, 0.350); /* royalblue */ }
.monaco-rag-highlight-sticky-7 { background: rgba(102, 205, 171, 0.375); /* mediumaquamarine */ }
.monaco-rag-highlight-sticky-8 { background: rgba(255, 160, 122, 0.400); /* lightsalmon */ }
.monaco-rag-highlight-sticky-9 { background: rgba(135, 207, 235, 0.425); /* skyblue */ }

.elp-result-success  { background: var(--elp-success-bg); outline: 1px solid green; }
.elp-result-fail     { background: var(--elp-fail-bg); outline: 1px solid red;  }
.elp-result-probe    { background: var(--elp-probe-bg); outline: 1px solid lightseagreen;   }
.elp-result-stored   { background: var(--elp-stored-bg); outline: 1px solid goldenrod;   }
.elp-flash   { outline: 2px dashed var(--elp-flash); pointer-events: none; }
.elp-flash-multiline   { box-shadow: 2px 0 0px var(--elp-flash) inset; }


.elp-actual-result-err,
.elp-actual-result-probe {
  color: crimson !important;
  margin-left: 0.25rem;
  outline: 1px solid #9333;
  padding: 1px 0;
}
.elp-actual-result-probe { color: var(--elp-actual-result) !important; }

.dimmed {
  color: #777;
}

.dim-button:hover:not(:disabled) { background: #AAA; }
.dim-button:not(:disabled) {
  cursor: pointer;
}
.dim-button, .dim-button:active {
  background: #555;
  border-radius: 50%;
  border: none;
}

body[data-theme-light="true"] .dim-button:hover:not(:disabled) { background: #AAA; }
body[data-theme-light="true"] .dim-button,
body[data-theme-light="true"] .dim-button:active {
  background: #EEE;
}
.myLineDecoration {
	background: lightblue;
	width: 5px !important;
	margin-left: 3px;
}
.clickHighlightOnHover:hover {
  cursor: pointer;
}
.highlightOnHover:hover:not(:has(.highlightOnHover:hover)),
.clickHighlightOnHover:hover:not(:has(.clickHighlightOnHover:hover)) {
  background: var(--hover-highlight);
}

.attr-modal-filter {
  margin: 0.125rem 0.125rem 0.5rem;
  display: block;
  width: calc(100% - 1rem);
  /* margin-left */
  /* width: -webkit-fill-available; */

}
.attr-modal-filter.empty {
  font-style: italic;
}

.vertical-separator {
  border-left: 1px solid var(--separator-border);
  padding: 0 0.5rem;
}

.search-list-separator {
  border-top: 1px dashed var(--separator-border);
  margin: 0.5rem 0;
}

.absoluteCenter {
  position: absolute !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes lds-spinner-fade-in {
  0%, 20% {visibility: hidden; }
  21% {visibility: visible; }
}
/* Taken from https://loading.io/css/ */
.lds-spinner {
  color: official;
  display: inline-block;
  position: relative;
  width: 40px;
  height: 40px;
  animation: lds-spinner-fade-in 1s linear;
}
.lds-spinner div {
  transform-origin: 20px 20px;
  animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 1.5px;
  left: 18.5px;
  width: 3px;
  height: 9px;
  border-radius: 20%;
  background: var(--spinner-bg);
}
.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


.captured-stdout {
  color: var(--captured-stdout);
  font-style: italic;
}
.captured-stderr {
  color: var(--captured-stderr);
  font-style: italic;
}



.context-menu-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0.25rem;
  border-top: 1px solid var(--context-menu-border);
  cursor: pointer;
}

.context-menu-row:first-of-type {
  border-top: none;
}
/* .context-menu-row img {
  margin-left: 1rem;
} */
.context-menu-row:hover {
  background: #7777;
}

.test-suite {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px solid var(--test-border);
  /* border-radius: 0.25rem; */
  padding: 0.5rem;
}
.test-suite:hover {
  cursor: pointer;
  background: var(--test-suite-hover);
}


.test-case {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px solid var(--test-border);
  padding: 0.25rem;
  cursor: pointer;
}
.test-case:hover:not(:active) {
  background: var(--test-case-hover);
}
.test-case > span {
  flex-shrink: 4;
}

.test-case > div {
  display: flex;
  flex-direction: row;
  /* min-width: 20%; */
  margin: auto 0;
}

.test-diff-error-root {
  box-shadow: -0.125rem 0 0 0 #f006;

}
.test-diff-error {
  background-color: #f002;
}
.test-diff-unmatched-root {
  box-shadow: -0.125rem 0 0 0 #0f06;
}
.test-diff-unmatched {
  background-color: #0f02;
}

.test-diff-info-selector {
  padding: 0.25rem;
  display: flex;
}

.tab-button-active,
.tab-button-inactive {
  height: 1.75rem;
  border-color: var(--test-tab-border);
  /* border-radius: 0.125rem; */
}
.tab-button-active {
  background: var(--test-tab-active-bg);
  color: black;
}
.tab-button-inactive {
  background: var(--test-tab-inactive-bg);
  color: var(--text);
}

body[data-theme-light="true"] .tab-button-active {
  color: white;
}
body[data-theme-light="true"] .tab-button-inactive:active {
  background: #999;
}

.test-case-source-code-line > span:first-of-type {
  min-width: 2.5rem;
  text-align: right;
  display: inline-block;
  color: gray;
}
.test-case-source-code-line > span {
  padding: 0 0 0 0.25rem;
  margin: 0;
  white-space: pre;
  font-family: monospace;
}
.test-case-source-code-line {
  border-left: 2px solid transparent;
  /* font-size: 1rem; */
}
.test-case-source-code-line[data-relevant] {
  border-left-color: green;
  background: #0f01;
}

.linkedProbeCreator {
  border: 1px solid white;
  border-radius: 50%;
  width: 0.875rem;
  height: 0.875rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.linkedProbeCreator:hover {
  background: green;
  cursor: pointer;
}
body[data-theme-light="true"] .linkedProbeCreator {
  border-color: black;
}

body[data-theme-light="true"] .linkedProbeCreator:hover {
  background: greenyellow;
}

.minimizedProbeWindow {
  border: 1px solid var(--minimized-probe-border);
  border-radius: 0.25rem;
  min-height: 1.5rem;

  display: flex;
  flex-direction: row;
  user-select: none;
}
/* .minimizedProbeWindow:not(:first-of-type) {
  margin-right: 0.25rem;
} */

.minimizedProbeWindowOpener {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  margin-top: auto;
  margin-bottom: auto;
  cursor: pointer;
}
.minimizedProbeWindowOpener:hover:not(:active) {
  background: #333;
}
body[data-theme-light="true"] .minimizedProbeWindowOpener:hover:not(:active) {
  background: #CCC;
}

.minimizedProbeWindowOpener,
.minimiedProbeWindowCheckboxWrapper {
  padding: 0.125rem;
}


/* Squiggly line styling based on (but modified) from https://stackoverflow.com/a/27764538 */
.minimiedProbeWindowCheckboxWrapper > .squigglyLineHolder {
  width: 1rem;
}
.probeOutputAreaCheckboxWrapper input {
  margin: 0;
}
.squigglyLineHolder  {
  position: relative;
  height: 0;
  margin-left: auto;
  margin-right: auto;
  bottom: 0.5rem;
}
.tinyLine {
  position: absolute;
  /* Cuts off the bottom half of the pattern */
  height: 16px;
  z-index: 99;
  /* For better cross browser consistency, make it larger with width.  */
  width: 1000%;
  /* And then scale it back down with scale, recentering with translateX. */
  transform: translateX(-45%) scale(0.1);
}

.tinyLine1 {
  /* background: linear-gradient(45deg, transparent, transparent 49%, red 49%, transparent 51%); */
  background: linear-gradient(45deg, transparent, transparent 49%, red 49%,  red 51%, transparent 51%);
}
.tinyLine2 {
  /* background: linear-gradient(-45deg, transparent, transparent 49%, red 49%, transparent 51%); */
  background: linear-gradient(-45deg, transparent, transparent 49%, red 49%,  red 51%, transparent 51%);
}
.tinyLine {
  /* Must be after background definition. */
  background-size: 32px 32px;
}

#minimized-probe-area {
  margin: auto 0 auto auto;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: row-reverse;
  /* max-width: 90%; */
  flex-wrap: wrap;
  gap: 0.125rem;
}

#show-tests {
  margin-top: auto;
  margin-bottom: auto;
}

.inline-window-active > div > .node-ref {
  padding-left: 0.25rem;
}

.node-container {
  border: 1px solid #666;
  width: fit-content;
  display: flex;
  flex-direction: column;
  padding-right: 1px;
  margin: 0 2px 1px;
  border-top: none;
  border-left: none;
  border-right: none;
  height: fit-content;
}
body[data-theme-light="true"] .node-container {
  border-color: #bbb;
}
.node-container-body {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.125rem;
  transition: background 0.05s linear;
}
.node-container-corner-nonempty {
  font-size: 0.75rem;
  margin-bottom: 0.125rem;
  width: fit-content;
}
.node-container-corner {
  display: inline;
}
.node-container-vertical .node-container-corner {
  text-orientation: upright;
  writing-mode: vertical-lr;
}
.node-container-vertical .node-container-corner {
  display: inline-flex;
  flex-direction: column;
  vertical-align: top;
}
.node-container-vertical {
  flex-direction: row;
}
.node-container-corner > .syntax-type{
  margin: auto 0;
}
.node-container-vertical .node-container-corner > .syntax-type{
  margin-top: 0 !important;
}
.node-container-small {
  font-size: 0.5rem;
}
.node-container-body-placeholder {
  font-size: 0.5rem;
  color: gray;
}
.node-container-body-row-list {
  display: flex;
  flex-direction: column;
}
.node-container-body-row {
  display: flex;
  flex-direction: row;
}

.workspace-row {
  margin: 0.125rem 0;
}
.workspace-row-test-success {
  background: #00ff0005;
}
.workspace-row-test-fail {
  background: #f003;
}
.workspace-row-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.workspace-row:last-of-type {
  border-bottom: none;
}
.workspace-row-header > span:first-child {
  display: block;
  flex-grow: 10;
  font-family: monospace;
  word-break: break-all;
}
.workspace-row-header > span:first-child:before {
  width: 0.5rem;
  min-width: 1rem;
  display: inline-block;
  text-align: center;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}
.workspace-unsaved > .workspace-row-header > span:first-child:before    { content: "🌐"; }
.workspace-file > .workspace-row-header > span:first-child:before       {
  background: url('icons/description_24dp.svg');
  content: "";
  display: inline-block;
  background-size: 0.75rem 0.75rem;
  width: 0.5rem;
  height: 0.5rem;
  background-repeat: no-repeat;
  min-height: 1rem;
background-position: center bottom;
  /* outline: 1px solid red; */
}
body[data-theme-light="true"] .workspace-file > .workspace-row-header > span:first-child:before {
  filter: invert();
}
.workspace-dir-closed > .workspace-row-header > span:first-child:before { content: ">"; }
.workspace-dir-open > .workspace-row-header > span:first-child:before   { content: ">"; transform: rotate(90deg); }

.workspace-dir-filelist {
  margin-left: 1.25rem;
  display: flex;
  flex-direction: column;
}

.workspace-dir-open {
  box-shadow: -1px 0 0 var(--workspace-shadow);
}


.workspace-row-active {
  outline: 1px solid var(--workspace-row-active-outline);
}


.workspace-unsaved {
  order: -99;
}
.workspace-addfile {
  order: 99;
}
.workspace-addfile > .workspace-row-header > span:first-child {
  text-align: center;
}

.workspace-row-overflow {
  width: 1rem;
}

.lazy-hover-diag-root {
  display: none;
}
.lazy-hover-diag-trigger:hover:not(:has(.lazy-hover-diag-trigger:hover)) + .lazy-hover-diag-root {
  display: flex;
  z-index: 999;
  position: fixed;
  top: var(--hover-diag-top);
  bottom: var(--hover-diag-bottom);
  left: var(--hover-diag-left);
  right: var(--hover-diag-right);
  user-select: none;
  animation: fade-in 0.25s;
}

.ast-view-filter-field {
  position: absolute;
  top: 0.5rem;
  right: 0;
  left: 0;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid gray;
  padding: 0.25rem;
  border-radius: 0.25rem;
  width: fit-content;
  background: var(--modal-bg);
}
.ast-view-filter-field:has(input:focus):not(:has(input:placeholder-shown))::after {
  position: absolute;
  top: 2rem;
  right: -1rem;
  left: -1rem;
  font-size: 0.75rem;
  font-style: italic;
  text-align: center;
  color:inherit;
  background: inherit;
}
.ast-view-filter-field.ast-filter-found-something:has(input:focus):not(:has(input:placeholder-shown))::after {
  content: 'Press enter to cycle between matches';
}
.ast-view-filter-field.ast-filter-found-nothing:has(input:focus):not(:has(input:placeholder-shown))::after {
  content: 'No matches';
}

.ast-view-filter-field > input {
  background: black;
  color: var(--text);
  border-radius: 0.125rem;
  border-width: 1px;
}
body[data-theme-light="true"] .ast-view-filter-field > input {
  background: white;
}

.ast-view-filter-field > input::placeholder {
  text-align: center;
}
.ast-view-reset-btn {
  position: absolute;
  bottom: 20%;
  right: 0;
  left: 0;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid gray;
  padding: 1rem;
  border-radius: 0.25rem;
  width: fit-content;
  cursor: pointer;
}
.ast-view-reset-btn:hover {
  background-color: #222;
}
body[data-theme-light="true"] .ast-view-reset-btn:hover {
  background-color: #DDD;
}

.codemirror_context_menu:focus {
  border: 1px solid cyan;
}
.codemirror_context_menu {
  display: none;
  position: absolute;
  background: var(--context-menu-bg);
  border: 1px solid var(--context-menu-border);
  padding: 0.25rem 0;
  font-size: 1rem;
  z-index: 510; /* needs to be higher than CodeMirror tooltips (500) */
  color: var(--context-menu-text);
}
.codemirror_context_menu.show {
  display: block;
}

.codemirror_context_menu > div.row {
  padding: 0.25rem 0.5rem;
}
.codemirror_context_menu > div.row:hover {
  background: #1E466E;
  cursor: pointer;
}
body[data-theme-light="true"] .codemirror_context_menu > div.row:hover {
  background: #275EBA;
  color: white;
}
.cm-focused {
  outline: none !important;
}
.codemirror_action_link {
  color: var(--action-link);
  cursor: pointer;
}
