/* vim: set et sts=4 ts=4 sw=4 ai: */
.sidebar {
    width: 20rem;
    background: #e2e2e2;
}

img.sidebar-logo {
    max-width: 75%;
}

.navbar {
    background: #d2d2d2;
}

#toggle-sidebar-btn {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-wrapper.with-sidebar > .content-wrapper
{
    left: 20rem;
    width: calc(100% - 20rem);
}

.page-wrapper.with-sidebar[data-sidebar-type~="full-height"] > .navbar:not(.navbar-fixed-bottom) {
    left: 20rem;
    width: calc(100% - 20rem);
}

.page-wrapper.with-sidebar[data-sidebar-type~="full-height"] > .navbar.navbar-fixed-bottom
{
    left: 20rem;
    width: calc(100% - 20rem);
}

/* Headlines and anchors */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    display:block;
}

a.anchor,
a.anchor:hover {
    text-decoration: none;
    font-size:40%;
    position: relative;
    margin-left: 1rem;
    bottom: 0.4rem;
    opacity: 0;
}

h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor {
    opacity: 1;
}

/* hide content editor to prevent flash while codemirror is loading */
#content_editor {
    display: none;
}

/* pre and code */

div.page > div.highlight {
    margin-bottom: 1rem;
}

code,
pre,
.code {
    padding: 0.2rem;
    background-color: rgba(0, 0, 0, 0.05);
    font-size: inherit;
    line-height: 1.5;
    padding: 0.1rem 0.5rem;
    margin: 0 0.1rem;
    overflow: auto;
}
.dark-mode code,
.dark-mode pre,
.dark-mode .code {
    background-color: #263238;
}

.revision-small {
    font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
    text-decoration: none;
    padding: 0 0.5rem;
    line-height: 2rem;
    height: 2rem;
}

.dropdown-icon {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-size: 1.6rem;
    margin-right: 1rem;
    color: rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.05);
    border: 0 solid transparent;
    border-radius: 0.4rem;
}
.dropdown-icon:hover {
    color: rgba(0, 0, 0, 1.0);
}
.dark-mode .dropdown-icon {
    color: rgba(255, 255, 255, 0.65);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: transparent;
}
.dark-mode .dropdown-icon:hover {
    color: rgba(255, 255, 255, 1.0);
}
.dropdown-item-with-icon {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    border: 0.4rem solid transparent;
    color: rgba(0, 0, 0, 0.85);
    border-color: transparent;
}
.dark-mode .dropdown-item-with-icon {
    color: rgba(255, 255, 255, 0.8);
    border-color: transparent;
}
.dropdown-item-with-icon:hover {
    color: rgba(0, 0, 0, 1.0);
    text-decoration: none;
}
.dark-mode .dropdown-item-with-icon:hover {
    color: rgba(255, 255, 255, 1.0);
}

#editor {
    background: transparent;
    display: none;
}

#editor-help-markdown {
    position: absolute;
    bottom: 3rem;
    left: 5rem;
    z-index: 1000;
    overflow-y: scroll;
    max-height: 40vh;
    margin: 0;
    min-width: 90%;
}

/* history diff */
table.diff {
    overflow-x: auto;
    width: 100%;
}
table.diff td {
    padding: 0.1rem 1.5rem;
}
table.diff td.filename {
    padding-top: 1rem;
    padding-left: 0;
}
table.diff tr.added,
table.diff tr.removed,
table.diff td.hunk {
    font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}
tr.removed {
    color: rgba(0, 0, 0, 0.85);
    background-color: #f8d0d9;
    border-color: #ed586c;
}
tr.added {
    color: rgba(0, 0, 0, 0.85);
    background-color: #d5f9e5;
    border-color: #0be881;
}
.dark-mode tr.removed {
    color: #ff4d4f;
    background-color: #301923;
    border-color: #8c0e2e;
}
.dark-mode tr.added {
    color: #0be881;
    background-color: #17312a;
    border-color: #0d8951;
}
.diff-decoration {
    width: 0.5rem;
}

