@charset "UTF-8";

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

.prop {
  font-weight: bold;
}

.null {
  color: #a52a2a;
}

.bool {
  color: blue;
}

.num {
  color: blue;
}

.string {
  color: green;
  white-space: pre-wrap;
}

.collapser {
  position: absolute;
  left: -1em;
  top: -0.2em;
  cursor: pointer;
  transform: rotate(90deg);
  transition: transform 0.2s;
}

.collapser:before {
  content: "▸";
  user-select: none;
}

.collapsible.collapsed {
  height: 1.2em;
  height: 1lh;
  width: 1em;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  margin: 0;
}
.collapsible.collapsed:before {
  content: "…";
  width: 1em;
  margin-left: 0.2em;
}

.collapser.collapsed {
  transform: rotate(0deg);
}

.q {
  display: inline-block;
  width: 0px;
  color: transparent;
}

.quoted .q {
  display: inline;
  width: auto;
  color: inherit;
  font-weight: normal;
}

li {
  position: relative;
}

#error {
  border-bottom: 1px solid rgb(212, 209, 209);
  background-color: rgb(239, 239, 239);
  margin-bottom: 1.5em;
  padding: 1em 0.5em;
}

.errormessage {
  font-family: monospace;
  margin-top: 0.5em;
  color: rgb(167, 5, 5);
}

.errorcolumn {
  background-color: rgb(167, 5, 5);
  color: white;
}

.errorline {
  background-color: rgb(255, 226, 226);
}

#json {
  font-family: monospace;
  font-size: 1.1em;
  white-space: pre-wrap;
  margin: 0.5em;
}

ul {
  list-style: none;
  margin: 0 0 0 2em;
  padding: 0;
}

h1 {
  font-size: 1.2em;
}

/* Indent JSON when there's a callback. */
.callback + #json {
  padding-left: 1em;
}

.callback {
  font-family: monospace;
  color: #a52a2a;
}

/* Tomorrow Night theme */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #27292c;
    color: #d7dad8;
  }

  a {
    color: #4c9edd;
  }
  a:visited {
    color: #b678c7;
  }

  .bool {
    color: #92b2ca;
  }

  .num {
    color: #92b2ca;
  }

  .null {
    color: #d77c78;
  }

  .callback {
    color: #d77c78;
  }

  .string {
    color: #c2c77b;
  }

  #error {
    border-bottom: 1px solid rgb(61, 61, 61);
    background-color: rgb(37, 37, 37);
    margin-bottom: 1.5em;
    padding: 1em 0.5em;
  }

  .errormessage {
    font-family: monospace;
    margin-top: 0.5em;
    color: rgb(212, 10, 10);
  }

  .errorcolumn {
    background-color: rgb(212, 10, 10);
    color: white;
  }

  .errorline {
    background-color: rgb(32, 29, 29);
  }
}

.spacer {
  display: inline-block;
  width: 0px;
}

/* Allow long URLs to break */
.string,
:any-link {
  word-break: break-all;
}

/* Prevent double-highlighting of spacers */
:is(.spacer, :not(.quoted) > .q)::selection {
  background-color: transparent;
}
