.jsavcontainer {
  overflow:hidden;
  width: auto;
  padding: 0 1rem 1rem;
  background-color: var(--jsavcontainer-bg);
  position: relative;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.jsavcanvas {
  position: relative;
  background: transparent;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-bottom: 40px;
  min-height: 50vh;
}
.example .jsavcanvas {
  min-height: auto;
  padding-bottom: 0;
  align-items: flex-start;
}
.example.jsavcontainer {
  background: none;
  padding: 0 0.25rem;
}
.jsav-example-flex-row {
  display: flex;
  gap:1rem;
  min-height:212px;
  justify-content:space-around;
  flex-wrap: wrap;
}
.example-flex-row .jsavcanvas {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: self-start;
}
.jsavcanvas .line-numbers .line-numbers-rows {
  display: none;
}
.jsavcanvas > svg {
  display: none;
}
.example .jsavcanvas > svg {
  display: initial;
  z-index: 999;
}
.jsavcanvas pre[class*=language-].line-numbers.line-numbers code {
  padding-left: 1.8em;
}

@media only screen and (max-width: 600px) {
  .jsavcanvas {
    flex-direction: column;
  }
}

.jsavnode {
  min-width: 45px;
  min-height: 45px;
  text-align: center;
  background: var(--jsavnode-bg);
  border: var(--jsavnode-border);
  border-color: var(--jsavnode-border-color);
  color: var(--jsavnode-color);
  opacity: 1;
  padding: 0;
  cursor: default;
  box-shadow: 2px 2px 5px rgba(120, 120, 120, 0.5);
  border-radius: 0.6rem;
}
.jsavcenter {
  margin-left: auto;
  margin-right: auto;
}

.jsavarray, .jsavlabel, .jsavcode, .jsavlist, .jsavtree, .jsavgraph, .jsavmatrix {
  margin-top: 1em;
  margin-bottom: 1em;
}
.example .jsavtree {
  margin-bottom: 0; 
}
.jsavhighlight, .jsavarray.jsavbararray .jsavindex.jsavhighlight .jsavvalue, .jsavvariable.jsavhighlight .jsavvalue {
  background-color: #cfe7ff !important;
  color: black !important;
}

.jsavvalue {
  width: 100%;
  min-height: inherit;
  min-width: inherit;
  border-radius: inherit;
}

.empty .jsavvalue {
  text-shadow: none;
}
.jsavnode.label {
  padding: 0!important;
}

.jsavvaluelabel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.4rem;
}
.jsavautoresize .jsavnode .jsavvaluelabel {
  border-radius: 10px;
}
.jsavmatrix .jsavvalue {
  display: flex;
  align-items: center;
  justify-content: center;
}
.jsavmatrix .jsavindex .jsavvaluelabel {
  padding: 0 0;
  font-weight: 400;
  font-size: 16px !important;
}

.jsavautoresize .jsavnode {
  min-width: 50px;
  height: auto;
  min-height: 50px;
}

.jsavindexed.jsavautoresize .jsavnode,
.square-cells.jsavautoresize .jsavnode {
  min-width: 60px;
  min-height: 60px;
}
.character-cells.jsavarray {
  gap: 1px;
}
.character-cells.jsavautoresize .jsavnode {
  min-width: 40px;
  max-width: 40px;
  border-radius: 0;
}
.character-cells.jsavautoresize .jsavnode .jsavvaluelabel {
  font-family: monospace;
  white-space: pre;
  font-size: 25px;
  font-weight: 400;
}
.jsavautoresize.stack .jsavnode {
  min-width: 50px;
  height: auto;
  min-height: 50px;
}

