@import url("https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap");
/* *{
  margin: 0;
  padding: 0;
}
.graph{
  height:100%;
  width:100%;
}
canvas{
  display:block;
} */

:root {
  --async-line-color: gray;
  --async-line-width: 3px;
}

/** ###########################################################################
 * global setup
 * ############################################################################ */

html, body {
  overflow: hidden;
}

/* hackfix: this way async-header can have same background-color as body */

div {
  background-color: inherit;
}

/** ###########################################################################
 * Graphs
 * ############################################################################*/

.graph-containers {
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
}

/** ###########################################################################
 * graph nodes
 * ############################################################################ */

.graph-mode-button img {
  width: 1rem;
}

.root-graph-mode-button {
  padding: 2px;
}

.root-graph-mode-button img {
  width: 1.5rem;
}

.mode-btn-wrapper .graph-mode-button {
  background-color: rgba(0, 0, 0, 0.1);
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1rem;
  min-width: 1.2rem;
  /* NOTE: on some systems, some of those emojis are extra-wide */
}

.theme-mode-dark .root-graph-mode-button {
  background: #292929;
  border: solid 2px #484848;
  color: white;
}

.selected-trace {
  color: darkred;
  border: 2px solid darkred;
  margin: -1px;
}

.theme-mode-dark .selected-trace {
  color: rgb(120, 120, 0);
  border: 2px solid yellow;
}

.screenshot-mode .selected-trace {
  color: darkred;
  border: 3px solid darkred;
}

/** ###########################################################################
 * context node
 * ############################################################################*/

.node-children>.root-context-node {
  margin-top: 4px;
}

