
  :root {
  --bg: #111;
  --menuBg: #222224;
  --rulerBg: #242222;
  --red: #de2a2a;

  --inputColorA: #EE6633;
  --treeColor: #EE6633;

  --inputColorB: #5edb16;
  --inputColorC: #3f73ec;
  --inputColorD: #de2a2a;
  --inputColorE: #d0cd28;

 
  --sidebarWidth: 48px;
  --headerHeight: 32px;
  --footerHeight: 32px;
  --settingsWidth: 360px;
  --grey2: #444;
  --grey3: #999;
  --InputfieldBG: #181818;
  --borderColor: #999;
  
  --btnBG: #333;
  --hoverBgColor:#444;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' -25,
  'opsz' 40;
  user-select: none;
}

.footerItem{
  cursor: pointer;
}

.material-symbols-outlined.small {
  font-variation-settings:
  'FILL' 0,
  'wght' 200,
  'GRAD' -25,
  'opsz' 20;
  color: #FFF;
}

.footerItem:hover > .material-symbols-outlined{
  font-variation-settings: 'opsz' 40;
}
.footerItem:active > .material-symbols-outlined{
  
}


*{
  margin:0;
  padding:0;
}

html{
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body{
  background:var(--bg);
  color:#eee;
  margin:0;
  font-size: 12px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'IBM Plex Sans', sans-serif;
}

h1{
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 0.3em;
  color: #FFF;
  font-family: 'Space Mono', monospace;
}

a{
  color:#3366DD;
}
a:hover{
  color:#3399FF;
}

h2{
  font-size:18px;
  margin-bottom: 4px;
  margin-left: 4px;
}


/* MAIN AREA */
#canvasWrapperShell{
  /* grid-row-start: 2;
  grid-column-start: 3;
  position: relative;
  overflow: hidden; */

  width: 100%;
  height:100%;
  position: absolute;
  background-color: #000;
}

#canvasWrapper{
  width: 100%;
  height: 100%;  
}

#canvasContainer{
  cursor: move !important;
}

#header{
  position: absolute;
  top:0;
  left:0;
  height: var(--headerHeight);
  width: 100%;
  /* background-color: var(--menuBg);
  border-bottom: 1px solid var(--borderColor); */
  /* pointer-events: none; */
  display: flex;
  justify-content: space-between;
  align-items:center;
  padding: 0 16px;
  z-index: 200;
}

#sidebar{
  background-color: var(--menuBg);
  border-radius: 4px;
  
  overflow: visible;

  position: absolute;
  top: calc(var(--headerHeight) + 10px);
  left: 10px;
  width: var(--sidebarWidth);
  
  display: flex;
  flex-direction: column;
  padding: 2px 1px;
}

#settingsPanel{
  display: none;
  background-color: var(--menuBg);
  overflow-y: auto;
  overflow-x: hidden;
  position: absolute;
  top: 42px;
  width: var(--settingsWidth);
  left: calc(var(--sidebarWidth) + 10px);
  border-radius: 4px;
  border-top-left-radius: 0;
  padding: 8px;
  max-height: calc(100% - var(--headerHeight) - var(--footerHeight) - 80px);
  resize: horizontal;
  min-width: 256px;
  max-width: calc(100% - 120px);
  z-index: 100;
}

.settingsHeader{
  /* position: sticky;
  height: 40px;
  top:0;
  background-color: var(--menuBg);
  z-index: 110; */
}

#settingsPanel h3{
  font-size:21px; 
  padding: 6px 0 3px 3px;
  font-weight: normal;
  background-color: var(--menuBg);
  letter-spacing: 0.06em;
}



#settingsPanel h5{
  font-size:12px; 
  padding: 6px;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.settingsFooter{
  height:128px;
}

#closeSettingsBtn{
  position: absolute;
  padding:0;
  top: 7px;
  right: -1px;
  cursor: pointer;
  color:#EEE;
  background: none;
  z-index: 1000;
}
#closeSettingsBtn:hover{
  color:#FFF;
}




#footer{
  
  position: absolute;
  bottom:0;
  left:0;
  height: var(--footerHeight);
  width: 100%;

  background-color: var(--menuBg);
  /* border-top: 1px solid var(--borderColor); */

  display: flex;
  justify-content: space-between;
  align-items:center;
}

#footer>div{
  display: flex;
  align-items:center;
  margin: 4px 10px;
}


#zoomPanel{
  position: absolute;
  right: 10px;
  bottom: calc(var(--footerHeight) + 10px);
  background: var(--menuBg);
  padding: 2px;
  border-radius: 4px;
  width: 36px;
}

