body {
  --g-attention-color: black;
  --g-attention-background: hsl(34, 100%, 70%);
  --g-attention-hover-background: hsl(34, 100%, 64%);
  --g-background: hsl(220, 100%, 98%);;
  --g-border-width: 1px;
  --g-border-color: hsl(220, 100%, 60%);
  --g-tab-color: black;
  --g-tab-color-deactivated: #A0A0A0;
  --g-tab-background-deactivated: hsl(220, 100%, 90%);
  --g-tab-color-hover: black;
  --g-tab-background-hover: #F9F9F9;
  --g-tab-separator-width: 1px;
  --g-tab-separator-color: var(--g-border-color);
  --g-radius: 6px;
  --g-tab-padding: 0.5em;
  --g-btn-border-color: transparent;
  --g-btn-radius: var(--g-radius);
  --g-btn-color: hsl(220, 100%, 75%);
  --g-btn-deactivated-background-color: hsl(220, 100%, 85%);
  --g-btn-separator-color: hsl(220, 100%, 80%);
  --g-dropdown-menu-background: var(--g-tab-background-hover);
  --g-height: 75vh;
  --g-margin: 2px;
  --g-splitter-width: 0.5em;
  --g-splitter-ratio: 55%;
  --g-scrollbar-color: var(--g-tab-color-deactivated);
  --g-scrollbar-background: transparent;
  --g-matching-bracket-background: #dcdcdc;
  --g-highlight-color: #ffff00;
  --g-code-font: 'Hack', 'Lucida Console', Monaco, ui-monospace, monospace;
/*  font-size: 200%; */
}

div.g-tab-group {
  display: flex;
  flex-direction: column;
}

div.g-tab-group > ul:first-child {
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 3;
}

