@import url("solar.css");
@import url("solarized-dark.css");

/* -- global ---------------------------------------------------------------- */

body {
    font-family: '游ゴシック体', 'Yu Gothic', YuGothic, 'Open Sans', sans-serif;
    font-weight: 500;
    min-width: unset;
    margin: 0;
    background-color: whitesmoke;
    border: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

html {
  scroll-padding-top: calc(2.2em + 22px);
}

/* -- header, footer, sidebar ----------------------------------------------- */

div.related {
    position: fixed;
    top: 0;
    left: 0;
    font-size: 0.9em;
    height: 2.2em;
    background: #0D2881;
    box-shadow: 0 2px 4px gray;
}

div.related ul li a {
    color: #fff;
}

div.related li.nav-item-this,
div.related li.nav-item-1 {
    /* enable: w1024+ */
    display: none;
}

div.related ul li a:hover {
    background-color: #0D2881;
    color: #fff;
    text-decoration: underline;
}

div.sphinxsidebar {
    /* enable: w1024+ */
    display: none;
}

div.footer {
    background-color: #464646;
    color: #ddd;
    font-size: 0.8em;
}


/* -- text layout ----------------------------------------------------------- */

div.bodywrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

div.body {
    padding: 3em 2em 3em 2em;
    min-width: unset;
    max-width: unset;
    overflow-wrap: break-word;
    word-wrap: break-word;
    box-shadow: 0 2px 4px gray;
}

div.body h1 {
    margin: 0 -0.5em 0 -0.5em;
    padding: 0.5em 0 0.5em 0;
}

div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
    margin: 1.5em -0.5em 1.0em -0.5em;
    padding: 0.5em 0 0.5em 0;
}

div.body h4,
div.body h5,
div.body h6 {
    font-size: 1.1em;
}

div.body ul,
div.body ol {
    margin-inline-start: 1.2em;
    padding-inline-start: 0.6em;
}

div.body li {
    margin: 0.2em 0 0.2em 0;
}

div.body dd,
div.body dl {
    margin-inline-start: 0em;
    padding-inline-start: 0em;
}

div.body blockquote {
    display: block;
    margin: 1em;
}


/* -- objects layout -------------------------------------------------------- */

div.body div.figure {
    display: block;
    max-height: 75vh;
    max-width: 90vw;
    margin: 1em;
}

div.body div.figure img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(75vh - 4em);
}

div.body table,
div.body table.align-default,
div.body table.docutils {
    font-size: 0.9em;
    display: block;
    margin: 1em;
    max-height: 75vw;
    max-width: 90vw;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

div.body tbody tr.row-even {
    background-color: whitesmoke;
}

div.body thead tr {
    background-color: #0D2881;
    color: white;
}

div.body div.highlight {
    max-height: 75vw;
    max-width: 90%;
    overflow-wrap: normal;
    overflow-x: auto;
    overflow-y: auto;
    margin-left: 0;
    margin: 0.5em;
}

div.body div.highlight pre {
    margin: 0;
    font-family: Consolas, Monaco, monospace;
    font-weight: lighter;
}

div.body div.highlight-text pre {
    color: #ddd;
}

div.body div.admonition {
    box-shadow: lightgray;
    margin: 0.5em;
    max-width: 90%;
}

div.body div.admonition div.line-block {
    margin-left: 1em;
    margin-right: 1em;
}

div.body div.admonition.note p.admonition-title {
    background-color: #268bd2;
}

div.body div.admonition.warning p.admonition-title {
    background-color: #cb4b16;
}

div.body div.admonition.seealso p.admonition-title {
    background-color: #3BA59E;
}


/* for too small display ---------------------------------------------------- */

@media screen and (max-width: 479px) {
    body {
        max-width: 100vw;
    }
    div.related,
    div.related li.nav-item {
        height: unset;
    }
    div.related li.nav-item {
        max-width: calc(100vw - 12em);
    }
}


/* for mobile landscape: w600+ ---------------------------------------------- */

@media screen and (min-width: 600px) {
    div.related li.nav-item-this,
    div.related li.nav-item-1 {
        /* enable: w1024+ */
        display: none;
    }
    div.sphinxsidebar {
        /* enable: w1024+ */
        display: none;
    }
}


/* for tablet or desktop: w1024+ -------------------------------------------- */

@media screen and (min-width: 840px) {
    div.related {
        font-size: 1.2em;
        height: 2.2em;
    }
    div.document {
        background: url("subtle_dots.png") repeat;
    }
    div.bodywrapper {
        max-width: 72%;
        margin-top: 4.5em;
        margin-bottom: 1.5em;
        margin-left: 1em;
        margin-right: 1em;
    }
    div.body {
        padding-top: 1em;
    }
    div.body div.admonition,
    div.body div.highlight {
        max-width: 50vw;
        margin-right: 10vw;
        margin-left: auto;
        margin-top: 2em;
        margin-bottom: 2em;
    }
    div.body table,
    div.body table.align-default,
    div.body table.docutils,
    div.body div.highlight {
        max-height: unset;
        max-width: unset;
        white-space: unset;
        overflow-x: unset;
        overflow-y: unset;
        -webkit-overflow-scrolling: unset;
        margin-top: 2em;
        margin-bottom: 2em;
    }
    div.body div.figure {
        max-height: 60vh;
        max-width: 60vw;
        margin: 1em;
    }
    div.body div.figure img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: calc(60vh - 4em);
    }
    div.related li.nav-item-this {
        display: block;
    }
    div.sphinxsidebar {
        display: block;
        float: right;
        width: 26%;
        min-width: 12em;
        height: 100%;
        padding: 0;
        font-size: 0.9em;
        position: fixed;
        top: 4.0em;
        right: 0;
    }
    div.searchformwrapper {
        margin-left: 0.5em;
        margin-right: 0.5em;
    }
    form.search {
        margin-top: 0.5em;
        margin-bottom: 0.5em;
    }
    div.sphinxsidebarwrapper {
        margin: 1em 1em 1em 1em;
        box-shadow: 0 2px 4px gray;
        max-height: calc(100vh - 9em);
        background-color: white;
        overflow: auto;
        font-size: 1em;
        border: 0px;
        border-style: solid;
        border-color: #ddddcc;
    }
    div.sphinxsidebarwrapper>ul,
    div.sphinxsidebarwrapper>ol,
    div.sphinxsidebarwrapper>p,
    div.searchformwrapper {
        margin-inline-start: 0.4em;
        padding-inline-start: 0.2em;
    }
    div.sphinxsidebar ul ul {
        margin-left: 0.8em;
    }
    div.sphinxsidebarwrapper>*:first-child {
        margin-top: 0px;
    }
    div.sphinxsidebar li {
        list-style: none;
    }
}