div.dbg_dot {
    opacity: 1;
    text-shadow: 1px 0px 1px #400;
    cursor: help;
    display: inline-block;
    position: absolute;
    z-index: 8999;
    min-width: 21px;
    height: 21px;
    line-height: 21px;
    background-color: rgba(255, 48, 48, 0.3);
    color: #fff;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.9);
    border-radius: 10.5px;
    text-align: center;
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    font-weight: bold;
}

div.dbg_dot.open {
    background-color: #800;
}

div.dbg_dot.hilited {
    background-color: rgba(128, 0, 0, 1);
    color: #FF0;
    box-shadow: 0 0 5px rgba(128, 0, 0, 1);
}

#dbg {
    color: #000;
    opacity: 1;
    position: fixed;
    top: 10%;
    left: 10%;
    z-index: 9001;
    width: 80%;
    max-height: 80%;
    overflow: auto;
    border-radius: 5px;
    border: 1px solid #f33;
    box-shadow: 0 0 5px #f00;
    padding: 15px 10px 10px 10px;
    font-family: "Courier New", Courier, monospace;
    background: #fff;
    font-size: 12px;
}

#dbg code {
    white-space: pre;
    display: block
}

#dbg_controls {
    position: fixed;
    z-index: 9002;
    left: calc(10% - 12px);
    top: calc(10% - 12px);
}

#dbg_controls button {
    display: inline-block;
    appearance: none;
    padding: 0;
    border: 0;
    background: #F33;
    box-shadow: 0 0 5px #f00;
    width: 24px;
    height: 24px;
    line-height: 24px;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    font-family: "Courier New", Courier, monospace;
}

#dbg_controls button:hover {
    background: #800
}

.dbg_hilite {
    background: #FFc
}

.dbg_line {
    color: #FF8000
}

.dbg_inlinehilite {
    color: #FF0;
    background: #FF8000;
}

#dbg p {
    margin: 0 0 10px 0
}

#dbg p .dbg_array,
#dbg p .dbg_object,
#dbg p .dbg_string {
    font-size: 11px;
    margin: 10px 0 10px 0;
    padding: 5px;
    border-radius: 5px;
    font-family: monospace;
    border: 1px solid;
    height: 200px;
    overflow: auto;
    resize: vertical;
}

#dbg p .dbg_array {
    background-color: #FCFFFC;
    border-color: #373;
}

#dbg p .dbg_object {
    background-color: #FCFCFF;
    border-color: #337;
}

#dbg p .dbg_string {
    background-color: #FFFCFC;
    border-color: #733;
}

#dbg .dbg_table table {
    margin: -1px;
    border-collapse: collapse;
    width: calc(100% + 2px)
}

#dbg .dbg_table table th {
    background-color: #F0FCF0;
    color: #030;
}

#dbg .dbg_table table th,
#dbg .dbg_table table td {
    border: 1px solid #373;
    padding: 5px
}

#dbg .dbg_table {
    border: 1px solid #373;
    font-size: 11px;
    margin: 10px 0 10px 0;
    border-radius: 5px 5px 0 0;
    font-family: monospace;
    max-height: 200px;
    background-color: #FCFFFC;
    overflow: auto;
}

#dbg .dbg_table div {
    /*overflow: hidden;*/
}

@keyframes highlight {
    from {
        border-color: #CC0;
        background-color: #FFE;
    }
}

#dbg .dbg_table.highlight,
#dbg .dbg_table.highlight div,
#dbg .dbg_table.highlight table th,
#dbg .dbg_table.highlight table td,
#dbg p .dbg_array.highlight,
#dbg p .dbg_object.highlight,
#dbg p .dbg_string.highlight {
    animation: highlight 1s;
}

#dbg p .dbg_code_label,
#dbg p .dbg_array_label,
#dbg p .dbg_object_label,
#dbg p .dbg_string_label {
    display: inline-block;
    border: 1px dotted #F33;
    cursor: pointer;
    padding: 0 1px;
    margin: 0 -1px
}

#dbg p .dbg_array_label {
    color: #070;
    border-color: #070;
}