/* default for all tabs (including extra element) */
div.g-tab-group > ul:first-child > li {
  display: flex;
  flex-direction: column;

  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* default for all tabs (except extra element) */
div.g-tab-group > ul:first-child > li:not(:last-child) {
  color: var(--g-tab-color-deactivated);
  background: var(--g-tab-background-deactivated);
  border: var(--g-border-width) solid var(--g-border-color);
  border-left: var(--g-tab-separator-width) solid var(--g-tab-separator-color);
  border-bottom-width: 0;
  border-right-width: 0;
  margin: 0;
  padding: 0;
  min-width: 2em;
  flex-grow: 0;
  flex-shrink: 1;
  justify-content: flex-end;
  overflow-wrap: break-word;
  box-shadow: 0 var(--g-border-width) 0 0 var(--g-border-color);
}

div.g-tab-group > ul:first-child > li:not(:last-child) > div:first-child > div {
  padding-left: var(--g-tab-padding);
  padding-right: var(--g-tab-padding);
}

/* first tab */
div.g-tab-group > ul:first-child > li:first-child {
  border-top-left-radius: var(--g-radius);
}

/* last tab before extra element */
div.g-tab-group > ul:first-child > li:nth-last-child(2) {
  border-right-width: var(--g-border-width);
  border-top-right-radius: var(--g-radius);
  min-width: 0;
  text-align: center;
  margin-right: var(--g-radius);
}

div.g-tab-group > ul:first-child > li > div {
  text-align: left;
}

/* extra element */
div.g-tab-group > ul:first-child > li:last-child {
  margin-left: auto;
}

/* active tab */
div.g-tab-group > ul:first-child > li[data-g-active]:not([data-g-dropdown-menu-show]) {
  color: var(--g-tab-color);
  background: var(--g-background);
  box-shadow: var(--g-border-width) calc(1.25*var(--g-border-width)) 0 0 var(--g-background);
}

/* dirty tab */
div.g-tab-group > ul:first-child > li[data-g-dirty] > div:first-child > div::before {
  content: "•";
}

/* hovered tab */
div.g-tab-group > ul:first-child > li:not(:last-child):hover {
  color: var(--g-tab-color-hover);
  cursor: pointer;
}
div.g-tab-group > ul:first-child > li:not(:last-child)[data-g-dropdown-menu-show]:hover {
  background: var(--g-dropdown-menu-background);
}
div.g-tab-group > ul:first-child > li:not(:last-child):not([data-g-dropdown-menu-show]):hover {
  background: var(--g-tab-background-hover);
}

/* tabs attracting attention */
div.g-tab-group > ul:first-child > li[data-g-attention] {
  color: var(--g-attention-color);
  background: var(--g-attention-background);
}

div.g-tab-group > ul:first-child > li {
  position: relative;
}

div.g-tab-group > ul:first-child > li[data-g-dropdown-menu-show] > div:nth-first-child(2) {
  margin-top: 200px;
  overflow: hidden;
}

div.g-tab-group > ul:first-child > li[data-g-dropdown-menu-show] > div > div.g-dropdown-menu {
  display: block;
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

div.g-tab-group > ul:first-child > li[data-g-dropdown-menu-show] {
  color: var(--g-tab-color-hover);
  background: var(--g-dropdown-menu-background);
}

div.g-tab-group > ul:first-child > li > div > div.g-dropdown-menu {
  display: none;
  position: absolute;
  background: var(--g-dropdown-menu-background);
  border: var(--g-border-width) solid var(--g-border-color);
  width: 250px;
  max-height: 400px;
  margin: 0;
  left: -1px;
}

div.g-tab-group > ul:first-child > li > div > div.g-dropdown-menu > div[data-g-dropdown-menu-selectable]:hover {
  background: #e0e0e0;
}

div.g-tab-group > ul:first-child > li > div > div.g-dropdown-menu > hr {
  border: none;
  height: 1px;
  background-color: #e0e0e0;
  margin: 0;
  padding: 0;
}

div[data-g-bold] {
  font-weight: bold;
}

div.g-tab-group > ul:first-child > li > div > div.g-dropdown-menu > div[data-g-dropdown-menu-selectable][data-g-attention] {
  background: var(--g-attention-background);
}

div.g-tab-group > ul:first-child > li > div > div.g-dropdown-menu > div[data-g-dropdown-menu-selectable][data-g-attention]:hover {
  background: var(--g-attention-hover-background);
}

.CodeMirror pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like {
}

div.g-tab-group > div:last-child {
  background: var(--g-background);
  border: var(--g-border-width) solid var(--g-border-color);
  border-radius: 0 var(--g-radius) var(--g-radius) var(--g-radius);
}

div.g-tab-group > div:last-child > div {
  display: none;
  position: relative;
}

div.g-tab-group > div:last-child > div[data-g-active] {
  display: block;
}

.g-editor[data-g-editor-view=text] > .g-editor-text,
.g-editor[data-g-editor-view=html] > .g-editor-html {
  display: block;
}

.g-editor:not([data-g-editor-view=text]) > .g-editor-text,
.g-editor:not([data-g-editor-view=html]) > .g-editor-html {
  display: none;
}

.g-editor-html,
.g-extra-body,
.g-editor .CodeMirror-scroll,
.g-console .CodeMirror-scroll {
  min-height: var(--g-height);
  max-height: var(--g-height);
}

.g-editor-html {
  margin: var(--g-margin);
  overflow-y: auto;
}

.g-editor .CodeMirror,
.g-console .CodeMirror {
  font-family: var(--g-code-font);
  height: auto;
  margin: var(--g-margin);
  background: transparent;
}

.g-editor .CodeMirror-matchingbracket,
.g-console .CodeMirror-matchingbracket {
  background-color: var(--g-matching-bracket-background);
}

/* style for console input */
.g-console span:not(.g-console-transcript) {
  font-weight: bold;
}

/* style for console output (overrides the console input style) */
.g-console span.g-console-output {
  font-weight: normal;
}

/* style for highlighted text */
.g-editor span.g-highlight,
.g-console span.g-highlight {
  background-color: var(--g-highlight-color);
}

.g-editor .g-highlight-eol > span,
.g-console .g-highlight-eol > span {
  display: flex;
  width: 100%;
}

.g-editor .g-highlight-eol > span:after,
.g-console .g-highlight-eol > span:after {
  flex-grow: 1;
  content: " ";
  background-color: var(--g-highlight-color);
}

.g-console-multiplexer {
  width: 50%;
}

.g-editor-multiplexer {
  width: 50%;
}

.g-v-panes {
  flex-direction: column;
}

.g-h-panes {
  flex-direction: row;
}

.g-v-panes,
.g-h-panes {
  display: flex;
  width: 100%;
  height: 100%;
}

.g-v-panes > .g-pane-rigid {
  width: 100%;
  height: var(--g-splitter-ratio);
  min-height: 30%;
}

.g-h-panes > .g-pane-rigid {
  height: 100%;
  width: var(--g-splitter-ratio);
  min-width: 30%;
}

.g-v-panes > .g-pane-rigid,
.g-h-panes > .g-pane-rigid {
}

.g-v-panes > .g-pane-elastic {
  width: 100%;
  height: calc(100%-var(--g-splitter-ratio));
  min-height: 30%;
}

.g-h-panes > .g-pane-elastic {
  height: 100%;
  width: calc(100%-var(--g-splitter-ratio));
  min-width: 30%;
}

.g-v-panes > .g-pane-elastic,
.g-h-panes > .g-pane-elastic {
  flex: 1 0;
}

.g-v-panes > .g-pane-splitter {
  cursor: row-resize;
  flex: 0 0;
  padding: var(--g-splitter-width) 100% 0 0;
/*  background-color: rgba(0,0,0,0.1); */
}

.g-h-panes > .g-pane-splitter {
  cursor: col-resize;
  flex: 0 0;
  padding: var(--g-height) var(--g-splitter-width) 0 0;
/*  background-color: rgba(0,0,0,0.1); */
}

/* Works on Firefox */
.g-console .CodeMirror-vscrollbar,
.g-console .CodeMirror-hscrollbar,
.g-editor .CodeMirror-vscrollbar,
.g-editor .CodeMirror-hscrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--g-scrollbar-color) var(--g-scrollbar-background);
}