#zoomPanel>div{
  position: relative;
  padding: 6px 5px 0px 6px;
  margin: 1px;
  border-radius: 4px;
  background-color: #444;
  cursor: pointer;
  /* margin-bottom: 3px; */
}

#zoomLevel{
  position: relative;
  padding: 6px 5px 0px 7px;
  margin: 1px;
  border-radius: 4px;
  color: #EEE;
  background-color: #444;
  background: none;
  font-family: 'IBM Plex Mono', monospace !important;
  vertical-align: middle;
  text-align: center;
  height: 100%;
  font-size: 10px;
  padding: 6px 0 !important;
  margin: 3px 0 !important;
  outline: none;
  border:none;
  width: 100%;
}

#minimap{
  position: absolute;
  left: 10px;
  bottom: calc(var(--footerHeight) + 10px);
  background: var(--menuBg);
  padding: 2px;
  border-radius: 0px;
  width: 128px;
  height: 128px;
  overflow: hidden;
  outline: 1px solid #999;
  /* background-color: rgba(32,32,32, 0.8); */
}

#minimap>div{
  position: absolute;
  top: 0;
  left: 0;
  background-color: #d83939;
  min-width: 3px !important;
  min-height: 3px !important;
}


.headerItem{
  padding: 0 12px;
  position: relative;
  
  height: 23px;
  margin-right:10px;
}

.footerItem{
  padding: 0 12px;
  position: relative;
  border-radius: 2px;
  background-color: var(--grey2);
  /* outline: 1px solid #999; */
  height: 23px;
  margin-right:4px;
}


.tile{
  position: absolute;
  background-color: #111;
  border: 1px solid #000;
  
}

.tile p{
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace !important;
  padding: 2px 4px;
  border-bottom-right-radius: 4px;
  background-color: #000;
}

.tile canvas, .tile img{
  display: block;
  margin: 0;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  position: absolute;
  top:0;
  left:0;
  z-index: 1;
}

.activeTile img{
  display: none;
}

.tileGrid{
  position: absolute;
  top:0;left:0;
  width:100%;
  height:100%;
  display:grid;
  /* grid-template-columns: repeat(8,128px); */
  /* grid-template-rows: repeat(8,128px); */
  grid-auto-flow: row;
  
  z-index: 10;
}

.tileGrid>div{
  border: 2px solid #000;
  cursor:crosshair;
  position: relative;
}

.innerTileScore{
  position: absolute;
  bottom: 0; 
  left: 0;
  font-size: 6px;
  font-family: 'IBM Plex Mono', monospace !important;
  padding: 2px 4px;
  border-top-right-radius: 4px;
  
  background-color: #000;
}

.innerTileScore .r{
  color: var(--inputColorD);
}

.innerTileScore .g{
  color: var(--inputColorB);
}

.activeTile>.tileGrid>div{
  /* border-color: #0F0; */
}

.tempActiveTile>.tileGrid>div{
  border-color: #F00;
}

.tileGrid>.selectedTile{
  /* background-color: rgba(255,0,0, 0.5) !important; */
  border:none;
  outline: 2px dashed #FFF;
  position: relative !important;
  z-index: 1000 !important;
}

#preselector{
  height:48px;
  width: 100%;
}


.Presets{
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto;
  gap: 1px; /* you can use gap instead of grid-gap */
}


.Synthesis{
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 64px auto auto repeat(5,48px)  32px 48px;
  gap: 1px; /* you can use gap instead of grid-gap */
}

.Analysis{
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 64px auto auto 48px 220px 40px;
  gap: 1px; /* you can use gap instead of grid-gap */
}

.Export{
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 64px repeat(6,48px);
  gap: 1px; /* you can use gap instead of grid-gap */
}

.Settings{
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 64px 48px;
  gap: 1px; /* you can use gap instead of grid-gap */
}

.settingsItem>div{
  outline: 1px solid #999; 
  align-items : center;
  /* padding-left: 4px; */
  grid-column: 1 / span 2;
  position:relative;
  min-height: 32px;
}

.settingsItem>div.half{
  grid-column: 1 / span 1;
}
.settingsItem>div.half2{
  grid-column: 2 / span 1;
}

.fieldProps{
  position: absolute;
  right: 0;
  top:-4px;
  display: flex;
  justify-content: space-between;
  align-items:center;
}

.xySelector{
  padding: 2px 4px;
  color: #999;
  font-family: 'IBM Plex Mono', monospace;
  user-select: none;
}

