.trace-mainframe {
  background: var(--color-app-background);
  font-family: Arial, Helvetica, sans-serif;
}

.titletext {
  margin: 5px;
  font-size: 24px;
}

.asmframe {
  position: absolute;
  background: var(--color-asm-background);
  border-radius: 10px;
  text-align: center;
}

.editbox {
  position: absolute;
  bottom: 5px;
  width: 378px;
  height: 40px;
  text-align: center;
  font-size: 16pt;
}

.buttontable {
  width: 100%;
  padding: 0;
  margin: 0;
}

.buttontable td {
  padding: 0;
  margin: 0;
}

.lmcframe {
  position: absolute;
  background: var(--color-lmc-background);
  border-radius: 10px;
  text-align: center;
}

.cpuframe {
  position: absolute;
  text-align: center;
}

.cpubox {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-lmc-panel-background);
  border-radius: 10px;
  border: 1px var(--color-border) solid;
}

.ramframe {
  position: absolute;
  text-align: center;
}

.rambox {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-lmc-panel-background);
  border-radius: 10px;
  border: 1px var(--color-border) solid;
}

.asmselect {
  background-color: var(--color-widgets);
  border-radius: 5px;
  height: 30px;
  min-width: 180px;
  font-size: 18px;
  border: 1px var(--color-border) solid;
  color: var(--color-widgets-text);
}

.trace-mainframe,
.trace-mainframe > .topbar,
.trace-mainframe > .copyright,
.trace-mainframe > .fullscreen {
  box-sizing: content-box;
}

[v-cloak] {
  display: none;
}

.trace-app {
  position: absolute;
  top: 90px;
  left: 10px;
  right: 10px;
  bottom: 10px;
}

.trace-settings-button {
  position: absolute;
  top: 105px;
  left: 20px;
  z-index: 1200;
}

.trace-settings-panel {
  position: absolute;
  top: 96px;
  left: 18px;
  width: 420px;
  min-height: 262px;
  z-index: 1300;
}

.trace-settings-panel-top {
  width: 100%;
  height: 34px;
}

.trace-settings-close {
  float: right;
}

.trace-options-grid {
  padding-top: 8px;
  width: calc(100% - 12px);
  grid-template-columns: 210px minmax(0, 1fr);
}

.trace-options-grid .cell {
  min-width: 0;
}

.trace-settings-toggle-cell {
  display: flex;
  align-items: center;
}

.trace-settings-size-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trace-settings-size-select {
  width: 120px;
}

.trace-settings-select {
  width: 100%;
  min-width: 0;
  height: 24px;
  box-sizing: border-box;
  border: 1px solid #767676;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  padding: 1px 4px;
  appearance: auto;
}

.trace-settings-select option {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 20px !important;
}

.trace-settings-example {
  width: 100%;
}

.trace-toolbar-frame {
  position: absolute;
  right: 40px;
  bottom: 8px;
  height: 34px;
}

.trace-toolbar {
  width: 100%;
  height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.trace-select-wrap {
  display: inline-flex;
  align-items: center;
}

.trace-select {
  width: 170px;
}

.trace-example-select {
  width: 230px;
}

.trace-toolbar-button {
  width: auto;
  min-width: 90px;
  padding-left: 12px;
  padding-right: 12px;
  margin-top: 0;
  margin-bottom: 0;
}

.trace-work-frame .fullscreen {
  bottom: 15px;
  right: 18px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0);
  z-index: 1000;
}

.trace-work-frame .fullscreen:hover {
  top: auto;
  bottom: 15px;
  right: 18px;
  width: 16px;
  height: 16px;
  background: var(--color-lmc-panel-background);
}

.trace-work-frame .fullscreenimg {
  width: 16px;
  height: 16px;
}

.trace-frame-title {
  line-height: 50px;
}

.trace-editor-header {
  position: absolute;
  top: 0;
  left: 10px;
  right: 10px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
}