/* Works on Chrome, Edge, and Safari */
.g-console .CodeMirror-vscrollbar::-webkit-scrollbar,
.g-console .CodeMirror-hscrollbar::-webkit-scrollbar,
.g-editor .CodeMirror-vscrollbar::-webkit-scrollbar,
.g-editor .CodeMirror-hscrollbar::-webkit-scrollbar {
  width: 8px;
}

.g-console .CodeMirror-vscrollbar::-webkit-scrollbar-track,
.g-console .CodeMirror-hscrollbar::-webkit-scrollbar-track,
.g-editor .CodeMirror-vscrollbar::-webkit-scrollbar-track,
.g-editor .CodeMirror-hscrollbar::-webkit-scrollbar-track {
  background: var(--g-scrollbar-background);
}

.g-console .CodeMirror-vscrollbar::-webkit-scrollbar-thumb,
.g-console .CodeMirror-hscrollbar::-webkit-scrollbar-thumb,
.g-editor .CodeMirror-vscrollbar::-webkit-scrollbar-thumb,
.g-editor .CodeMirror-hscrollbar::-webkit-scrollbar-thumb {
  background-color: var(--g-scrollbar-color);
  border-radius: 20px;
  border: 3px solid var(--g-scrollbar-background);
}

.g-ui kbd {
  padding: .1rem .3rem;
  font-size: 87.5%;
  color: #fff;
  background-color: #212529;
  border-radius: .2rem;
}

table.g-right-justify td:nth-child(1) {
  text-align: right;
}

.g-code-example {
  position: relative;
  overflow: auto;
  background-color: #f4f4f4;
  margin: 5px 0;
  padding: 1rem 0 1rem 1rem;
  margin-left: 2rem;
  margin-right: 2rem;
  border-radius: 6px;
}

.g-code-example > button {
  position: absolute;
  top: 0;
  right: 0;
  font-size: .7rem;
  font-weight: bold;
  padding: 0 2px;
  border: solid 1px #808080;
  border-radius: 6px;
}

.g-code-example-filename {
  font-family: var(--g-code-font);
  font-size: .7rem;
  font-style: italic;
  text-align: center;
  padding: 0;
}

.g-ui button {
  padding: 2px 4px;
  border-radius: 6px;
  border: none;
  background: #e8e8e8;
  color: #000000;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.g-ui button:not(:disabled):hover {
  background: #a0a0a0;
}

.g-extra {
    border: 1px solid #ededef;
}

.g-extra-header {
  background-color: #fafafa;
  text-align: center;
}

.g-extra-header > button {
  font-weight: bold;
  margin: 2px;
}

.g-extra-header > button:disabled {
  color: #909090;
}

.g-h-panes > .g-extra {
  width: 35%;
}

.g-v-panes > .g-extra {
  height: 35%;
}

.g-h-panes > .g-console-multiplexer {
  width: 12%;
}

.g-v-panes > .g-console-multiplexer {
  height: 12%;
}

.g-extra-body {
  padding: 2px;
  overflow-y: scroll;
}