.xySelector>span{
  margin: 0px;
  cursor: pointer;
}

.coordfield{
  font-family: 'Space Mono', monospace;
  text-align: center;
  width: 18px;
  display: inline-block;
  vertical-align: middle;
  font-size: 14px;
  margin-left: 0px;
  /* background: #444; */
  padding: 0px 4px 0 0;
  height: 100%;
}

.coords .footerItem{
  padding: 0 4px;
}

#analysisResult{
  display: flex;
  flex-wrap: nowrap;
  overflow-x: scroll;
}
#analysisResult>div{
  width:128px;
  display: inline-block;
  margin: 8px;
  flex-shrink: 0;
}
#analysisResult>div>img{
  width:100%;
  height:auto;
}







.sideItem {
  position: relative;
  padding: 6px 8px 2px 8px;
  margin: 4px 4px;
  border-radius: 4px;
  background-color: #444;
  cursor: pointer;
}
#closeSettingsBtn{

}

/* /////////////////////////////////////////////// */

/* TOOL TIPS */

.tooltiptext{
  visibility: hidden;
  background-color: var(--menuBg);
  border-radius: 0px;
  padding: 4px 8px;
  font-size: 14px;
  color:#999;
  position: absolute;
  width: max-content;
  pointer-events: none;
  z-index: 5000;
  /* default position */
  top: 0;
  left: 0;
}
*:has(> .tooltiptext):hover .tooltiptext{
  visibility: visible;
}

.sideItem .tooltiptext, #closeSettingsBtn .tooltiptext{
  top: 4px;
  left: calc(1px + 100%);
}

.footerItem .tooltiptext{
  top: -28px;
  left: 0;
}

.headerItem .tooltiptext{
  bottom: -28px;
  right: 0;
}

#settingsPanel .tooltiptext{
  max-width: calc(100% - 15px);
  font-size: 12px;
  /* top: 65px; */
  left: -2px;
  padding: 16px 8px;
  color: #DDD;
}



/* /////////////////////////////////////////////// */




#statusIndicator{
  /* height:27.5px; */
  /* width:27.5px; */
  display: flex;
  justify-content: space-between;
  align-items:center;
  margin: 0 16px 0 0;
  /* margin-top:4px; */
}

#statusIndicator>div{
  width: 10px;
  height:10px;
  border-radius:50%;
  border: 2px inset #666;

}

.indicatorRunning>div{
  background-color:green; 
}

.indicatorPaused>div{
  background-color:orange; 
}

.indicatorError>div{
  background-color:red; 
}



.version{
  font-weight: normal;
  font-size: 11px;
  color: #999;
}

.settingsItem{
  border: 1px solid #999;
  overflow-x: hidden;
}

.settingsItem .field{
  font-size: 11px;
  letter-spacing: 0.5px;
  /* text-decoration: underline; */
  font-weight: bold;
}

.settingsItem select {
  padding: 0 8px;
  border:none;
  border-right: #333 3px solid;
  font-size: 15px;
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--btnBG);
  color:var(--inputColorC);
  outline:none;
  border-radius: 0;
  cursor: pointer;
}
.settingsItem select:hover{
  background-color: var(--hoverBgColor);
} 

.settingsItem input {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  background: none; 
  border: none;
  outline: none;
  padding: 4px;
  width: calc(100% - 8px);
  display: block;
}

.settingsItem input[type=button] {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: normal;
  cursor:pointer;
  height:100%;
  width: 100%;
  text-align: center;
  border-radius: 0;
  background-color: var(--btnBG);
}


.settingsItem textarea{
  resize:vertical;
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  width: calc(100% - 8px);
  border:none;
  outline: none;
  background: none;
  color: #FFF;
  font-family: 'Space Mono', monospace;
  padding: 6px 1px 0px 6px;
  min-height: 26px;
  max-height: 256px;
  overflow: hidden;
}

.aceWrapper{
  resize:vertical;
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  width: calc(100% - 8px);
  border:none;
  outline: none;
  background: none;
  color: #FFF;
  font-family: 'Space Mono', monospace;
  padding: 6px 1px 0px 6px;
  min-height: 26px;
  max-height: 256px;
  overflow: hidden;
}

.aceWrapper div{
  height: 100%;
  background: none;
}


/* .settingsItem textarea::-webkit-resizer {
  /* border: 2px solid black;
  background: red;
  box-shadow: 0 0 5px 5px blue; */
  /* outline: none; */
  /* border:none; */
} */


.Presets select{
  color: var(--inputColorC);
}

