/**
 * Ensure scrollbars and other features use dark mode enabled browser scheme
 * https://www.amitmerchant.com/darkmode-aware-scrollbars-using-css/
 */
.dark {
    color-scheme: dark;
}

/* always-at-the-bottom-footer ====================================== */

/**
 * The wrapper is also styled with box-sizing:border box and a min-width of 100%
 * such styling positions the footer right below the fold if the page is "too short"
 * the padding make room for the footer and the negative margin moves it up inside said padding
 */
.wrapper {
    padding-bottom: 60px;
    margin-bottom: -60px;
}

/* mouseover effect on links inside HEADER ========================== */

#header li a:before {
    pointer-events: none;
    transition: all 0.3s;
    content: '';
    left: 50%;
    top: 50%;
    width: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-left: 0;
    position: absolute;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 100%;
    opacity: 0;
}

#header li a:hover:before,
#header li a:focus:before {
    opacity: 1;
    width: 180%;
    padding-bottom: 180%;
    margin-top: -90%;
    margin-left: -90%;
}

#header li.selected a:before {
    width: 100%;
    left: 0;
    top: auto;
    right: 0;
    bottom: -14px;
    height: 5px;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 0;
    opacity: 1;
}

li.selected a {
    cursor: text;
}

/* Menu Styles ==================================================== */

#nav li:hover a:after,
#nav li.selected a:after {
    content: '';
    position: absolute;
    width: 1px;
    top: 0;
    bottom: 0;
    background: var(--color-border-light);
}

#nav li:hover a,
#nav li.selected a {
    color: var(--color-blue-3);
}

#nav li:hover a:after,
#nav li.selected a:after {
    right: -1px;
}

#nav li.selected a {
    font-weight: 500;
}

#nav li.selected a:after {
    background: var(--color-blue-1);
}

/* Table of Contents =============================================== */

#toc ul {
    list-style-type: disc;
    margin: 0.5em 0 0 1em;
    padding: 0;
}

#toc li {
    line-height: initial;
    padding: 5px 0 5px 0;
}

#toc li ul {
    list-style-type: disc;
    margin-top: 5px;
    margin-left: 15px;
}

/* Home Navigation Menu ============================================= */

/**
 * This menu only displays on the homepage to display the
 * Docs/Reference/Support/GitHub links.
 */

.nav-on nav {
    background: #fff;
    border-radius: 5px;
    display: block !important;
    padding: 0 20px;
    position: absolute;
    right: 25px;
    top: 50px;
    width: 130px;
}
.nav-on nav li {
    display: block;
    margin: 15px 0 15px 0;
}
.nav-on nav a {
    color: var(--color-blue-1);
}

/* info/warning/important/success boxes ============================= */

.noteBox {
    padding: 7px 20px;
    border-radius: 2px;
    border-style: solid;
    border-width: 0 0 0 7px;
}

.noteBox code {
    background: none;
    border: none;
}

.noteBox strong {
    font-weight: bold;
}

.important {
    background: var(--notebox-important-bg);
    border-color: var(--notebox-important-bd);
}

.info {
    background: var(--notebox-info-bg);
    border-color: var(--notebox-info-bd);
}

.success {
    background: var(--notebox-success-bg);
    border-color: var(--notebox-success-bd);
    color: var(--notebox-success-text);
}

.warning {
    background: var(--notebox-warning-bg);
    border-color: var(--notebox-warning-bd);
    color: var(--notebox-warning-text);
}

/* octicon icons =================================================== */
#main h2:hover,
#main h3:hover {
    margin-left: -20px;
    padding-left: 20px;
    position: relative;
}
#main h2:hover .anchor,
#main h3:hover .anchor {
    position: absolute;
    margin-left: -21px;
}
#main h2:hover .octicon,
#main h3:hover .octicon {
    display: inline-block;
}
.octicon-link {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
    height: 16px;
    width: 16px;
}

/* due to the background svg, we cannot set the color fill, so use the invert(1) filter to swap the color */
@media (prefers-color-scheme: dark) {
    #main h2:hover .octicon,
    #main h3:hover .octicon {
        filter: invert(1);
    }
}

/* next.js logo needs to invert color based on color scheme  */
#nextjs {
    fill: #000;
}
@media (prefers-color-scheme: dark) {
    #nextjs {
        fill: #fff;
    }
}

/* table styles ============================= */
#main table {
    table-layout: fixed;
    text-align: left;
    width: 100%;
}

#main thead th {
    padding: 10px;
}

#main tbody tr {
    border-top: 1px solid var(--color-blue-5);
}

#main tbody td {
    padding: 10px;
    vertical-align: top;
}
