/* disable "error" border in code -- see https://github.com/sagemathinc/cocalc-doc/issues/10 */
.highlight .err {
    border: none !important;
}

/* theme cocalc */
div.wy-side-nav-search {
    background-color: #4474c0;
    background-image: linear-gradient(
        to bottom,
        #4474c0 0%,
        #4474c0 33%,
        #343131 100%
    );
}

nav.wy-nav-top {
    background: #4375c1;
}

/* Accessibility: improve masthead contrast */
.wy-side-nav-search > a.icon-home {
    color: #FFFFFF;
}

.wy-side-nav-search .cocalc-header {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    color: #FFFFFF;
}

.wy-side-nav-search .cocalc-header a {
    color: #FCD180;
}

/* Accessibility: deepen inline link color for WCAG contrast */
.rst-content a {
    color: #2468A6;
}

/* Distinguish visited links while preserving sufficient contrast */
.rst-content a:visited {
    color: #A86FBF;
}

/* Keep hover color stable and add underline for clarity */
.rst-content a:hover,
.rst-content a:focus,
.wy-side-nav-search .cocalc-header a:hover,
.wy-side-nav-search .cocalc-header a:focus {
    text-decoration: underline;
}

/* Accessibility: darken inline code for WCAG contrast */
.rst-content tt,
.rst-content code,
.rst-content tt.literal,
.rst-content code.literal {
    color: #C43734;
}

/* Accessibility: accentuate title bar gradient without changing body */
.rst-content .danger .admonition-title,
.rst-content .error .admonition-title,
.rst-content .wy-alert-danger .admonition-title,
.wy-alert.wy-alert-danger .wy-alert-title {
    background-color: #E02D1C;
    background-image: linear-gradient(to right, #E02D1C 0%, #E02D1C 10%, #F29F97 30%, #F29F97 100%);
}

.rst-content .warning .admonition-title,
.rst-content .caution .admonition-title,
.rst-content .attention .admonition-title,
.rst-content .wy-alert-warning .admonition-title,
.wy-alert.wy-alert-warning .wy-alert-title {
    background-color: #B35F15;
    background-image: linear-gradient(to right, #B35F15 0%, #B35F15 10%, #F0B37E 30%, #F0B37E 100%);
}

.rst-content .note .admonition-title,
.rst-content .admonition-mission .admonition-title,
.rst-content .seealso .admonition-title,
.rst-content .wy-alert-info .admonition-title,
.wy-alert.wy-alert-info .wy-alert-title {
    background-color: #277BB2;
    background-image: linear-gradient(to right, #277BB2 0%, #277BB2 10%, #6AB0DE 30%, #6AB0DE 100%);
}

.rst-content .hint .admonition-title,
.rst-content .important .admonition-title,
.rst-content .tip .admonition-title,
.rst-content .wy-alert-success .admonition-title,
.wy-alert.wy-alert-success .wy-alert-title {
    background-color: #12846E;
    background-image: linear-gradient(to right, #12846E 0%, #12846E 10%, #1ABC9C 30%, #1ABC9C 100%);
}

footer {
    color: #595959;
}

footer span.commit code,
footer span.commit tt {
    color: #595959;
}

.wy-menu-vertical li.current > a {
    background-color: #e6eef7;
}

.wy-menu-vertical li.toctree-l2.current > a {
    background-color: #b0bed1;
}

/* role: strike and :strike:`...` */
span.strike {
    text-decoration: line-through;
}

p.blurb {
    font-weight: bold;
}

div.sphinxsidebar p.caption,
div.body p.caption {
    margin: 20px 0 -10px 0;
}

div.sphinxsidebar h3 {
    font-size: 18px;
}

/* https://github.com/sagemathinc/cocalc-doc/issues/4 */
dl dd {
    margin-left: 0px;
}

img.img.section {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* 4 space indented lines are blockquotes. we make them stick out a bit more */
.rst-content blockquote {
    border-left: 2px solid #d9d9d9;
    padding-left: 10px;
    font-style: italic;
    color: #6d6d6d;
}

/* adjust spacing in lists, default 1.4em */
div.body li {
    line-height: 1.6em;
}

div.contents ul ul {
    margin-top: 0;
}

div.section a.internal.image-reference > img {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.24);
}

div.section a.internal.image-reference > img:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.22);
}

/* otherwise index entries are too close together */
table.indextable.genindextable td > ul > li {
    line-height: 20pt;
}

.wy-breadcrumbs-aside > a {
    position: relative;
    z-index: 3000;
}

a.cocalcbanner {
    position: fixed;
    top: 0;
    right: 0;
    width: 75px;
    height: 75px;
    border: 0;
    display: block;
    z-index: 2000;
}

a.cocalcbanner img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media screen and (max-width: 875px) {
    /* not for the RTD theme */
    /* body {
        margin: 0;
        padding: 10px;
    } */
    div:not(.rst-content) > div.document {
        width: 100%;
    }
    a.cocalcbanner {
        display: none;
    }
}

@media screen and (min-width: 875px) {
    div:not(.rst-content) > div.document {
        width: 1040px;
    }
    .wy-nav-content {
        max-width: 1000px;
    }
}