.Presets input{
  text-align: left !important;
  color: var(--inputColorC);
  outline: 1px solid #999; 
  background: none !important;
  font-size: 14px !important;
}
.Presets input:hover{
  background-color: var(--grey2)!important;
}

.Synthesis input, .Synthesis textarea{
  color: var(--inputColorA);
}
.Analysis input, .Analysis textarea{
  color: var(--inputColorB);
}

.Export input, .Export textarea{
  color: var(--inputColorD);
}

.Settings input, .Settings textarea {
  color: var(--inputColorE);
}




.settingsItem input[type=button]:hover{
  font-weight: bold;
  background-color: var(--hoverBgColor);
} 




.field{
  color: #999;
  text-align: left;
  font-size: 12px;
  margin-left: 4px;
  margin-bottom: 4px;
  display: block;
}

.settingsItem button{
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 11px;
  padding: 4px;
  /* background: #333; */
  background: none;
  color:#DDD;
  border: none;
  text-align: center;
  cursor:pointer;
  margin: 0 0px 4px 0;
}

.booleanField{
  cursor: pointer;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}

.booleanField.false{
  filter: brightness(85%);
}

.booleanField::selection{
  background: none;
}
.booleanField::-moz-selection{
  background: none;
}

.Synthesis .selected{
  color: var(--inputColorA);
}

#drop_zone{
  background: #222;
  border: 1px dotted #EEE;
  margin: 8px 0;
  padding: 8px;
  vertical-align: middle;
}


/* ===== Scrollbar CSS ===== */
  /* Firefox */
  * {
    scrollbar-width: auto;
    scrollbar-color: var( --btnBG) var( --rulerBg);
  }

  /* Chrome, Edge, and Safari */
  *::-webkit-scrollbar {
    width: 14px;
  }

  *::-webkit-scrollbar-track {
    background: var( --rulerBg);
    /* border: 1px solid #999; */
  }

  *::-webkit-scrollbar-thumb {
    background-color: var( --btnBG);
    /* background-color: none; */
    border-radius: 0px;
    border: 0px solid #999;
  }

  *::-webkit-scrollbar-thumb:hover {
    background-color: var( --hoverBgColor);
  }
  

  *::-webkit-scrollbar-corner {
    background: var( --rulerBg);
    outline: none;
    border: none;
  }


  /* topology View  */
  #topologyView{
    /* position: relative;
    top: -15px;
    left: -4px; */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height:100%;
  }

  #topologyView svg{
    display: block;
    margin: 0 auto;
  }

  .node circle {
    fill: var(--treeColor);
    stroke: var(--treeColor);
    stroke-width: 0px;
  }

  .link {
    fill: none;
    stroke: var(--treeColor);
    stroke-width: 0.5px;
  }
  


  /* Chrome, Safari, Edge, Opera */
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* Firefox */
  input[type=number] {
    -moz-appearance: textfield;
  }


/* MENU */
.icon {
    width:24px;
    height:24px;
    padding: 4px 10px;
    filter: invert(75%);
    cursor:pointer;
}
.icon:hover {
    filter: invert(100%);
}
.icon:active {
    filter: blur(2px) invert(100%);

}



















.hidden{
  display: none;
}


.coords{
  height: 21px;
  /* display: flex;
  align-content: flex-end; */
}

.coords input{
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 14px;
  background: none;
  color:var(--inputColorA);
  border: none;
  text-align: left;
  padding: 0 8px;
  border-radius: 2px;
  outline-width: 0;
  width:auto;
  /* margin-right: 4px;
  margin-left: -4px; */
  vertical-align: middle;
}

#header input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}


@media only screen and (max-width: 600px) {
  #sidebar{
    flex-direction: row;
    width: 100%;
    top: auto;
    left: 0;
    bottom: var(--footerHeight);
    justify-content: center;
  }
  #minimap{
    bottom: calc(var(--footerHeight) + 60px);
  }
  #zoomPanel{
    bottom: calc(var(--footerHeight) + 60px);
  }
  #fullScreenIcon{
    display: none;
  }

  #settingsPanel{
    top:0; 
    left: 0;
    bottom: calc(var(--footerHeight) + 40px);
    max-height: none;
    max-width: none;
    resize: none;
    width: calc(100% - 16px) !important;
    /* padding-top: 40px; */
    
  }

  #header{
    pointer-events: none;
  }
  
  .settingsHeader{
    height: 40px;
  }
  .coords{
    display: none !important;
  }
  .sideItem{
    margin: 3px 2px;
  }
  #footer{
    justify-content: center;
  }
}


  