.trace-editor-title {
  margin: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.trace-editor-view-toggle {
  width: auto;
  min-width: 108px;
  height: 30px;
  margin: 0;
}

.trace-editor-frame {
  top: 0;
  left: 0;
  height: 650px;
}

.trace-editor-shell {
  position: absolute;
  top: 58px;
  left: 10px;
  right: 10px;
  height: 529px;
  background: var(--color-input-background);
  border-radius: 10px;
  padding: 5px;
  display: grid;
  grid-template-columns: 40px 1fr;
  border: 1px var(--color-border) solid;
  overflow: hidden;
}

.line-gutter {
  border-right: 1px solid rgb(203 213 225);
  text-align: right;
  overflow: hidden;
  height: 517px;
  width: 100%;
  background: var(--color-input-background);
  color: var(--color-text);
  font-size: 14pt;
  font-family: monospace;
  line-height: 21px;
  user-select: none;
  scrollbar-width: none;
  box-sizing: border-box;
}

.line-gutter.line-gutter-readonly div {
  cursor: default;
}

.line-gutter::-webkit-scrollbar {
  display: none;
}

.line-gutter div {
  position: relative;
  height: var(--trace-gutter-line-height, 21px);
  padding-right: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  line-height: var(--trace-gutter-line-height, 21px);
  cursor: pointer;
}

.line-gutter div > span:not(.line-breakpoint) {
  position: relative;
  z-index: 1;
}

.line-gutter div.active {
  color: var(--color-highlight);
  font-weight: bold;
}

.line-gutter div.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-line-mark-background);
  opacity: 0.35;
  z-index: 0;
}

.line-gutter div.active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 0.45em solid transparent;
  border-bottom: 0.45em solid transparent;
  border-left: 0.6em solid var(--color-highlight);
  z-index: 2;
}

.line-gutter div.breakpoint {
  color: var(--color-text);
}

.line-gutter div.active.breakpoint {
  color: var(--color-highlight);
}

.line-breakpoint {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: transparent;
  z-index: 0;
}

.line-breakpoint.set {
  background: var(--color-line-breakpoint-background);
}

.line-marker {
  width: 1ch;
}

.editor {
  border: none;
  outline: none;
  width: 100%;
  height: 517px;
  resize: none;
  font-size: 14pt;
  font-family: monospace;
  line-height: 21px;
  background: transparent;
  color: var(--color-text);
  white-space: pre;
  overflow-x: auto;
  overflow-y: auto;
  padding: 0 0 0 8px;
  margin: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.editor-readonly {
  display: block;
}

.editor-area-wrap {
  position: relative;
  width: 100%;
  height: 517px;
  overflow: hidden;
  background: var(--color-input-background);
}

.editor-current-line {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--color-line-mark-background);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.trace-editor-actions {
  left: 10px;
  right: 10px;
  width: auto;
}

.trace-editor-actions .button {
  width: max(110px, calc(100% - 50px));
  margin-top: 4px;
  margin-bottom: 3px;
}


.trace-work-frame {
  top: 0;
  right: 0px;
  height: 650px;
}

.trace-splitter {
  position: absolute;
  top: 0;
  width: 12px;
  height: 650px;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 950;
}

.trace-splitter.active {
  z-index: 1100;
}

.trace-splitter-grip {
  width: 4px;
  height: 72px;
  border-radius: 999px;
  background: rgb(148 163 184 / 90%);
  box-shadow: 0 0 0 1px rgb(15 23 42 / 10%);
}

.trace-splitter:hover .trace-splitter-grip,
.trace-splitter.active .trace-splitter-grip {
  background: var(--color-highlight);
}

.trace-terminal-frame {
  top: 0px;
  left: 0px;
  right: 0px;
  height: 258px;
}

.trace-terminal-box {
  width: 100%;
  height: 252px;
  background: var(--color-lmc-panel-background);
  border-radius: 10px;
  font-size: 16pt;
  border: none;
  background: var(--color-lmc-background);
}

.trace-terminal-outer {
  position: absolute;
  top: 58px;
  left: 8px;
  right: 8px;
  height: 185px;
  background: var(--color-memory-background);
  border-radius: 10px;
  border: 1px var(--color-border) solid;
  padding: 8px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 14pt;
  font-family: monospace;
  color: var(--color-text);
  box-sizing: border-box;
  text-align: left;
}

.trace-terminal-outer.waiting {
  border-width: 3px;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 4px;
}

.terminal-line.error {
  color: var(--color-error-text);
  font-weight: bold;
}

.terminal-line.finished {
  color: var(--color-highlight);
  font-style: italic;
  font-weight: bold;
}

.terminal-line.info {
  color: var(--color-highlight);
  font-style: italic;
  font-weight: bold;
}

.terminal-line.prompt {
  color: var(--color-highlight);
}

.terminal-line.input {
  color: var(--color-text);
}

.terminal-input-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}

