{% set page_width = '80%' %}
{% set sidebar_width = '25%' %}

{% set theme_sidebar_header = theme_sidebar_header or theme_gray_1 %}
{% set theme_sidebar_link = theme_sidebar_link or theme_gray_1 %}
{% set theme_anchor_hover_fg = theme_anchor_hover_fg or theme_gray_1 %}

{% set theme_note_bg = theme_note_bg or theme_gray_2 %}
{% set theme_footnote_border = theme_footnote_border or theme_gray_2 %}
{% set theme_pre_bg = theme_pre_bg or theme_gray_2 %}

{% set theme_narrow_sidebar_link = theme_narrow_sidebar_link or theme_gray_3 %}
{% set theme_sidebar_hr = theme_sidebar_hr or theme_gray_3 %}


@import url("basic.css");

/* -- page layout ----------------------------------------------------------- */

body {
    font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro';
    font-size: 1.2em;
    background-color: white;
    color: #000;
    margin: 0;
    padding: 0;
}

div.document {
    width: {{ page_width }};
    margin: 30px auto 0 auto;
}

.first-time {
    font-size: 110%;
    font-family: 'source sans pro', sans;
    background-color: #eeeeee;
    padding: .5em;
    margin-top: -.25em;
    margin-bottom: .5em;
    border: 0.33em solid #ddeedd;
    border-radius: 0.25em;
    box-shadow: 0px 1px 4px 1px #ccc;
}

.caution {
    font-size: 110%;
    font-family: 'source sans pro', sans;
    background-color: #eedddd;
    padding: .5em;
    margin-top: -.25em;
    margin-bottom: -.25em;
    border: 0.33em solid #ffeeee;
    border-radius: 0.25em;
}

div.documentwrapper {
    float: left;
    width: 100%;
}

div.bodywrapper {
    margin: 0 0 0 {{ sidebar_width }};
}

div.sphinxsidebar {
    width: {{ sidebar_width }};
}

hr {
    border: 1px solid #B1B4B6;
}

div.body {
    background-color: #ffffff;
    color: {{ theme_body_text }};
    padding: 0 30px 0 30px;
}

div.footer {
    width: {{ page_width }};
    margin: 20px auto 30px auto;
    font-size: 14px;
    color: {{ theme_footer_text }};
    text-align: right;
}

div.footer a {
    color: {{ theme_footer_text }};
}

div.related {
    display: none;
}

div.sphinxsidebar a {
    color: {{ theme_sidebar_link }};
    text-decoration: none;
    border-bottom: 1px dotted {{ theme_sidebar_link_underscore }};
}

div.sphinxsidebar a:hover {
    border-bottom: 1px solid {{ theme_sidebar_link_underscore }};
}

div.sphinxsidebar span.pre {
    font-size: 75%;
}

div.sphinxsidebar {
    font-size: 14px;
    font-size: 1.5em;
    font-size: 1.3vw;
    line-height: 1.5;
}

div.sphinxsidebarwrapper {
    padding: 18px 10px;
}

body>p.logo {
    padding: 0;
    margin: -10px 0 0 0px;
    text-align: center;
    width: 70%;
    margin-left: 15%;
    display: none;
}

div.sphinxsidebarwrapper p.logo {
    padding: 0;
    margin: -10px 0 0 0px;
    text-align: center;
    width: 100%;
}

img.logo {
    width: 100%;
}

p.badges a {
    border-bottom: none;
    text-decoration: none;
}    

h1.logo a {
    border-bottom: none;
    text-decoration: none;
}

div.sphinxsidebarwrapper h1.logo {
    margin-top: -10px;
    text-align: center;
    margin-bottom: 5px;
    text-align: {{ theme_logo_text_align }};
    font-size: 2em;
}

div.sphinxsidebarwrapper h1.logo-name {
    margin-top: 0px;
}

div.sphinxsidebarwrapper p.blurb {
    margin-top: 0;
}

div.sphinxsidebar h3,
div.sphinxsidebar h4 {
    font-family: 'Garamond', 'Georgia', serif;
    color: {{ theme_sidebar_header }};
    font-size: 24px;
    font-weight: normal;
    margin: 0 0 5px 0;
    padding: 0;
}