table .min {
    width: 1%;
}
table .linenumber {
    text-align: right;
    vertical-align: top;
}

table.blame {
    overflow-x: auto;
    width: 100%;
}
table.blame td {
    padding: 0.1rem 0.5rem;
    /*border: 1px solid black;*/
}
table.blame .tt {
    font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}

table.blame tr.odd {
    background-color: rgba(0, 0, 0, 0.1);
}

table.compact td {
    padding: 0.5rem 0.2rem;
}

.dark-mode table.blame tr.odd {
    background-color: rgba(0, 0, 0, 0.3);
}

.text-match {
    background-color: #ffcf00 !important;
    color: rgba(0,0,0,.85);
}

a.sidebar-toc-1 { padding-left: 2.5rem; padding-right: 0; }
a.sidebar-toc-2 { padding-left: 3.0rem; padding-right: 0; }
a.sidebar-toc-3 { padding-left: 3.5rem; padding-right: 0; }
a.sidebar-toc-4 { padding-left: 4.0rem; padding-right: 0; }
a.sidebar-toc-5 { padding-left: 4.5rem; padding-right: 0; }
a.sidebar-toc-6 { padding-left: 5.0rem; padding-right: 0; }

.sidebar-title-link {
    color: rgba(0, 0, 0, 0.7);
    background-color: transparent;
    border: 0 solid transparent;
    border-radius: 0;
}
.sidebar-title-link:hover {
    text-decoration: none;
    color: rgba(0, 0, 0, 0.85);
    background-color: transparent;
    border-color: transparent;
}
.dark-mode .sidebar-title-link {
    color: rgba(255, 255, 255, 0.65);
    background-color: transparent;
    border-color: transparent;
}
.dark-mode .sidebar-title-link:hover {
    color: rgba(255, 255, 255, 0.8);
    background-color: transparent;
    border-color: transparent;
}

/* page tweaks */
.page h1, .page h2, .page h3,
.page h4, .page h5, .page h6 {
    font-weight: 400;
}

.page h1 { font-size: 3.6rem; }
.page h2 { font-size: 3.2rem; }
.page h3 { font-size: 2.8rem; }
.page h4 { font-size: 2.4rem; }
.page h5 { font-size: 2.0rem; }
.page h6 { font-size: 1.6rem; }

.page p,
.page li {
    font-size: 1.6rem;
}

.page li {
    margin-bottom: 0.2rem;
    margin-left: 1.5rem;
}

/* may the li insanity begin */

.page ul,
.page ol {
    padding-left: 1rem;
    list-style-position: outside;
}

.page ol li ol li ol li ul li,
.page ol li ol li ul li,
.page ol li ul li,
.page ul li {
    list-style-type: disc;
}

.page ul li ol li ol li ul li,
.page ol li ol li ul li ul li,
.page ol li ol li ul li ul li,
.page ol li ul li ul li,
.page ul li ul li {
    list-style-type: circle;
}

.page ul li ul li ul li {
    list-style-type: square;
}

.page ul li ul li ul li ol li,
.page ul li ul li ol li,
.page ul li ol li,
.page ol li {
    list-style-type: decimal;
}

.page ul li ol li ol li,
.page ol li ol li {
    list-style-type: lower-alpha;
}

.page ol li ol li ol li {
    list-style-type: lower-roman;
}

.page ul ol,
.page ol ul,
.page ol ol,
.page ul ul
{
    margin: 1rem 0 1rem 0rem;
}

.page blockquote {
    border-left: 2px solid rgba(24,144,255,0.5);
    padding-left: 1rem;
    margin-inline-start: 0rem;
    margin-inline-end: 0rem;
    background-color: rgba(200,200,200,0.1);
}
/* table */
.page table {
    background-color: rgba(0, 0, 0, 0.1);
    border-collapse: collapse;
    margin-bottom: 2rem;
}
.page th {
    background-color: rgba(0, 0, 0, 0.2);
    text-align:center;
    padding: 1.0rem 1.2rem;
}
.page td {
    padding: 0.8rem 1.0rem;
}