/***** STYLING OF THE ARRAY DATA STRUCTURE *****/
.jsavarray {
  position: relative;
  list-style: none;
  min-height: 50px;
  padding: 0;
  clear:both;
  white-space: nowrap;
  -webkit-transform-style: preserve-3d;
}
.jsavarray * {
  -webkit-transform-style: preserve-3d;
}
.jsavarray:after {
  content: "";
  clear: both;
  display: block;
}
.jsavindexlabel {
  width: 100%;
  height: 25px;
  line-height: 25px;
  color: var(--jsavindexlabel-color);
  position: absolute;
  vertical-align: middle;
}
.jsavindex {
  box-sizing: border-box;
}
.jsavindex .jsavvaluelabel {
  z-index: 99;
  font-family: "Nunito", cursive;
  font-size: 30px;
  font-weight: 700;
  line-height: 50px;
}
.jsavindex.smaller .jsavvaluelabel {
  font-size: 20px;
  font-weight: 700;
}
.jsavmatrix .jsavindex span {
  line-height: unset;
  font-size: 20px!important;
}
.jsavhorizontalarray .jsavindex {
  display: inline-table;
  position: relative;
}
/* remove right borders from everything but the last index */
.jsavhorizontalarray .jsavindex-na:not(:last-of-type) {
  border-right: none;
}
.jsavhorizontalarray .jsavindexlabel {
  bottom: -25px;
  left: 0;
  line-height: 40px;
  font-size: 15px;
  color: var(--jsavindexlabel-color);
  font-family: "Kirang Haerang", system-ui;

}
.jsavhorizontalarray .jsavindex-na:first-of-type {
  -ms-border-top-left-radius: 8px;
  -ms-border-bottom-left-radius: 8px;
  -moz-border-top-left-radius: 8px;
  -moz-border-bottom-left-radius: 8px;
  -o-border-top-left-radius: 8px;
  -o-border-bottom-left-radius: 8px;
  -webkit-border-top-left-radius: 8px;
  -webkit-border-bottom-left-radius: 8px;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.jsavhorizontalarray .jsavindex-na:last-of-type {
  -ms-border-top-right-radius: 8px;
  -ms-border-bottom-right-radius: 8px;
  -moz-border-top-right-radius: 8px;
  -moz-border-bottom-right-radius: 8px;
  -o-border-top-right-radius: 8px;
  -o-border-bottom-right-radius: 8px;
  -webkit-border-top-right-radius: 8px;
  -webkit-border-bottom-right-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.jsavarray {
  display: flex;
  justify-content: center;
  position: relative !important;
  left: 0 !important;
  gap: 5px;
  width: auto !important;
}

.jsavarray.queue {
  gap: 1px;
}
.jsavarray.queue li {
  border-top: 3px solid;
  border-bottom: 3px solid;
  border-right: 0;
  border-left: 0;
  border-radius: 0!important;
  margin: 0 0.5rem;
}
.jsavarray.queue li:first-child::before {
  content: ' ';
  
}

.jsavarray.character-cells, .jsavarray.string {
  margin-bottom: 0;
  margin-top: 0;
}
.jsavarray.string .jsavnode {
  min-height: 40px;
  height: 40px;
  min-width: 30px !important;
  max-width: 30px !important;
  border: 0;
  border-radius: 0;
  padding: 0 5px;
}

.jsavarray.string .jsavindex .jsavvaluelabel {
  line-height: 40px;
  font-size: 20px;
  font-family: monospace;
  font-weight: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jsavmap, .jsavmap .keyvalues {
  display: flex;
  align-items: center;
}
.jsavmap .keyvalues {
  gap: 0.5rem;
}
.jsavmap .keyvalues:before {
  content: '{';
}
.jsavmap .keyvalues:after {
  content: '}';
}
.jsavmap .label {
  padding: 0 1rem;
}
.jsavmap .keyvalue {
  display: flex;
  border-bottom: 3px solid var(--jsavnode-border-color);
  gap: 0rem;
  align-items: center;
  position:relative;
}
.keyvalue:not(:last-child):after {
  content: ',';
  width: 0.5rem;
  position: absolute;
  right: 0;
  bottom: 0;
}
.jsavmap .key:after {
  content: ':';
}
.jsavmap .value {
  color: var(--bg-opposite);
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 400;
}

@media only screen and (max-width: 600px) {
  .jsavarray {
    max-width: 90%;
    margin: 1em auto;
    padding-bottom: 50px;
  }
}

.jsavbararray {
  height: 150px;
  overflow: visible;
  padding-bottom: 30px;
}
.jsavbararray .jsavnode {
  /* remove shadow from the white bars */
  box-shadow: none;
} 
.jsavbararray .jsavindex {
  height: 100%;
  vertical-align: bottom;
  border: none;
  background-color: #ddd;
  margin-left: 2px;
  float: left;
  position: relative;
}
.jsavbararray .jsavvalue {
  z-index: 100;
  bottom: 0;
  background-color: inherit;
  min-height: 0;
  -moz-border-radius: 0;
  -o-border-radius: 0;
  -ms-border-radius: 0;
  -webkit-border-radius: 0;
  border-radius: 0;
  /* add a subtle shadow to bars */
  box-shadow: 2px 2px 5px rgba(120, 120, 120, 0.5);
}
.jsavbararray .jsavvalue span {
  position: absolute;
  width: inherit;
  bottom: 0;
  left: 0;
}
.jsavbararray .jsavvalue, .jsavbararray .jsavvaluebar {
  display: block;
  padding: 0;
  position: absolute;
  width: 100%;
}
.jsavbararray .jsavvaluebar {
  height: 100%;
  top: 0;
  background-color: #fff;
}
.jsavbararray .jsavindexlabel {
  font-size: 90%;
  position: relative;
  top: 100%;
	vertical-align: middle;
}



/* vertical array */
.jsavarray.jsavverticalarray {
  flex-direction: column;
}
.jsavverticalarray.jsavindexed .jsavindex {
  position: relative;
}
.jsavverticalarray .jsavindex {
  margin-bottom: -1px;
  float: left;
  clear: left;
}
.jsavverticalarray .jsavindexlabel {
  position: absolute;
  text-align: right;
  width: auto;
  left: -17px;
}
.jsavverticalarray .jsavindex:first-of-type, .jsavverticalarray .jsavindex:first-of-type .jsavvalue {
  -ms-border-top-left-radius: 8px;
  -moz-border-top-left-radius: 8px;
  -o-border-top-left-radius: 8px;
  -webkit-border-top-left-radius: 8px;
  border-top-left-radius: 8px;
  -ms-border-top-right-radius: 8px;
  -moz-border-top-right-radius: 8px;
  -o-border-top-right-radius: 8px;
  -webkit-border-top-right-radius: 8px;
  border-top-right-radius: 8px;
}
.jsavverticalarray .jsavindex:last-of-type, .jsavverticalarray .jsavindex:last-of-type .jsavvalue {
  -ms-border-bottom-left-radius: 8px;
  -moz-border-bottom-left-radius: 8px;
  -o-border-bottom-left-radius: 8px;
  -webkit-border-bottom-left-radius: 8px;
  border-bottom-left-radius: 8px;
  -ms-border-bottom-right-radius: 8px;
  -moz-border-bottom-right-radius: 8px;
  -o-border-bottom-right-radius: 8px;
  -webkit-border-bottom-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* bar array marker line */
.jsavmark {
  position: absolute;
  display: none;
  background-color: #FF6464;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
  border-radius: 10px;
  width: 8px;
  height: 8px;
  z-index: 190;
}
.jsavmarkline {
  position: absolute;
  display: none;
  height:1px;
  background-color: #FF6464;
  background-color: rgba(255, 100, 100, 0.6);
  z-index: 190;
}

/***** END STYLING OF THE ARRAY DATA STRUCTURE *****/

/*** OUTPUT STYLING ***/
.jsavoutputcontainer {
  background: var(--jsav-output-bg);
  padding: 1rem 0 1rem 0.5rem;
  min-width: 50%;
  max-width: 100%;
  min-height: 150px;
  max-height: 25vh;
  overflow: auto;
  flex: 1;
  scroll-behavior: smooth;
  font-size: smaller;
  margin-top: 2rem;
}
.jsavoutputcontainer:before,
.jsavcode:before {
  content: 'Step by Step Description';
  display: block;
  font-family: 'Nunito';
  font-size: small;
  font-weight: 600;
  background: var(--bg-deep);
  padding: 5px 15px;
  width: 100%;
  margin: 0;
  position: absolute;
  margin-left: -0.5rem;
  margin-top: -2.5rem;
  border: 1px solid var(--accent-color);
  border-top: 0;
  border-left: 0;
}
.jsavcode:before {
  content: 'Pseudocode';
  margin-left: 0rem;
  margin-top: -2rem;
}
.jsavline {
  overflow: visible;
  border: none;
  margin: 0;
  font-family: "Nunito", sans-serif;
  line-height: 33px;
  color: var(--text-color) !important;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.jsavscroll {
  overflow: auto; 
  background-color: white; 
  border: 1px solid black;
  height:220px;
}
.jsavoutput .jsavtitle {
  display:block;
  margin-top:2.5em;
  font-size:300%;
}

.jsavindex.jsavarrow:before {
  content: "";
  background-color: transparent;
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top: 6px solid black;
  top: -10px;
  left: 17px;
}

/**** END OUTPUT STYLING ***/

.jsavcanvas svg {
  position: absolute;
  height: 100%;
  width: 100%;
  z-index: 110;
}

.jsavcontainer svg {
  pointer-events: none;
}
.jsavcontainer svg * {
  pointer-events: visible;
}

/**** STYLING THE CONTROLS ****/
.jsavcontrols-wrapper {
  display: flex;
}
#playerSettingsButton, .jsavcontainer .empty, #fullscreenButton {
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease, color 0.3s ease;
}
.jsavcontainer .empty {
  cursor: default;
}
#playerSettingsButton:hover {
  transform: rotate(60deg);
}
#fullscreenButton:hover {
  transform: scale(1.2);
}
#playerSettingsButton:hover svg path,
#fullscreenButton:hover svg path {
  fill: var(--accent-color);
}
.jsavcontrols {
  position: relative;
  text-align: center;
  display: flex;
  margin: 0 auto;
  width: fit-content;
  gap: 15px;
  align-items: center;
  padding: 1rem 1rem 0;
  background: var(--bg-course-bar);
  border-radius: 2rem 2rem 0 0;
}

.jsavcontrols .column{
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.jsavcontrols span.text {
  font-size: 12px;
  color: var(--text-lighter);
  font-weight: 600;
  height: 17px;
}
.jsavcontrols .column.jsavend svg {
  transform: rotate(180deg);
}
.jsavcontrols svg,
.jsavcontrols .column.jsavend svg path {
  fill: var(--text-color);
}
#playerSettingsButton svg path,
#fullscreenButton svg path {
  fill: var(--text-color-lighter);
}
.jsavcontrols span.circular-button {
  display: inline-block;
  font-size: 25px;
  line-height: 45px;
  width: 45px;
  height: 45px;
  background-color: var(--bg-secondary);
  box-shadow: 0 0 4px #88888888;
  -o-border-radius: 50%;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  -ms-border-radius: 50%;
  border-radius: 50%;
}
.jsavcontrols span:after {
  display: block;
  color: #998eff;
  font-size: 14px;
}
.jsavplaying span {
  cursor: default;
}
#stepSliderWrapper {
  padding: 0 calc(2rem + 10px);
}
#stepSlider {
  width: -webkit-fill-available;
  display: block;
  text-align: center;
  position: relative;
  border-radius: 0 0 1rem 1rem;
  margin-top: -9px;
  border: 5px solid var(--player-border-color);
  box-shadow: 0 4px 8px -4px var(--accent-color);
}
input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--accent-color);
}
input[type="range"] {
  touch-action: none;
  -webkit-appearance: none; 
  width: 100%;
  height: 8px; 
  background: var(--bg-secondary);
  border-radius: 4px;
  outline: none; 
  margin: 0;
  transition: all 0.3s ease;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -2px;
  width: 25px;
  height: 25px;
  background: var(--accent-color);
  border: 2px solid var(--accent-color-dark);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
input[type="range"]::-webkit-slider-thumb:hover {
  background: #ff7043;
  transform: scale(1.2);
}
input[type="range"]::-moz-range-track {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #ff5722;
  border: 2px solid #bf360c;
  border-radius: 50%;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb:hover {
  background: #ff7043;
  transform: scale(1.2);
}

/* IE thumb */
input[type="range"]::-ms-thumb {
  width: 20px;
  height: 20px;
  background: #ff5722;
  border: 2px solid #bf360c;
  border-radius: 50%;
  cursor: pointer;
}
/**** END STYLING THE CONTROLS ****/


/********* TREE / GRAPH DATA STRUCTURE *******/

.jsavtree {
  margin-bottom: 3em;
}
.jsavtree, .jsavgraph, .jsavlist {
  position: relative!important;
  background-color: inherit;
}
.jsavtreenode, .jsavgraphnode {
  border-radius: 50%;
  position: absolute;
}
.jsavtree svg path, .jsavgraph svg path {
  stroke: var(--jsav-node-edge-color);
  stroke-width: 10px;
}
.jsavnullnode {
  min-width: 20px;
  border-color: #eee;
  opacity: 0;
}
.jsavnulledge {
  stroke: transparent!important;
  opacity: 0!important;
}

.jsavedgelabel {
  background-color: inherit;
  z-index: 700;
  position: absolute;
  display: inline-block;
  margin: 0;
}

/******** LINKED LIST STRUCTURE ******/
.jsavpointerarea {
  background-color: #eee;
  display: block;
}
.jsavhorizontallist .jsavpointerarea {
  border-left: 1px solid black;
  position: absolute;
  right: 0;
  top: 0;
  width: 10px;
  height: 100%;
}
.jsavhorizontallist .jsavpointerarea.leftpointerarea {
  border-right: 1px solid black;
  border-left: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 100%;
}


.jsavverticallist .jsavpointerarea {
  border-top: 1px solid black;
  bottom: 0;
  height: 10px;
  position: absolute;
  width: 100%;
}

.jsavverticallist .jsavpointerarea.leftpointerarea {
  border-bottom: 1px solid black;
  position: absolute;
  top: 0;
  height: 10px;
  width: 100%;
}

.jsavhorizontallist.jsavautoresize .jsavnode {
  min-width: 60px;
  height: 60px;
  padding-right: 12px;
}
.jsavhorizontallist.jsavautoresize .jsavnode.jsavlistnode {
  min-width: 40px;
  height: 40px;
  padding-right: 12px;
}
.jsavhorizontallist.jsavautoresize.dll .jsavnode.jsavlistnode {
  padding-left: 12px;
}
.jsavverticallist.jsavautoresize .jsavnode {
  min-width: 45px;
  min-height: 33px;
}

.jsavlist {
  margin-top: 0.5rem;
  margin-bottom: 0;
  align-items: center;
  left: 0;
  align-self: start;
  margin-left: 2rem;
}
.example .jsavlist {
  margin-left: 0;
}
.jsavlist svg {
  left: 5px;
}
.jsavlist .jsavnode {
  height: 40px;
  min-height: 40px;
  /*width: 40px;  mmm*/
  width: fit-content;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jsavlist .jsavvalue,
.jsavlist .jsavvaluelabel {
  height: 35px;
  font-size: 22px;
  min-height: 30px;
  min-width: 30px;
  line-height: 35px;
  display: flex;
  justify-content: center;
}

.jsavlistnode {
  position: absolute;
  border-radius: 3px;
}
.jsavverticallist .jsavlistnode .jsavpointerarea {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}
.jsavhorizontallist .jsavlistnode .jsavpointerarea {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}
.jsavhorizontallist .jsavlistnode .jsavpointerarea.leftpointerarea {
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}
.jsavhorizontallist.jsavlist.dll .jsavnode:first-of-type .leftpointerarea,
.jsavhorizontallist .jsavnonext .jsavpointerarea {
    background-color: #000;
}
.jsavhorizontallist .jsavnonext .jsavpointerarea.leftpointerarea {
    background-color: #eee;
}
.jsavlist .jsavedge {
  stroke-width: 2;
  stroke: var(--text-color);
  marker-end: url(#custom-arrow-end);
}
.jsavlist.dll .jsavedge {
  marker-start: url(#custom-arrow-start);
}
.jsavlist.start {
  position: relative;
  left: 0 !important;
  margin-left: 1rem;
  margin-right: 0;
  width: fit-content !important;
}

/******** PSEUDOCODE VIEW *******/
#pseudocodecontainer,
.pseudocodecontainer {
  max-height: 25vh;
  overflow: auto;
  flex: 0 0 auto;
  margin-top: 1rem;
  background: var(--jsavcode-bg);
}
.jsavcode {
  font-family: monospace;
  font-size: 15px;
  margin: 0;
  width: 100% !important;
}
ol.jsavcode {
  list-style: none;      
  counter-reset: li;     
  padding-left: 0;  
}

ol.jsavcode li {
  text-align: left;
  margin: 0;
}

ol.jsavcode li::before {
  counter-increment: li; 
  content: counter(li) ". ";
  display: inline-block; 
  width: 2em; 
  text-align: right; 
  color: #aaa; 
  margin-right: 0.5em; 
}
ol.jsavcode:after {
  content: 'ⓘ Sometimes the pseudo code is expanded in steps or made concise for understandability or explanation purposes. The actual code may be precise for a given programming language.';
  color: var(--jsavcode-after-color);
  font-size: 13px;
  display: block;
  padding: 1em;
  background: var(--jsavcode-after-bg);
  margin-top: 1em;
  display:none;
}
ul.jsavcode {
  list-style: none;
  padding: 0;
}
.jsavcodeline {
  padding: 2px 10px;
  white-space: pre;
  font-size: smaller;
}
.jsavcodeline.jsavpreviousline {
  /*background-color: var(--jsavpreviousline-bg);*/
}
@keyframes highlightGlowDark {
  0% {
    background-color: rgba(0, 240, 255, 0.1);
  }
  50% {
    background-color: rgba(0, 240, 255, 0.3);
  }
  100% {
    background-color: rgba(0, 240, 255, 0.1);
  }
}
@keyframes highlightGlowLight {
  0% {
    background-color: rgba(147, 156, 255, 0.1);
  }
  50% {
    background-color: rgba(147, 181, 255, 0.5);
  }
  100% {
    background-color: rgba(147, 156, 255, 0.1);
  }
}
.jsavcodeline.jsavcurrentline {
  animation: var(--highlight-glow) 1.5s ease-in-out infinite;
}
.jsavcodeline.jsavhighlight {
  background-color: yellow;
}
.jsavhiddencode {
  display: none !important;
}

@media only screen and (max-width: 600px) {
  .jsavcode {
    max-width: 90%;
  }
}

/******** POINTER STRUCTURE ****/
.jsavpointer .jsavpointerarea {
  border: 1px solid black;
  height: 10px;
  width: 10px;
  margin: 0 auto;
  position: relative;
}
.jsavnullpointer .jsavpointerarea:after {
  content: "";
  display: block;
  width: 14px; /* sqrt(width^2+height^2) */
  height: 1px;
  position: absolute;
  right: 0;
  top: 0;
  background-color: red;
  -webkit-transform: rotate(-45deg);
  -webkit-transform-origin: right top;
  -ms-transform: rotate(-45deg);
  -ms-transform-origin: right top;
  -o-transform: rotate(-45deg);
  -o-transform-origin: right top;
  -moz-transform: rotate(-45deg);
  -moz-transform-origin: right top;
  transform: rotate(-45deg);
  transform-origin: right top;
}
.jsavpointer .jsavlabel {
  margin-top: 0;
  margin-bottom: 0;
  font-family: ui-monospace, monospace;
  color: var(--jsavpointer-color);
  background: var(--jsavpointer-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 400;
  font-size: medium;
}

.jsavpointer.messagepointer.center {
transform: translateX(-50%);
}
.jsavpointer.messagepointer {
  z-index: 999;
  cursor: move;
  overflow: hidden;
  /*border-radius: 2rem;*/
}
.jsavpointer.messagepointer .jsavlabel {
  font-family: 'Nunito';
  color: var(--bg-opposite);
  background: var(--message-pointer-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 0.5rem 1.5rem;
  /*border-radius: 2rem;*/
  font-weight: 400;
  margin: 0!important;
}
.jsavpointer.messagepointer .jsavlabel::before {
  content: "";
  position: absolute;
  top: calc(-5000% - 100px);
  left: calc(-5000% - 100px);
  width: 10000%;
  height: 10000%;
  background: var(--conic-gradient-1);
  z-index: -1;
  /*border-radius: 2rem;*/
  animation: rotateBorder 10s linear infinite;
}

.jsavpointer.messagepointer .jsavlabel::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  background-color: var(--message-pointer-bg);
  /*border-radius: 2rem;*/
  z-index: -1;
}
.jsavpointer .jsavlabel::before {
  content: '↑';
  font-size: 2rem;
  position: absolute;
  top: -2rem;
  left: 50%;
  opacity: 0.5;
  transform: translateX(-50%);
  color: var(--jsavindexlabel-color);
}
.jsavpointer.noarrow .jsavlabel::before,
.jsavpointer.messagepointer .jsavlabel::before {
  content: '';
}
.jsavpointer.pointer-i .jsavlabel {
  color: var(--bg-color);
  background: var(--pointer-i-bg);
}
.jsavpointer.pointer-j .jsavlabel {
  color: var(--bg-color);
  background: var(--pointer-j-bg);
}
.jsavlabel.thin {
  margin: 0;
  font-family: 'Nunito', system-ui;
}
.jsavlabel.value {
  font-weight: 700;
  font-size: 30px;
  font-family: monospace;
  margin-top: 0;
  margin-bottom : 0.5rem;
  color: var(--array-item-bg);
}
.jsavlabel.value.smaller {
  font-weight: 700;
  font-size: 20px;
  font-family: monospace;
  margin-top: 0;
  margin-bottom : 0.5rem;
}

/******** MATRIX DATA STRUCTURE ****/
.jsavmatrix .jsavarray {
  margin: 0 auto;
  height: 31px!important;
  min-height: 30px;
  gap: 0;
  display: flex !important;
}
.jsavmatrix .jsavarray.thin {
  margin-top: 6px;
}
.jsavmatrix .jsavarray li.jsavnode {
  border-radius: 0;
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.jsavmatrix .jsavarray.jsavautoresize li.jsavnode {
  min-height: 30px;
  min-width: 30px;
  height: auto;
  width: auto;
  border: 1px solid;
}
.jsavmatrix .jsavarray.jsavautoresize li.jsavnode.arraylabel {
  border-right: 0;
  border-bottom: 0;
}
.jsavmatrix .jsavarray li.arraylabel .jsavvaluelabel {
  font-weight: 400;
}
.jsavmatrix .jsavarray .jsavvalue {
  height: 30px;
}
.jsavmatrix .jsavarray:first-child li {
  border-top: 1px solid black;
}

.jsavmatrix.jsavmatrixplain .jsavarray li.jsavnode, 
.jsavmatrix.jsavmatrixmatrix .jsavarray li.jsavnode {
  border: none;
  box-shadow: none;
}
.jsavmatrix.jsavmatrixmatrix {
  border-left: 1px solid black;
  border-right: 1px solid black;
  border-radius: 10px;
  padding: 10px;
}
.jsavmatrix .jsavnode,
.jsavmatrix .jsavnode .jsavvaluelabel {
  color: var(--text-color);
  text-shadow: none;
}
.jsavmatrix .jsavnode.highlight {
  background: var(--highlight-bg-pseudo);
}
.jsavmatrix .jsavnode.highlight-red {
  background: var(--highlight-red-bg-pseudo);
}
.jsavmatrix .jsavnode.highlight-blue {
  background: var(--highlight-blue-bg-pseudo);
}
.jsavmatrix .jsavnode.highlight-green {
  background: var(--highlight-green-bg-pseudo);
}
.jsavmatrix ol[data-heading]:first-of-type::before {
  content: attr(data-heading);
  display: block;
  position: absolute;
  top: -1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text-color);
  font-size: 14px;
}

.jsavmatrix .jsavarray li.jsavnode.highlight-blue.blink {
  animation: blinkBlueBackground 0.5s step-start infinite !important;
}

@keyframes blinkBlueBackground {
  0%, 100% {
    background: var(--highlight-blue-bg-pseudo);
  }
  50% {
    background: transparent;
  }
}

.jsavmatrix .jsavarray li.jsavnode.highlight-green.blink {
  animation: blinkGreenBackground 0.5s step-start infinite !important;
}

@keyframes blinkGreenBackground {
  0%, 100% {
    background: var(--highlight-green-bg-pseudo);
  }
  50% {
    background: transparent;
  }
}

.jsavmatrix .jsavarray li.jsavnode.highlight-red.blink {
  animation: blinkRedBackground 0.5s step-start infinite !important;
}

@keyframes blinkRedBackground {
  0%, 100% {
    background: var(--highlight-red-bg-pseudo);
  }
  50% {
    background: transparent;
  }
}

.example .jsavmatrix {
  margin: 0.5rem 1rem 0.5rem 0;
}

.example .jsavcanvas .jsavmatrix .jsavarray:first-of-type {
  margin-top: 0;
}

.example .jsavcanvas .jsavmatrix .jsavarray[data-heading]:first-of-type {
  margin-top: 1rem;
}


/******** Event prevention DIV shutter ******/
.jsavshutter {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
}
.jsavplaying .jsavshutter {
  display: block;
  /* prevent text selection when playing */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/******** KEY-VALUE PAIR DATA STRUCTURE ****/
.jsav-pair-section {
  display: flex;
  margin-top: 5px;
}

.jsav-pair {
  min-width: 70%;
  position: relative;
  display: inline-block;
  text-align: center;
  margin: 0 auto;
  list-style: none;
  border: 2px solid black;
  font-size: 1.1em;
  font-family: monospace;
  box-shadow: 2px 2px 5px rgba(120, 120, 120, 0.5);
}

.jsav-pair.jsav-pair-highlight {
  background-color: green;
}

.jsav-pair-key,
.jsav-pair-values {
  line-height: 40px;
  display: inline-block;
  box-sizing: border-box;
}

.jsav-pair-key {
  width: 40%;
  float: left;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
}

.jsav-pair-key.jsav-pair-key-highlight {
  background-color: cornflowerblue;
}

.jsav-pair-values {
  width: 60%;
  float: right;
  border-left: 2px solid black;
}

.jsav-pair-values.jsav-pair-values-highlight {
  background-color: yellow;
}

.jsav-pair:hover {
  background-color: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.idContainer {
  width: 100px;
  height: 44px;
  color: black;
  display: inline-block;
  text-align: center;
  margin: 0 auto;
  box-sizing: border-box;
  border: 2px solid black;
}

/** Array Label **/
.arraylabel, .jsavautoresize {
  border: 0;
  color: var(--jsavnode-color);
  box-shadow: none;
}
.jsavnode.arraylabel {
  border: 0;
  background: var(--bg-color);
  color: var(--bg-opposite);
  box-shadow: none;
}
.arraylabel.highlight-red {
  background: var(--highlight-red-bg)!important;
  color: var(--jsavnode-color)!important;
}
.arraylabel.highlight-green {
  background: var(--highlight-green-bg)!important;
  color: var(--jsavnode-color)!important;
}
.arraylabel.highlight-blue {
  background: var(--highlight-blue-bg)!important;
  color: var(--jsavnode-color)!important;
}
.arraylabel span.jsavvaluelabel{
  font-size: 18px;
  font-family: 'Nunito';
  font-weight: 600;
  width: fit-content;
  text-shadow: none;
}

.arraylabelwithoutrotation, .jsavautoresize .jsavnode.arraylabel {
  border: 0;
  background: initial;
  box-shadow: none;
  /*padding-right: 1em;*/
  padding-right: 0;
}
.arraylabelwithoutrotation span.jsavvaluelabel{
  font-size: 14px;
  font-family: monospace;
    font-weight: 600;
    width: 100px;
}

.jsavcontrols .circular-button {
  transition: all 0.2s ease-in-out;
  border: 1px solid var(--accent-color);
}
.jsavcontrols .column:hover span.circular-button {
  background: radial-gradient(circle at 30% 30%, #f66c02, #c33a0b);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7),
              inset 0 3px 6px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: #fff;
}
.jsavforward .circular-button {
  background: radial-gradient(circle at 30% 30%, #f66c02, #c33a0b);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.15);
  color: #fff!important;
}
.jsavnode {
  font-size: 30px;
  transition-: all 0.2s ease;
}
.jsavnode:hover {
  animation: wiggle 0.4s ease-in-out infinite;
}

.jsavautoresize .jsavnode {
  min-width: 60px;
  height: 60px;
  z-index: 110;
  font-weight: 600;
}

.jsavbinarynode.no-left::before,
.jsavbinarynode.no-right::after {
  content: "null";
  font-size: 10px;
  font-weight: 600;
  line-height: 25px;
  position: absolute;
  text-align: center;
  width: 25px;
  height: 25px;
  background-color: var(--jsav-null-node-bg);
  border-radius: 50%;
  border: 1px solid;
  top: 28px; /* distance below the node */
}

.example .jsavbinarynode.no-left::before,
.example .jsavbinarynode.no-right::after {
  display: none;
}

.jsavbinarynode.no-left.highlight-left-null::before {
  background-color: var(--highlight-bg);
  border-color: var(--highlight-border-color);
}

.jsavbinarynode.no-right.highlight-right-null::after {
  background-color: var(--highlight-bg);
  border-color: var(--highlight-border-color);
}

.jsavbinarynode.no-left::before {
  left: -17px; /* position to the left */
}

.jsavbinarynode.no-right::after {
  right: -17px; /* position to the right */
}

.set-element {
  border-radius: 50%;
}
.jsavarray.set li:first-child:before {
  content: '{';
  width: 1rem;
  display: block;
  position: absolute;
  left: -1rem;
  font-size: 40px;
  font-family: math, cursive, serif;
}
.jsavarray.set li:last-child:after {
  content: '}';
  width: 1rem;
  display: block;
  position: absolute;
  right: -1rem;
  font-size: 40px;
  font-family: math, cursive, serif;
}

.jsavarray.map-element {
  margin-top: 0!important;
  margin-bottom: 2px!important;
  gap: 0;
  border-bottom: 1px solid;
}

.jsavarray.map-element .jsavnode {
  height: 40px;
  min-height: 40px;
  border: none;
}

.jsavarray.map-element .jsavindex span {
  line-height: 40px;
}

.jsavarray.map-element .jsavvaluelabel {
  vertical-align: top;
}

/*** TRIE */
.jsavtree[data-class=trie] {
  margin-bottom: 1rem;
}
.jsavtree[data-class=trie] .jsavnode {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
}
.jsavtree[data-class=trie] .jsavvalue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  width: 35px;
  min-width: 35px;
  height: 30px;
  min-height: 30px;
}
.jsavtree[data-class=trie] .jsavvaluelabel {
  line-height: 20px;
  font-size: 20px;
}
.jsavtree[data-class=trie] svg path {
  stroke: var(--text-color);
  stroke-width: 3px;
}

.jsavgraph {
  margin: 0rem;
}
.jsavtree .jsavnode,
.jsavgraph .jsavnode {
  width: 35px;
  min-width: 35px!important;
  height: 35px!important;
  min-height: 35px!important;
}
.jsavtree.element-is-array .jsavnode,
.jsavgraph.element-is-array .jsavnode {
  width: auto;
  border-radius: 0.5rem;
}
.jsavtree .jsavvalue,
.jsavgraph .jsavvalue {
  display: flex;
  align-items: center;
  justify-content: center;
}
.jsavtree .jsavvaluelabel,
.jsavgraph .jsavvaluelabel {
  line-height: 20px;
  font-size: 20px;
}
.jsavtree svg path,
.jsavgraph svg path {
  stroke: var(--text-color);
  stroke-width: 3px;
}

.jsavarray.thin {
  margin-top: 0.5rem;
  margin-bottom: 0;
  align-items: center;
}
.jsavarray.thin .jsavnode {
  height: 40px;
  min-height: 40px;
  /*width: 40px;  mmm*/
  width: fit-content;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jsavarray.thin .jsavvalue,
.jsavarray.thin .jsavvaluelabel {
  height: 35px;
  font-size: 22px;
  min-height: 30px;
  min-width: 30px;
  line-height: 35px;
  display: flex;
  justify-content: center;
}
.jsavarray.ultra .jsavnode {
  height: 35px;
  min-height: 35px;
}
.jsavarray.ultra.thin .jsavvalue,
.jsavarray.ultra.thin .jsavvaluelabel {
  height: 30px;
  font-size: 18px;
  min-height: 30px;
  min-width: fit-content;
  line-height: 30px;
}
.jsavarray.start {
  margin-left: 1rem;
  margin-right: 0;
  width: fit-content !important;
  align-self: start;
}
.jsavlabel.start {
  margin-left: 0.5rem;
  margin-right: 0;
  width: fit-content !important;
  align-self: start;
}
.jsavarray.center {
  margin-left: 0.5rem;
  margin-right: 0;
  width: fit-content !important;
  align-self: center;
}
.jsavarray.label::before {
  position: relative;
  content: attr(data-label);
  display: flex;
  align-items: center;
  font-family: 'Nunito', system-ui;
  font-size: 20px;
  font-weight: 600;
  padding: 0 1rem;
  color: var(--jsavlabel-color);
}
.jsavarray.heading {
  padding-top: 1rem;
}
.jsavlist.heading {
  padding-top: 1rem;
}
.jsavarray.string.heading {
  padding-top: 2rem;
}
.jsavarray.heading::before,
.jsavlist[data-heading]::before {
  position: absolute;
  content: attr(data-heading);
  font-family: 'Nunito', system-ui;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-color);
  opacity: 1.0;
  margin-top: -4.5rem;
  left: 0;
  min-width: 200px;
}
.example .jsavarray.heading::before {
  margin-top: -1.5rem;
}
.jsavlist[data-heading]::before {
  margin-top: -1.5rem;
}
.jsavarray.heading.string::before {
  margin-top: -4.5rem;
}
.jsavarray.heading::after {
  display: none;
}
.jsavarray.circular .jsavnode {
  border-radius: 50%;
  max-width: 40px;
}
.jsavarray.circular .jsavnode .jsavvaluelabel {
  padding: 0 0;
}

.jsavgraph.flowchart .start-end-node {
  font-weight: 200;
  font-size: 0.8rem;
}
.jsavgraph.flowchart .start-end-node .jsavvaluelabel {
  font-size: 0.8rem;
}

.jsavgraph.flowchart .statement-node {
  border-radius: 0;
  width: fit-content;
  height: fit-content !important;
  padding: 0.5rem 1rem;
}
.jsavgraph.flowchart .statement-node .jsavvaluelabel {
  width: fit-content;
}

.jsavgraph.flowchart .decision-node {
  border-radius: 0;
  width: 100px;
  height: 100px !important;
  transform: rotate(45deg);
  display: flex;
}
.jsavgraph.flowchart .decision-node .jsavvaluelabel {
  transform: rotate(-45deg);
}

.jsavgraph.flowchart .jsavnode.disabled {
  opacity: 0.1;
}

.jsavcanvas .jsavarray:first-of-type {
  margin-top: 1rem;
}
#visualization .jsavcanvas .jsavlist:first-of-type {
  margin-top: 2rem;
}

.example .jsavcanvas>.jsavarray {
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  height: fit-content !important;
}
.example .jsavarray.thin .jsavnode {
  min-width: fit-content;
  padding: 0 0.1rem;
}
.jsavnode.window {
  box-shadow: 0px 0px 0 5px rgba(250, 120, 120);
  border-radius: 0;
}