:root {
    --color-text: #222;
    --color-background: #fff;
    --color-border: #ddd;
    --color-link: #105e85;
    --color-link-hover: #157eb0;

    --color-heading-main: #44525e;
    --color-heading-stacktrace: #363636;
    --color-table-heading: #44525e;

    --color-tab-link: #105e85;
    --color-tab-selected: #fff;
    --color-tab-selected-background: #105e85;

    --color-code-background: #fbfbfb;
    --color-code-highlight: #c70000;
    --color-code-context-linenum: #606060;
    --color-code-context: #606060;
    --color-code-context-button-background: #ddd;
}

/* Intentional double at-signs here to escape properly when included in cshtml */
@@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #dcdcdc;
        --color-background: #222;
        --color-border: #444;
        --color-link: #4db7ea;
        --color-link-hover: #88cfea;

        --color-heading-main: #a9bac7;
        --color-heading-stacktrace: #c7c7c7;
        --color-table-heading: #a9bac7;

        --color-tab-link: #4db7ea;
        --color-tab-selected: #222;
        --color-tab-selected-background: #4db7ea;

        --color-code-background: #1c1c1c;
        --color-code-highlight: #ff8787;
        --color-code-context-linenum: #9B9B9B;
        --color-code-context: #9B9B9B;
        --color-code-context-button-background: #444;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;
    font-size: .813em;
    color: var(--color-text);
    background-color: var(--color-background);
}

h1 {
    color: var(--color-heading-main);
    margin: 15px 0 15px 0;
}

h2 {
    margin: 10px 5px 0 0;
    padding: 5px;
    border-bottom: 1px solid var(--color-border);
}

h3 {
    color: var(--color-heading-stacktrace);
    margin: 5px 5px 0 0;
    font-weight: normal;
}

code {
    font-family: Consolas, "Courier New", courier, monospace;
    font-weight: bold;
}

a {
    color: var(--color-link);
    text-decoration: none;
}
a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

/* Exception title & message */
body .titleerror {
    padding: 3px 3px 6px 3px;
    display: block;
    font-size: 1.5em;
    font-weight: 100;
}

/* Exception location */
body .location {
    margin: 3px 0 10px 30px;
    font-size: 1.1em;
}

/* Tab navigation */
#header {
    font-size: 18px;
    padding: 15px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}
#header li {
    display: inline;
    margin: 5px;
    padding: 5px;
    color: var(--color-tab-link);
    cursor: pointer;
}
#header .selected {
    color: var(--color-tab-selected);
    background: var(--color-tab-selected-background);
}

/* Stack page */
#stackpage .details {
    font-size: 1.2em;
    padding: 3px;
}
#stackpage ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#stackpage .frame {
    padding: 0;
    margin: 0 0 0 30px;
    word-break: break-word;
}
#stackpage .frame h3 {
    padding: 2px;
    margin: 0;
}

/* Stack frame source */
#stackpage .source {
    padding: 0 0 0 30px;
}
#stackpage .source ol li {
    font-family: Consolas, "Courier New", courier, monospace;
    white-space: pre-wrap;
    background-color: var(--color-code-background);
}

/* Stack frame source: highlighted line */
#stackpage .source .highlight {
    border-left: 3px solid var(--color-code-highlight);
    margin-left: -3px;
    font-weight: bold;
}
#stackpage .source .highlight li span {
    color: var(--color-code-highlight);
}

/* Stack frame source: context lines */
#stackpage .source .collapsible {
    color: var(--color-code-context-linenum);
}
#stackpage .source .collapsible li span {
    color: var(--color-code-context);
}

.expandCollapseButton {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    font-size: 10px;
    color: inherit;
    background: var(--color-code-context-button-background);
    padding: 0;
    border: 0;
    cursor: pointer;
}

/* Table */
.page table {
    border-collapse: collapse;
    margin: 0 0 20px;
    font-size: 1.1em;
}
.page th {
    padding: 10px 10px 5px 10px;
    color: var(--color-table-heading);
    text-align: left;
}
.page td {
    padding: 3px 10px;
}
.page tr {
    border-bottom: 1px solid var(--color-border);
}
.page tr > :not(:last-child) {
    border-right: 1px solid var(--color-border);
}
.page tr > :first-child {
    min-width: 150px;
}
.page tr > :last-child {
    word-break: break-word;
}

.page p {
    font-size: 1.1em;
}

/* Raw exception details */
.rawExceptionBlock {
    font-size: 1.2em;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.showRawException {
    display: inline-block;
    color: var(--color-link);
    background: transparent;
    font: inherit;
    border: 0;
    padding: 10px 0;
    cursor: pointer;
}
.showRawException:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}