.page table > thead > tr > th,
.page table > thead > tr > td,
.page table > tbody > tr > th,
.page table > tbody > tr > td,
.page table > tfoot > tr > th,
.page table > tfoot > tr > td {
    border-bottom: 1px solid rgba(255,255,255,0.5);
    border-right: 1px solid rgba(255,255,255,0.5);
}

.page table > thead > tr > :last-child,
.page table > tbody > tr > :last-child,
.page table > tfoot > tr > :last-child {
    border-right: 0;
}

.page table > :last-child > tr:last-child > td,
.page table > :last-child > tr:last-child > th {
    border-bottom: 0;
}

/* toasts */
.alert.alert-secondary a,
.dark-mode .alert.alert-secondary a {
    color: black;
    text-decoration: underline;
}

.global-toc-link
{
    font-size: 1.6rem;
}

.global-toc-link:hover
{
    text-decoration: none;
}

/* extra nav */
.extra-nav {
    position: fixed;
    margin-right: 1rem;
    z-index: 20;
    padding: 2rem 4rem 0rem 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    max-height: 95%;
}

.dark-mode .extra-nav {
}

.extra-nav .sidebar-title {
    white-space: nowrap;
}

.btn-xsm {
  height: 2.2rem;
  line-height: 2.2rem;
  padding: 0 1rem;
  font-size: 1rem;
}

.btn-editor {
    margin-left: 0.2rem;
    width: 3.2rem;
    padding-left: 0;
    padding-right: 0;
}

.extra-nav-attachment {
    padding: 1rem;
}

.font-size-10 {
  font-size: 1rem !important;
}

.break-all {
    word-break: break-all;
}

.right-02 {
    right: 0.2rem!important;
}

/* dark mode button tweaks */
.dark-mode .btn.btn-danger {
    background-color: #B00020;
    border-color: #B00020;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

.dark-mode .btn.btn-success {
    color: #fff;
    background-color: #4caf50;
    border-color: #4caf50;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

/* task list */
.task-list-item-checkbox {
    margin-right: 1rem;
    /* disable checkbox without using the disabled property */
    position: relative;
    pointer-events: none;
    margin-left: -2.3rem;
}

.page ul li.task-list-item,
.page li.task-list-item {
    list-style-type: none;
}

mark {
    padding: 0.1rem 0.2rem;
    background-color: #ffb100!important;
    color: #000;
}
.dark-mode mark {
    padding: 0.1rem 0.2rem;
    background-color: #DB9A00!important;
    color: #000;
}

.spoiler {
    background-color:rgba(0,0,0,0.2);
    margin-bottom: 1rem;
    padding: 0 1rem 0 1rem;
}
.dark-mode .spoiler {
    background-color:rgba(0,0,0,0.2);
}
.nospoiler,
.dark-mode .nospoiler {
    background-color:rgba(0,0,0,0.05);
    transition: opacity 0.1s ease-in;
}
.spoiler > * {
    opacity: 0;
    margin-block-start: 0;
}
.nospoiler > * {
    opacity: 1;
    transition: opacity 0.1s ease-in;
    margin-block-start: 0;
}

.spoiler > .spoiler-button {
    margin: 1rem 0;
    width: 3rem;
    opacity: 1;
    background-color: rgba(0,0,0,0.2);
    border: 0;
    border-radius: 0.4rem;
}
.dark-mode .spoiler > .spoiler-button {
    color: #9e9e9e;
    background-color: rgba(255,255,255,0.2);
}

/* documentation */

.help-button {
    font-size: 1.2rem !important;
    border-radius: 0.5rem;
    padding: 0.5rem 0.8rem;
    background-color: rgba(100, 100, 100, 0.1);
    white-space: nowrap;
    position: relative;
    pointer-events: none;
}

.btn-hlp {
    position: relative;
    pointer-events: none;
}

.collapse-header:focus::after {
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.dark-mode .collapse-header:focus::after {
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

details.collapse-panel {
    margin-bottom: 2rem;
}

.collapse-content {
    padding: 0.05rem 2rem 0rem 2rem;
}
