:root {
  --dark-theme-white: rgb(200, 200, 200);
  --dark-theme-gray: #444;
  --dark-theme-black: #1c1c1c;
}

body {
  padding: 20px;
}

button {
  font-family: monospace;
  font-size: 20px;
  background: white;
  padding: 10px 20px 10px 20px;
  border: 2px solid;
  -webkit-border-radius: 28px;
  -moz-border-radius: 28px;
  border-radius: 28px;
  color: #444444;
  border-color: #444444;
}

button:hover {
  background: #C9F0F2;
}

button:disabled {
  color: #cccccc;
  border-color: #cccccc;
}

button:disabled:hover {
  background: white;
}

.btn-active {
  background: #5CBDED;
}

#resetbuttons {
  position: absolute;
  top: 60px;
}

.button-div {
  margin-bottom: 10px;
}

#snakeviz-text {
  position: absolute;
  top: -20px;
}

#snakeviz-text > a {
  color: #cccccc;
  font-family: monospace;
  text-decoration: none;
}

.sv-footer {
  text-align: right;
}

.footer-link {
  color: #cccccc;
  font-family: monospace;
}

select {
  font-family: monospace;
  font-size: 20px;
  background: white;
  padding: 5px 10px 5px 10px;
}

#sv-style-label {
  font-family: monospace;
  position: absolute;
  top: 180px;
}

#sv-depth-label {
  font-family: monospace;
  position: absolute;
  top: 220px;
}

#sv-cutoff-label {
  font-family: monospace;
  position: absolute;
  top: 260px;
}

#sv-info-div {
  position: absolute;
  top: 300px;
  display: none;
  overflow: hidden;
}

.sv-info-label {
  font-weight: bold;
}

.sv-info-item {
  font-family: monospace;
  word-wrap: break-word;
}

#sv-call-stack {
  position: absolute;
  right: 0;
  padding-right: 10px;
  font-family: monospace;
  text-align: right;
}

#sv-call-stack-list {
  text-align: left;
  overflow-y: scroll;
  border: 2px solid gray;
  background-color: white;
  margin-top: 5px;
  display: none;
}

#sv-call-stack-list div {
  cursor: pointer;
  padding: 0 10px 0 10px;
}

#sv-call-stack-list div:hover {
  background-color: #C9F0F2;
}

#sv-call-stack-list div span {
  display: table-cell;
}

#sv-error-div {
  position: absolute;
  display: none;
}

.sv-error-msg {
  color: #ecf0f1;
  background: #e74c3c;
  border: 3px solid #95a5a6;
  border-radius: 28px;
  -webkit-border-radius: 28px;
  -moz-border-radius: 28px;
  padding: 10px;
}

.sv-error-msg a {
  text-decoration: none;
  color: #C9F0F2;
}

.sv-error-msg a:hover {
  text-decoration: underline;
  color: #5CBDED;
}

.sv-error-msg p {
  padding: 0 20px 0 20px;
}

.sv-error-close {
  background: #c0392b;
  text-align: center;
  padding: 4px;
  margin: 0 20px 20px 20px;
  border-radius: 10px;
}

.sv-error-close:hover {
  background: #a52112;
}

.data-table-hover {
  background: #C9F0F2;
}

/* Spinner CSS from http://tobiasahlin.com/spinkit/ */
.spinner {
  display: inline-block;
  width: 100px;
  text-align: center;
}

.spinner > div {
  width: 18px;
  height: 18px;
  background-color: #333;

  border-radius: 100%;
  display: inline-block;
  -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
  animation: bouncedelay 1.4s infinite ease-in-out;
  /* Prevent first frame from flickering when animation starts */
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

.spinner .bounce1 {
  -webkit-animation-delay: -0.32s;
  animation-delay: -0.32s;
}

.spinner .bounce2 {
  -webkit-animation-delay: -0.16s;
  animation-delay: -0.16s;
}

@-webkit-keyframes bouncedelay {
  0%, 80%, 100% { -webkit-transform: scale(0.0) }
  40% { -webkit-transform: scale(1.0) }
}

@keyframes bouncedelay {
  0%, 80%, 100% {
    transform: scale(0.0);
    -webkit-transform: scale(0.0);
  } 40% {
    transform: scale(1.0);
    -webkit-transform: scale(1.0);
  }
}

.dir-listing {
  margin-top: 20px;
}

g#container rect, g#container path {
  stroke: #fff;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--dark-theme-black);
    color: var(--dark-theme-white);
  }

  g#container rect, g#container path {
    stroke: var(--dark-theme-black);
  }

  #sv-call-stack-list {
    background: var(--dark-theme-gray);
  }

  #sv-style-select, #sv-depth-select, #sv-cutoff-select {
    background: var(--dark-theme-gray);
    color: var(--dark-theme-white)
  }

  #sv-style-label {
    color: var(--dark-theme-white)
  }

  button {
    background: var(--dark-theme-gray);
    border-color: var(--dark-theme-white);
    color: var(--dark-theme-white);
  }

  button:hover {
    background: #555;
    cursor: pointer;
  }

  button:disabled {
    color: rgb(110, 110, 110);
    border-color: rgb(110, 110, 110);
  }

  button:disabled:hover {
    background: #555;
    cursor: default;
  }

  #table_div label {
    color: var(--dark-theme-white);
  }

  #table_div input {
    background-color: #666;
    color: var(--dark-theme-white);
  }

  #table_div tr {
    background-color: var(--dark-theme-black);
  }

  #table_div td.data-table-hover {
    background-color: #222;
  }

  #table_div td.sorting_1 {
    background-color: #282828;
  }

  #table_div th.sorting {
    background-color: #333;

  }

  #table_div th.sorting_desc, #table_div th.sorting_asc {
    background-color: var(--dark-theme-gray);

  }

}