.terminal-input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
}

.trace-data-frame {
  top: 266px;
  left: 0px;
  right: 0px;
  height: 336px;
  var(--color-lmc-background);
}

.trace-data-box {
  width: 100%;
  height: 384px;
  background: var(--color-lmc-panel-background);
  border-radius: 10px;
  font-size: 16pt;
  border: none;
    background: var(--color-lmc-background);
}

.filesystem-viewer,
.trace-viewer {
  position: absolute;
  top: 58px;
  left: 12px;
  right: 12px;
  height: 272px;
  background: var(--color-panel-background);
  border-radius: 10px;
  border: 1px var(--color-border) solid;
  padding: 8px;
  box-sizing: border-box;
}

body.trace-editor-resizing,
body.trace-editor-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.filesystem-head,
.trace-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.filesystem-summary,
.trace-summary {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.2;
}

.filesystem-actions,
.trace-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filesystem-actions .button {
  width: auto;
  min-width: 86px;
  padding-left: 10px;
  padding-right: 10px;
  margin-top: 0;
  margin-bottom: 0;
}

.trace-head {
  justify-content: flex-end;
}

.filesystem-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  height: calc(100% - 40px);
}

.filesystem-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  align-content: start;
}

.filesystem-entry {
  width: 100%;
  background: var(--color-memory-background);
  border: 1px var(--color-border) solid;
  border-radius: 5px;
  text-align: left;
  padding: 6px 8px;
  font: 14px Arial, Helvetica, sans-serif;
  color: var(--color-text);
  cursor: pointer;
}

.filesystem-entry.active {
  background: var(--color-highlight);
  color: var(--color-highlight-text);
}

.filesystem-name {
  display: block;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filesystem-meta {
  display: block;
  font-size: 12px;
}

.filesystem-empty {
  font-size: 13px;
  color: var(--color-text2);
}

.filesystem-preview {
  margin: 0;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  border-radius: 5px;
  background: var(--color-memory-background);
  border: 1px var(--color-border) solid;
  color: var(--color-text);
  font: 14px/1.45 monospace;
  white-space: pre-wrap;
}

.trace-table-wrap {
  height: calc(100% - 40px);
  overflow: auto;
  background: var(--color-memory-background);
  border: 1px var(--color-border) solid;
  border-radius: 5px;
}

.trace-table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  table-layout: auto;
  font: 13px/1.35 monospace;
  color: var(--color-text);
}

.trace-table th,
.trace-table td {
  border: 1px solid var(--color-border);
  padding: 4px 6px;
  text-align: center;
  vertical-align: top;
}

.trace-table th {
  background: var(--color-memory-title);
  position: sticky;
  z-index: 2;
  top: 0;
}

.trace-head-index th {
  z-index: 3;
}

.trace-head-main th {
  z-index: 4;
}

.trace-table td {
  background: var(--color-memory-background);
}

.trace-cell-content {
  display: block;
  min-width: 4ch;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.trace-empty {
  color: var(--color-text2);
}

.button {
  background-color: var(--color-button);
  border-radius: 5px;
  height: 30px;
  width: max(100px, calc(100% - 60px));
  font-size: 18px;
  margin-top: 4px;
  margin-bottom: 3px;
  border: 1px var(--color-border) solid;
  color: var(--color-widgets-text);
}

.button:hover {
  background-color: var(--color-button-hover);
}

.button:disabled {
  background-color: var(--color-button-disabled);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.icon-button .bi {
  font-size: 14px;
  line-height: 1;
}

.smallbutton {
  width: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