div.sphinxsidebar h4 {
    font-size: 20px;
}

div.sphinxsidebar h3 a {
    color: {{ theme_sidebar_link }};
}

div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
    border: none;
}

div.sphinxsidebar p {
    color: {{ theme_sidebar_text }};
    margin: 10px 0;
}

div.sphinxsidebar ul {
    margin: 10px 0;
    padding: 0;
    color: {{ theme_sidebar_list }};
}

div.sphinxsidebar ul li.toctree-l1 > a {
    font-size: 120%;
}

div.sphinxsidebar ul li.toctree-l2 > a {
    font-size: 110%;
}

div.sphinxsidebar input {
    border: 1px solid {{ theme_sidebar_search_button }};
    font-family: 'Georgia', serif;
    font-size: 1em;
}

div.sphinxsidebar hr {
    border: none;
    height: 1px;
    color: {{ theme_sidebar_link_underscore }};
    background: {{ theme_sidebar_link_underscore }};

    text-align: left;
    margin-left: 0;
    width: 50%;
}

/* -- body styles ----------------------------------------------------------- */

a {
    color: {{ theme_link }};
    text-decoration: underline;
}

a:hover {
    color: {{ theme_link_hover }};
    text-decoration: underline;
}

div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
    font-family: 'Source Sans Pro', sans-serif;
    margin: 30px 0px 10px 0px;
    padding: 0;
}

div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }

a.headerlink {
    color: {{ theme_anchor }};
    padding: 0 4px;
    text-decoration: none;
}

a.headerlink:hover {
    color: {{ theme_anchor_hover_fg }};
    background: {{ theme_anchor_hover_bg }};
}

div.body p, div.body dd, div.body li {
    line-height: 1.4em;
}

div.admonition {
    margin: 20px 0px;
    padding: 10px 30px;
}

div.admonition tt.xref, div.admonition a tt {
    border-bottom: 1px solid #fafafa;
}

dd div.admonition {
    margin-left: -60px;
    padding-left: 60px;
}

div.admonition p.admonition-title {
    font-family: 'Garamond', 'Georgia', serif;
    font-weight: normal;
    font-size: 24px;
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1;
}

div.admonition p.last {
    margin-bottom: 0;
}

div.highlight {
    background-color: white;
}

dt:target, .highlight {
    background: #FAF3E8;
}

.highlight pre {
    border-radius: 0.3em;
    border: 3px solid {{ theme_note_border }};
    background:  #002B36;	/*solarized dark*/
}

div.note {
    background-color: {{ theme_note_bg }};
    border: 3px solid {{ theme_note_border }};
    border-radius: 0.3em;
}

div.seealso {
    background-color: #ffc;
    border: 1px solid #ff6;
}

div.topic {
    background-color: #eee;
}

p.admonition-title {
    display: inline;
}

p.admonition-title:after {
    content: ":";
}

pre, tt {
    font-family: 'Source Code Pro', 'Consolas', monospace;
}

img.screenshot {
}

tt.descname, tt.descclassname {
    font-size: 0.95em;
}

tt.descname {
    padding-right: 0.08em;
}

img.screenshot {
    -moz-box-shadow: 2px 2px 4px #eee;
    -webkit-box-shadow: 2px 2px 4px #eee;
    box-shadow: 2px 2px 4px #eee;
}

table.docutils {
    border: 1px solid #888;
    -moz-box-shadow: 2px 2px 4px #eee;
    -webkit-box-shadow: 2px 2px 4px #eee;
    box-shadow: 2px 2px 4px #eee;
}

table.docutils td, table.docutils th {
    border: 1px solid #888;
    padding: 0.25em 0.7em;
}