#dbg p .dbg_object_label {
    color: #00B;
    border-color: #00B;
}

#dbg p .dbg_string_label {
    color: #D00;
    border-color: #D00;
}

#dbg p .dbg_code_label:hover, #dbg p .dbg_code_label.open {
    border-style: solid;
    background-color: #FCC
}

#dbg p .dbg_array_label:hover, #dbg p .dbg_array_label.open {
    border-style: solid;
    background-color: #CFC
}

#dbg p .dbg_object_label:hover, #dbg p .dbg_object_label.open {
    border-style: solid;
    background-color: #CCF
}

#dbg p .dbg_string_label:hover, #dbg p .dbg_string_label.open {
    border-style: solid;
    background-color: #FCC
}

#dbg hr {
    height: 0;
    border: 1px solid #F33;
    border-width: 1px 0 0 0;
    box-shadow: 0 0 2px #f00;
    margin: 10px -10px 20px -10px;
}

#dbg p .dbg_code:checked ~ code.dbg_code {
    display: block;
}

#dbg .dbg_tree_toggle {
    background: transparent;
    border: 1px dotted #AAA;
    appearance: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
    outline: 0;
}

#dbg .dbg_tree_toggle.on {
    border-style: solid;
}

#dbg .dbg_tree_toggle:hover {
    border-style: solid;
}

#dbg .dbg_tree_toggle:focus {
    appearance: none;
    outline: none;
}

#dbg .dbg_tree_toggle::-moz-focus-inner {
    border: 0;
}

#dbg .dbg_togglable_tree {
    display: none;
}

#dbg .dbg_tree_toggle.on + .dbg_togglable_tree {
    display: inline;
}

#debug_window {
    position: fixed;
    z-index: 9000;
    right: 20px;
    bottom: 20px;
}

#debug_window_tabs a {
    border-width: 1px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: -1px;
    color: #000;
    text-decoration: none
}

#debug_window_tabs a:hover, #debug_tabs a.sel {
    border-bottom-color: rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.1);
}

#debug_window_content {
    font-family: Courier;
    font-size: 14px;
    color: #FFF;
    text-shadow: 1px 0px 1px #000;
    border: 0px solid rgba(0, 0, 0, 0.6);
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    max-height: 150px;
    width: 300px;
    overflow: auto;
    padding: 10px
}

#debug_window_content ul {
    text-transform: capitalize;
    margin: 0 0 10px;
    padding: 0;
    list-style-type: none
}

#debug_window_content p {
    margin-bottom: 0;
}

#debug_window_content li {
    clear: right;
    display: block;
    margin: 0 0 0px 0;
    padding: 0px;
}

#debug_window_content input {
    display: none;
}

#debug_window_content label {
    background-color: rgba(0, 0, 0, 0);
    position: relative;
    display: block;
    cursor: pointer;
}

#debug_window_content input:checked + label {
    background-color: rgba(0, 0, 0, 0);
}

#debug_window_content .dbg_dot_all {
    appearance: none;
    position: relative;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: 1px 0px 1px #000;
    color: #000;
    background-color: #FFF;
    border-radius: 50%;
    text-align: center;
    width: 1em;
    height: 1em;
    cursor: pointer;
    float: right;
}

#debug_window_content .dbg_dot_all:before {
    content: "\2753";
    position: absolute;
    color: #999;
    top: -3px;
    left: 1px
}

#debug_window_content .dbg_dot_all.open {
    background-color: #F00;
    color: #Fcc;
    box-shadow: 1px 0px 1px #F88;
}

#debug_window_content .dbg_dot_all.open:before {
    content: "\00d7";
    font-weight: bold;
    color: #F8E5E5;
}

#debug_window_content label:before {
    content: "\2718";
    margin-right: 5px
}

#debug_window_content input:checked + label:before {
    content: "\2714";
}

#dbg_all_dots_toggle {
    appearance: none;
    background: #FFF;
    border: 0;
    padding: 0 10px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    height: 16px;
    border-radius: 8px;
    box-shadow: 1px 0 1px #000;
}