@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* todo:
    - clean up comments
    - change hard-coded colors to variables
    - split up into multiple files
*/

html {
    background-color: rgb(36, 36, 36);
    color: rgb(255, 255, 255);
    font-family: "Ubuntu Mono", monospace;
    width: 100%;
    height: 100%;
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    width: 100%;
    height: 100%;
}

#select {
    border: 3px solid rgb(155, 155, 155);
    /* border-radius: 10px; */
    padding: 15px;
    max-width: max(30%, 500px);
    background-color: rgb(0, 0, 0);
}

#select #title {
    float: right;
}

#select-footer {
    margin-top: 5px;
}

.fire-char-1 {
    color: orange;
}

.fire-char-2 {
    color: red;
}

code {
    background-color: rgb(30, 30, 30);
    border-radius: 4px;
    padding: 1px 3px;
}

:link {
    /* color: rgb(158, 227, 255) */
    color: orange;
}

:visited {
    color: orange;
}

:link:hover,
:visited:hover {
    color: red;
}

#tree-view {
    padding-left: 5px;
}

.payload-key:not(.payload-key-special) {
    color: rgb(238, 155, 0);
}

.payload-key-special {
    color: rgb(255, 60, 46)
}

.payload-val {
    white-space: pre-wrap;
    display: inline-block;
    vertical-align: top;
}

.payload-pair {
    margin: 2px;
    margin-left: 5px;
    /* margin-left: 10px; */
}

.tree-node-inner {
    border-left: 2px;
    border-left-style: solid;
    margin-left: calc(2.5ch + 1px);
    /* padding-left: 10px; */
}

.tree-node-inner-collapsed {
    display: None;
}

.tree-node-0>.tree-node-inner {
    border-left-color: rgb(236, 196, 255);
}

.tree-node-1>.tree-node-inner {
    border-left-color: rgb(196, 232, 255);
}

/* .tree-node-inner-2 {
    border-left-color: rgb(0, 234, 255);
}

.tree-node-inner-3 {
    border-left-color: rgb(255, 242, 0);
} */

.payload-info {
    margin-bottom: 0px;
    margin-top: 0px;
    /* border-left: 4px;
    border-left-color: rgb(236, 196, 255);
    border-left-style: solid;
    padding-left: 3px; */
}

.payload-info::before {
    content: "\00a0";
    text-decoration: line-through;
    padding-right: 2px;
}

.tree-node-0>.payload-info::before {
    text-decoration-color: rgb(196, 232, 255)
}

.tree-node-1>.payload-info::before {
    text-decoration-color: rgb(236, 196, 255)
}

.payload-toggle-collapsed {
    padding-right: 0.2ch;
    /* font-size: smaller; */
}

.payload-toggle-collapsed:hover {
    user-select: none;
}

.payload-toggle-collapsed-empty pre {
    display: inline;
}

.payload-toggle-collapsed-interactive:hover {
    cursor: pointer;
}

/* .tree-node-warn {
    background-color: rgb(89, 82, 0);
}

.tree-node-info {
    background-color: rgb(0, 65, 89);
}

.tree-node-error {
    background-color: rgb(89, 16, 0);
}

.tree-node-debug {
    background-color: rgba(0, 65, 89)
}

.tree-node-trace {
    background-color: rgba(0, 65, 89);
} */

.payload-level-warn {
    color: rgb(214, 196, 0);
}

.payload-level-info {
    color: rgb(52, 223, 0);
}

.payload-level-error {
    color: rgb(208, 38, 0);
}

.payload-level-debug {
    color: rgb(0, 132, 181);
}

.payload-level-trace {
    color: rgb(232, 232, 232);
}

.payload-level {
    font-weight: bold;
}

#view-header {
    max-width: 100%;
    background-color: black;
    border-bottom: 3px solid rgb(155, 155, 155);
    padding: 15px;
    margin-bottom: 30px;
}

#view-header-right {
    float: right;
}

#view-header-msg {
    font-size: small;
    font-style: italic;
    max-width: 30vw;
    display: inline-block;
    text-align: right;
    opacity: 0%;
    transition: opacity 200ms;
    background-image: linear-gradient(110deg, white 45%, #d89923, #d89923, #cf1c1c 50%, #d89923, #d89923, white 55%);
    background-clip: text;
    color: transparent;
    background-size: 500% 300%;
    animation: header-msg 5s linear 0s infinite running;
}

@keyframes header-msg {
    from {
        background-position: 100% 0%;
    }

    to {
        background-position: 0% 0%;
    }
}

#view-header:hover #view-header-msg {
    opacity: 100%;
}

#view-header::after {
    /* 
        https://stackoverflow.com/a/10969052
        i hate the web so much
    */
    content: "";
    display: table;
    clear: both;
}

#view-header #title {
    /* text-align: right; */
    margin: 0px;
    display: inline;
    font-size: x-large;
}

#tree-view-root {
    font-style: italic;
    font-weight: bold;
    background-image: linear-gradient(to right top, rgb(236, 196, 255), rgb(196, 232, 255));
    background-clip: text;
    color: transparent;
}

#view-header-tools {
    display: inline;
}

#view-header-tools * {
    padding-right: 10px;
}