h3 {
    word-wrap: anywhere;
}

#load-progress-bar-container {
    margin: 8px 0;
}

#viewer {
    display: flex;
    flex-wrap: nowrap;
    border: 1px solid #d1d5da;
    border-radius: 0 0 3px 3px;
    width: 100%;
}

#viewer-header {
    margin: 8px 0 0 0;
    padding: 8px 16px;
    border: 1px solid #d1d5da;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    font-size: 80%;
}

#raw-url {
    float: right;
}

#file-content-container {
    overflow-x: auto;
    flex: 99 0 auto;
    width: 90%;
    padding: 2px 0;
}

#file-content {
    box-sizing: border-box;
}

#file-content pre {
    border: 0;
    margin: 0;
    padding: 0 0 0 8px;
    line-height: 20px;
    font-size: 14px;
    background: transparent;
}

#gutter {
    flex: 1 0 3em;
    border-right: 1px solid #d1d5da;
    padding: 2px 0;
    text-align: right;
}

.num {
    display: block;
    clear: right;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    color: #bbb;
    padding: 0 5px;
    text-align: right;
    box-sizing: border-box;
    margin-left: 4px;
    scroll-margin: 10em 0 0 0;
    user-select: none;
    -webkit-user-select: none; /* Safari */
}

.num::before {
    content: attr(line);
    position: relative;
}

.num.highlighted {
    float: right;
    display: flex;
    align-items: center;
    justify-content: end;
    position: relative;
    right: 2px;
    padding: 0;
    border-radius: 2px 1px 1px 2px;
    background: #f9f2dc;
}

[data-bs-theme="dark"] .num.highlighted {
    background-color: var(--bs-gray-dark);
}

pre.highlighted {
    background-color: #f9f2dc;
}



[data-bs-theme="dark"] pre.highlighted {
    background-color: var(--bs-gray-dark);
    color: var(--bs-gray-100);
}

.num.highlighted::before {
    border: solid #d5d0bd;
    border-width: 1px 0 1px 1px;
    padding: 0 3px 0 8px;
    border-radius: 2px;
    height: 20px;
    min-width: 2em;
}

.num.highlighted::after {
    content: '';
    box-sizing: border-box;
    display: block;
    position: absolute;
    right: -5px;
    height: 18px;
    width: 18px;
    border: solid #d5d0bd;
    border-radius: 0 2px 2px 2px;
    border-width: 0 1px 1px 0;
    transform: rotate(-45deg);
    clip-path: inset(4px 0 0 4px);
    background: linear-gradient(to bottom right, #f9f2dc00 15px, #f9f2dc 16px, #f9f2dc);
}

[data-bs-theme="dark"] .num.highlighted::before,.num.highlighted::after {
    border-color: var(--bs-dark);
}

/* Dark mode overrides */
[data-bs-theme="dark"] {
    --prism-background: #282c34;
    --prism-color: #abb2bf;
}

[data-bs-theme="dark"] code[class*="language-"],
[data-bs-theme="dark"] pre[class*="language-"] {
    background: var(--prism-background);
    color: var(--prism-color);
}

[data-bs-theme="dark"] .token.comment,
[data-bs-theme="dark"] .token.prolog,
[data-bs-theme="dark"] .token.doctype,
[data-bs-theme="dark"] .token.cdata {
    color: #5c6370;
}

[data-bs-theme="dark"] .token.function {
    color: #61afef;
}

[data-bs-theme="dark"] .token.string {
    color: #98c379;
}

[data-bs-theme="dark"] .token.number {
    color: #d19a66;
}

.token.info {
    color: #0086b3;
    font-weight: bold;
}

.token.error {
    color: #d73a49;
    font-weight: bold;
}

.token.warn {
    color: #e36209;
    font-weight: bold;
}

.token.debug {
    color: #6f42c1;
    font-weight: bold;
}

[data-bs-theme="dark"] .token.info {
    color: #61afef;
}

[data-bs-theme="dark"] .token.error {
    color: #e06c75;
}

[data-bs-theme="dark"] .token.warn {
    color: #d19a66;
}

[data-bs-theme="dark"] .token.debug {
    color: #c678dd;
}

pre[class*="language-"] {
    text-shadow: none !important;
}