.context-node .node-children {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.indicator-cont {
  position: relative;
  width: 0;
  height: auto;
}

.set-top .indicator {
  position: absolute;
  border-top: 1px solid rgb(139, 0, 0);
  width: 1em;
  left: -1.1em;
  top: 0;
}

.set-calltrace .indicator::before {
  content: "●";
  position: absolute;
  color: rgb(139, 0, 0);
  /* border-top: 1px solid black;
  width: 1em; */
  left: -0.85em;
  margin-top: -0.85rem;
  /* this about centers it on Mac :/ */
  top: 0;
}

.set-bottom .indicator {
  position: absolute;
  border-top: 1px solid rgb(139, 0, 0);
  width: 1em;
  left: -1.1em;
  bottom: 0;
}

/** #######################################
 * hidden node
 * ########################################*/

.hidden-context-node>div {
  background-color: rgba(206, 206, 206, 0.815);
}

.graph-container {
  overflow: hidden;
}

[data-el=panzoomCanvas] {
  /* width: 200px;
  height: 200px; */
  /* width: 100vw; */
  /* height: 100vh; */
  height: calc(100vh - 30px);
  overflow: auto;
}

.graph-content>.body {
  width: fit-content;
  height: fit-content;
  transform-origin: 0 0;

  /* this way, the viewport will (usually) not move when working on nodes near the bottom of the graph */
  padding-bottom: calc(100vh - 20px);

  /* allow user to have some distance to right scrollbar */
  padding-right: 50px;
  /* overflow: auto; */
}

.context-node {
  white-space: nowrap;
  border-right: 0;
}

.title {
  width: 100%;
}

.node-left-padding {
  width: 1em;
  position: relative;
}

.thin-mode .node-left-padding {
  width: 0.4em;
  position: relative;
}

/** ###########################################################################
 * Async Graph
 * ############################################################################ */

.async-graph {
  grid-template-areas: "header""main";
}

.async-grid {
  gap: 0.5px 1px;
}

.async-cell {
  border: 1px solid transparent;
  /* min-height: 1.6rem; */
  min-width: 1.2rem;
  line-height: 1.05;
  width: -moz-available;
  width: -webkit-fill-available;
  width: fill-available;
  /* padding: 1.5px; */
}

[data-async-detail-mode="1"] .async-cell {
  /* fix size for detail mode */
  min-height: 1rem;
  min-width: 4rem;
}

.async-cell:hover {
  border: 1px solid white !important;
  cursor: pointer;
  overflow: hidden;
}

.async-cell-selected {
  overflow: hidden;
}

.async-cell-selected {
  border: 2px solid darkred !important;
}

.async-cell-selected * {
  color: darkred !important;
}

.theme-mode-dark .async-cell-selected {
  border: 2px solid yellow !important;
}

.theme-mode-dark .async-cell-selected * {
  color: yellow !important;
}

.screenshot-mode .async-cell-selected {
  border: 2px solid darkred !important;
}

.screenshot-mode .async-cell-selected * {
  color: darkred !important;
}


.async-cell-stack-highlight {
  border: 1px dotted rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.theme-mode-dark .async-cell-stack-highlight {
  border: 1px dotted rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.async-cell-sync-root-highlight {
  border: 3px dotted red;
  overflow: hidden;
}

.theme-mode-dark .async-cell-sync-root-highlight {
  border: 3px dotted red;
  overflow: hidden;
}

.terminal-node {
  /* TODO: new design */
  /* border-bottom: white solid 1px; */
}

.async-button {
  border: 1px solid white;
  border-radius: 2px;
  text-align: center;
  line-height: normal;
  height: 15px;
  width: 15px;
  padding: 0px;
  font-size: 10px;
  margin-left: 3px;
}

.stats-disabled .context-stats {
  display: none !important;
}

.show-values .async-context-label {
  display: none !important;
}

[data-async-detail-mode="0"] div.async-detail {
  display: none !important;
}

[data-async-detail-mode="1"] div.async-brief {
  display: none !important;
}

.async-brief {
  font-weight: bold;
  font-family: system-ui;
  white-space: nowrap;
}

[data-async-detail-mode="0"] .async-cell {
  height: calc(1rem + 2px) !important;
  padding: 0px !important;
  font-size: 9pt !important;
  min-width: 20px !important;
}

[data-async-detail-mode="0"] .async-thread-title {
  display: none !important;
}

.async-header {
  /* position: sticky; */
  top: 0;
  width: 100% !important;
  z-index: 2
}

.async-thread {
  overflow: visible;
}

/** ###########################################################################
 * graph decorations
 * ############################################################################ */

.highlight-btn {
  margin-right: 0.3rem !important;
}

.mode-btn-wrapper {
  margin-right: 0.3rem;
}

.loc-label {
  white-space: nowrap;
  opacity: 0.6;
}

.error-label:hover {
  border: yellow solid 1px;
}

.context-loc-label {
  margin-right: 0.3rem !important;
}

.theme-mode-dark .loc-label {
  color: white;
}

.hide-locs .loc-label {
  display: none !important;
}

[data-call-mode="1"] [data-el="contextLabel"] {
  /* display: none !important; */
}

[data-call-mode="0"] [data-el="callLabel"] {
  display: none !important;
}

/* [data-call-mode="1"] [data-el="locLabel"] {
  display: none !important;
}
[data-call-mode="0"] [data-el="parentLocLabel"] {
  display: none !important;
} */

[data-el="callLabel"] {
  background: rgba(0, 0, 0, 0.03);
  font-size: 1rem;
  margin-right: 0.3rem !important;
}

[data-el="contextLabel"] {
  margin-right: 0.3rem !important;
}

.theme-mode-dark [data-el="callLabel"] {
  background: rgba(0, 0, 0, 0.25);
}

.value-label {
  background: rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  margin-right: 0.3rem !important;
}

.theme-mode-dark .value-label {
  background: rgba(0, 0, 0, 0.25);
}

.hide-values .value-label {
  display: none !important;
}

.lesser-label {
  /* background-color: rgb(93, 93, 93); */
  color: rgb(88, 88, 88);
}

.theme-mode-dark .lesser-label {
  /* background-color: rgb(93, 93, 93); */
  color: rgb(140, 140, 140);
}

.depth-label {
  /* background-color: rgb(93, 93, 93); */
  background-color: rgb(200, 200, 200);
  padding: 0 2px;
}

.theme-mode-dark .depth-label {
  background: #333;
}

/** #######################################
 * async line decorations
 * ########################################*/

/* horizontal dashed */
.hz-d {
  display: flex;
  align-items: center;
}

.hz-d::before {
  content: "";
  width: 100%;
  height: 0;
  border-top: var(--async-line-width) dashed var(--async-line-color);
}

/* vertical solid */
.vt {
  display: flex;
  justify-content: center;
}

.vt::before {
  content: "";
  height: 100%;
  width: 0;
  border-left: var(--async-line-width) solid var(--async-line-color);
}

/* vertical dashed */
.vt-d {
  display: flex;
  justify-content: center;
}

.vt-d::before {
  content: "";
  height: 100%;
  width: 0;
  border-left: var(--async-line-width) dashed var(--async-line-color);
}

/* corner dashed */
.cn-d {
  display: flex;
  justify-content: start;
  align-items: flex-end;
}

.cn-d::before {
  content: "";
  width: 50%;
  height: 50%;
  border-top: var(--async-line-width) dashed var(--async-line-color);
  border-right: var(--async-line-width) dashed var(--async-line-color);
}

/* T-shape dashed */
.t-d {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.t-d::before {
  content: "";
  width: 100%;
  height: 0;
  border-top: var(--async-line-width) dashed var(--async-line-color);
}

.t-d::after {
  content: "";
  width: 0;
  height: calc(50% - 0.5px);
  border-top: var(--async-line-width) dashed var(--async-line-color);
  border-left: var(--async-line-width) dashed var(--async-line-color);
}

/** ###########################################################################
 * general purpose highlight animation
 * ############################################################################ */

/*focus flash*/

.flash-me {
  -webkit-animation: flash linear 1.7s infinite;
  animation: flash linear 1.7s infinite;
}

@-webkit-keyframes flash {
  0% {
    background: #fff;
  }

  20% {
    opacity: 1;
    background: none;
  }

  40% {
    background: #fff;
  }

  60% {
    opacity: 1;
    background: none;
  }

  80% {
    background: #fff;
  }

  100% {
    opacity: 1;
    background: none;
  }
}

@keyframes flash {
  0% {
    background: #fff;
  }

  100% {
    opacity: 1;
    background: none;
  }
}

.blink-me {
  animation: blinker 1s ease-in-out infinite;
}

@keyframes blinker {
  50% {
    opacity: 0.3;
  }
}

/** ###########################################################################
 * minimap
 * ############################################################################ */

/* #minimap {
  position: fixed;
  display: block;
  right: 10px;
  top: 60px;
  border: 2px solid black;
  background: black;
} */

/** ###########################################################################
 * highlighter
 * ############################################################################ */

.highlight-on:not(.theme-mode-dark) {
  background: #888 !important;
  color: darkgray !important;
}

.highlight-on:not(.theme-mode-dark) .graph-node:not(.highlight)>* {
  background: #888 !important;
  color: darkgray !important;
}

.highlight-on:not(.theme-mode-dark) .graph-node:not(.highlight)>div>.content button {
  background: #888 !important;
  color: darkgray !important;
}

.highlight-on:not(.theme-mode-dark) .graph-node .node-children {
  background: #888 !important;
  color: darkgray !important;
}

body:not(.theme-mode-dark) .highlight {
  color: black;
}

/* dark mode */

/* change color to change unhighlighing context name's color -del */

.highlight-on.theme-mode-dark {
  background: #1e1e1e !important;
  color: #3b3b3b !important;
}

.highlight-on.theme-mode-dark .graph-node:not(.highlight)>* {
  background: #1e1e1e !important;
  color: #3b3b3b !important;
}

.highlight-on.theme-mode-dark .graph-node:not(.highlight)>div>.content button {
  background: #1e1e1e !important;
  color: #3b3b3b !important;
}

.highlight-on.theme-mode-dark .graph-node .node-children {
  background: #1e1e1e !important;
  color: #3b3b3b !important;
}

.theme-mode-dark .highlight {
  color: white;
  background: rgba(0, 0, 0, 0.4);
}

/** ###########################################################################
 * popper.js
 * ############################################################################ */

#tooltip {
  background: #333;
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  font-size: 1rem;
  border-radius: 4px;
}

/* #arrow, #arrow::before {
  position: absolute;
  width: 8px;
  height: 8px;
  z-index: -1;
} */

/* #arrow::before {
  content: '';
  transform: rotate(45deg);
  background: #333;
} */

/* #tooltip[data-popper-placement^='bottom']>#arrow {
  top: -4px;
} */

#tooltip {
  /* ... */
  display: none;
}

#tooltip[data-show] {
  display: block;
}

/** ###########################################################################
 * zoombar
 * ############################################################################ */

.zoombar {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.zoombar .button {
  margin: 2.5px;
}

.theme-mode-dark .zoombar .button {
  background: #292929;
  border: solid 2px #484848;
  color: white;
}

.context-stats {
  border: 1px solid black;
  border-radius: 4px;
  font-size: 9px;
  white-space: nowrap;
  width: max-content;
}

.context-stats img {
  width: 13px;
  height: 13px;
  filter: grayscale(1);
}

/** ###########################################################################
 * toolbar
 * ############################################################################*/

.toolbar-btn {
  padding: 4px !important;
}


/** ###########################################################################
 * screenShotMode
 * ############################################################################*/

 .theme-mode-dark .screenshot-mode .async-context-label,
.loc-label,
.context-node {
  color: #333 !important;
}

.theme-mode-dark .screenshot-mode .loc-label {
  color: #333 !important;
}

.theme-mode-dark .screenshot-mode
.async-context-label img,
.loc-label img,
.context-node img {
  filter: brightness(30%);
}

.screenshot-mode .async-context-label {
  font-weight: 600;
}

.screenshot-mode .async-cell .left-label {
  display: none !important;
}

/* .screenshot-mode .async-cell .async-context-label {
  display: none !important;
}

.screenshot-mode .async-cell .loc-label {
  display: none !important;
}

.screenshot-mode .async-cell .right-label {
  display: none !important;
} */

.screenshot-mode .hz-d {
  border-color: #fff
}

.screenshot-mode .vt {
  border-color: #fff
}

.screenshot-mode .vt-d {
  border-color: #fff
}

.screenshot-mode .cn-d {
  border-color: #fff
}

.screenshot-mode .t-d {
  border-color: #fff
}

.screenshot-mode .async-error {
  /* border-color: red; */
  background-blend-mode: darken;
  /* background: unset !important; */
}

.screenshot-mode .async-error .async-brief {
  background: unset;
  transform: translateX(100%);
}

/* 
.screenshot-mode .context-stats {
  display: none !important;
} */

.screenshot-mode .depth-label {
  display: none !important;
}

/** ###########################################################################
 * async stack
 * ############################################################################*/

[data-mount="AsyncStack"] .graph-mode-button {
  display: none !important;
}