table.field-list, table.footnote {
    border: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

table.footnote {
    margin: 15px 0;
    width: 100%;
    border: 1px solid {{ theme_footnote_border }};
    background: {{ theme_footnote_bg }};
    font-size: 0.9em;
}

table.footnote + table.footnote {
    margin-top: -15px;
    border-top: none;
}

table.field-list th {
    padding: 0 0.8em 0 0;
}

table.field-list td {
    padding: 0;
}

table.footnote td.label {
    width: 0px;
    padding: 0.3em 0 0.3em 0.5em;
}

table.footnote td {
    padding: 0.3em 0.5em;
}

dl {
    margin: 0;
    padding: 0;
}

dl dd {
    margin-left: 30px;
}

blockquote {
    margin: 0 0 0 30px;
    padding: 0;
}

ul, ol {
    margin: 10px 0 10px 30px;
    padding: 0;
}

pre {
    background: {{ theme_pre_bg }};
    padding: 7px 30px;
    margin: 15px 0px;
    line-height: 1.3em;
}

dl pre, blockquote pre, li pre {
    margin-left: -60px;
    padding-left: 60px;
}

dl dl pre {
    margin-left: -90px;
    padding-left: 90px;
}

tt {
    background-color: #ecf0f3;
    color: #222;
    /* padding: 1px 2px; */
}

tt.xref, a tt {
    background-color: #FBFBFB;
    border-bottom: 1px solid white;
}

a.reference {
    text-decoration: none;
    border-bottom: 1px dotted {{ theme_link }};
}

a.reference:hover {
    border-bottom: 1px solid {{ theme_link_hover }};
}

a.footnote-reference {
    text-decoration: none;
    font-size: 0.7em;
    vertical-align: top;
    border-bottom: 1px dotted {{ theme_link }};
}

a.footnote-reference:hover {
    border-bottom: 1px solid {{ theme_link_hover }};
}

a:hover tt {
    background: #EEE;
}


@media screen and (max-width: 870px) {

    div.sphinxsidebar {
    	display: none;
    }

    body p.logo {
        display: block;
    }


    div.document {
       width: 100%;

    }

    div.documentwrapper {
    	margin-left: 0;
    	margin-top: 0;
    	margin-right: 0;
    	margin-bottom: 0;
    }

    div.bodywrapper {
    	margin-top: 0;
    	margin-right: 0;
    	margin-bottom: 0;
    	margin-left: 0;
    }

    ul {
    	margin-left: 0;
    }

    .document {
    	width: auto;
    }

    .footer {
    	width: auto;
    }

    .bodywrapper {
    	margin: 0;
    }

    .footer {
    	width: auto;
    }

    .github {
        display: none;
    }



}



@media screen and (max-width: 875px) {

    body {
        margin: 0;
        padding: 20px 30px;
    }

    div.documentwrapper {
        float: none;
        background: white;
    }

    div.sphinxsidebar {
        display: block;
        float: none;
        width: 102.5%;
        margin: 50px -30px -20px -30px;
        padding: 10px 20px;
        background: {{ theme_narrow_sidebar_bg }};
        color: {{ theme_narrow_sidebar_fg }};
        font-size: 1.5em;
    }

    div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
    div.sphinxsidebar h3 a {
        color: white;
    }

    div.sphinxsidebar a {
        color: {{ theme_narrow_sidebar_link }};
    }

    div.sphinxsidebar p.logo {
        display: none;
    }

    body p.logo {
        display: block;
    }

    div.document {
        width: 100%;
        margin: 0;
    }

    div.related {
        display: block;
        margin: 0;
        padding: 10px 0 20px 0;
    }

    div.related ul,
    div.related ul li {
        margin: 0;
        padding: 0;
    }

    div.footer {
        display: none;
    }

    div.bodywrapper {
        margin: 0;
    }

    div.body {
        min-height: 0;
        padding: 0;
    }

    .rtd_doc_footer {
        display: none;
    }

    .document {
        width: auto;
    }

    .footer {
        width: auto;
    }

    .footer {
        width: auto;
    }

    .github {
        display: none;
    }
}


/* misc. */

.revsys-inline {
    display: none!important;
}

/* Make nested-list/multi-paragraph items look better in Releases changelog
 * pages. Without this, docutils' magical list fuckery causes inconsistent
 * formatting between different release sub-lists.
 */
div#changelog > div.section > ul > li > p:only-child {
    margin-bottom: 0;
}
