/**
 * Copyright 2013 The Rust Project Developers. See the COPYRIGHT
 * file at the top-level directory of this distribution and at
 * http://rust-lang.org/COPYRIGHT.
 *
 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 * option. This file may not be copied, modified, or distributed
 * except according to those terms.
 */
@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
}
@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 500;
    src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
}
@font-face {
    font-family: 'Source Serif Pro';
    font-style: normal;
    font-weight: 400;
    src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
}
@font-face {
    font-family: 'Source Serif Pro';
    font-style: italic;
    font-weight: 400;
    src: url("Heuristica-Italic.woff") format('woff');
}
@font-face {
    font-family: 'Source Serif Pro';
    font-style: normal;
    font-weight: 700;
    src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
}
@font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 400;
    src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
}
@font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 600;
    src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
}

@import "normalize.css";

* {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

/* General structure and fonts */

/* base color defines */
:root {
    --clr-light-main: #fff;
    --clr-light-searchbox-back: #fff;
    --clr-light-searchbox-text: #555;
    --clr-light-element-highlight: #F5F5F5;
    --clr-light-current-selection: #8c6067;
    --clr-light-table-border: #ddd;
    --clr-light-table-header: #f5f5f5;
    --clr-light-table-nth: #f9f9f9;
    --clr-light-content-highlight: #c6afb3;
    
    --clr-dark-main: #333;
    --clr-dark-searchbox-back: #2f2f2f;
    --clr-dark-searchbox-text: #fff;
    --clr-dark-element-highlight: #2d2d2d;
    --clr-dark-current-selection: #4d76ae;
    --clr-dark-table: #2f2f2f;
    --clr-dark-table-border: #444;
    --clr-dark-table-header: #3a3a3a;
    --clr-dark-table-nth: #333;
    --clr-dark-content-highlight: #d5eeff;
}

body {
    background-color: var(--clr-light-main);
    color: var(--clr-dark-main);
    min-width: 500px;
    font: 16px/1.4 "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    position: relative;
    padding: 10px 15px 20px 15px;
    transition: background-color 0.3s, color 0.3s;
}

h1 {
    font-size: 1.5em;
}

h2 {
    font-size: 1.4em;
}

h3 {
    font-size: 1.3em;
}

h1, h2, h3:not(.impl):not(.method), h4:not(.method) {
    color: var(--clr-dark-main);
    font-weight: 500;
    margin: 20px 0 15px 0;
    padding-bottom: 6px;
}

h1.fqn {
    border-bottom: 1px dashed #D5D5D5;
    margin-top: 0;
}

h2, h3:not(.impl):not(.method), h4:not(.method) {
    border-bottom: 1px solid #DDDDDD;
}

h3.impl, h3.method, h4.method {
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 10px;
}

h3.impl, h3.method {
    margin-top: 15px;
}

h1, h2, h3, h4, section.sidebar, a.source, .search-input, .content table a, .collapse-toggle {
    font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

ol, ul {
    padding-left: 25px;
}

ul ul, ol ul, ul ol, ol ol {
    margin-bottom: 0;
}

p {
    margin: 0 0 .6em 0;
}

code, pre {
    font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
    white-space: pre-wrap;
}

.docblock code {
    background-color: var(--clr-light-element-highlight);
    border-radius: 4px;
    transition: background-color 0.3s;
}

pre {
    background-color: var(--clr-light-element-highlight);
    margin: 0px 0px;
}

.source pre {
    padding: 20px;
}

.content.source {
    margin-top: 50px;
    max-width: none;
    overflow: visible;
    margin-left: 0px;
    min-width: 70em;
}

nav.sub {
    font-size: 16px;
    text-transform: uppercase;
    flex-flow: row nowrap;
    display: flex;
}

.sidebar {
    width: 200px;
    position: absolute;
    left: 0;
    top: 0;
    min-height: 100%;
}

.content, nav { max-width: 80vw; }

.docblock .table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
}

.docblock table {
    max-width: 50vw;
    border-collapse: collapse !important;
    table-layout: auto;
    margin-bottom: 20px;
    font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.docblock th, .docblock td {
    padding: 10px;
    text-align: left;
    border: 1px solid var(--clr-light-table-border);
    white-space: nowrap;
}

.docblock th {
    background-color: var(--clr-light-table-header);
    font-weight: bold;
}

.docblock tr:nth-child(even) {
    background-color: var(--clr-light-table-nth);
}

.docblock th, .docblock td, .docblock tr {
    transition: background-color 0.3s;
}

/* Everything else */

.js-only, .hidden { display: none; }

.sidebar {
    padding: 10px;
}
.sidebar img {
    margin: 20px auto;
    display: block;
}

.sidebar .location {
    font-size: 17px;
    margin: 30px 0 20px 0;
    background: #e1e1e1;
    text-align: center;
    color: #333;
}

.block {
    padding: 0 10px;
    margin-bottom: 14px;
}

.block h2 {
    margin-top: 0;
    margin-bottom: 8px;
    text-align: center;
}

.block a {
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 15px;
    padding: 7px 5px;
    font-size: 14px;
    font-weight: 300;
    transition: border 500ms ease-out;
}

.block a:hover {
    background: var(--clr-light-element-highlight);
}

.content {
    padding: 15px 0;
}

.content.source pre.rust {
    white-space: pre;
    overflow: auto;
    padding-left: 0;
}
.content pre.line-numbers { float: left; border: none; }
.line-numbers span { color: #c67e2d; }
.line-numbers .line-highlighted {
    background-color: #f6fdb0;
}

.docblock.short.nowrap {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.docblock.short p {
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.docblock.short code { white-space: nowrap; }

.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
    border-bottom: 1px solid #DDD;
}

.docblock h1 { font-size: 1.3em; }
.docblock h2 { font-size: 1.15em; }
.docblock h3, .docblock h4, .docblock h5 { font-size: 1em; }

.content .out-of-band {
    float: right;
    font-size: 23px;
}

.content table {
    border-spacing: 0 5px;
    border-collapse: separate;
}
.content td { vertical-align: top; }
.content td:first-child { padding-right: 20px; }
.content td p:first-child { margin-top: 0; }
.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }

.content .item-list {
    list-style-type: none;
    padding: 0;
}

.content .item-list li { margin-bottom: 3px; }

.content .multi-column {
    -moz-column-count: 5;
    -moz-column-gap: 2.5em;
    -webkit-column-count: 5;
    -webkit-column-gap: 2.5em;
    column-count: 5;
    column-gap: 2.5em;
}
.content .multi-column li { width: 100%; display: inline-block; }

.content .method {
    font-size: 1em;
    position: relative;
}
.content .methods .docblock { margin-left: 40px; }

.content .impl-methods .docblock { margin-left: 40px; }

nav {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
nav.main {
    padding: 20px 0;
    text-align: center;
}
nav.main .current {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
}
nav.main .separator {
    border: 1px solid #000;
    display: inline-block;
    height: 23px;
    margin: 0 20px;
}
nav.sum { text-align: right; }

nav, .content {
    margin-left: 230px;
}

a {
    text-decoration: none;
    color: var(--clr-dark-main);
    background: transparent;
}
p a { color: #4e8bca; }
p a:hover { text-decoration: underline; }

.content a.trait, .block a.current.trait { color: #ed9603; }
.content a.mod, .block a.current.mod { color: #4d76ae; }
.content a.enum, .block a.current.enum { color: #5e9766; }
.content a.struct, .block a.current.struct { color: #e53700; }
.content a.fn, .block a.current.fn { color: var(--clr-light-current-selection); }
.content .fnname { color: var(--clr-light-current-selection); }

.search-form {
    position: relative;
    display: flex;
    flex-grow: 1;
}

.search-input {
    /* Override Normalize.css: we have margins and do
     not want to overflow - the `moz` attribute is necessary
     until Firefox 29, too early to drop at this point */
    -moz-box-sizing: border-box !important;
    box-sizing: border-box !important;
    outline: none;
    border: none;
    border-radius: 1px;
    color: var(--clr-light-searchbox-text);
    background-color: var(--clr-light-searchbox-back);
    margin-top: 5px;
    padding: 10px 16px;
    font-size: 17px;
    box-shadow: 0 0 0 1px rgba(224, 224, 224, 1), 0 0 0 2px transparent;
    transition: border-color 300ms ease;
    transition: border-radius 300ms ease-in-out;
    transition: box-shadow 300ms ease-in-out;
    transition: background-color 0.3s, color 0.3s;
    flex-grow: 1;
    height: 35px;
}

.search-input:focus {
    border-radius: 2px;
    border: 0;
    outline: 0;
    box-shadow: 0 0 0 1px rgba(224, 224, 224, 0.5), 0 0 8px 2px #078dd8;
}

.search-results .desc {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
}

tr.result:hover {
    background-color: var(--clr-light-element-highlight);
}

.toggle-container {
    margin: auto;
    text-align: center;
    height: 25px;
    width: 35px;
}

.stability {
    border-left: 6px solid;
    padding: 3px 6px;
    border-radius: 3px;
}

h1 .stability {
    text-transform: lowercase;
    font-weight: 400;
    margin-left: 14px;
    padding: 4px 10px;
}

.impl-methods .stability, .methods .stability {
    margin-right: 20px;
}

.stability.Deprecated { border-color: #A071A8; color: #82478C; }
.stability.Experimental { border-color: #D46D6A; color: #AA3C39; }
.stability.Unstable { border-color: #D4B16A; color: #AA8439; }
.stability.Stable { border-color: #54A759; color: #2D8632; }
.stability.Frozen { border-color: #009431; color: #007726; }
.stability.Locked { border-color: #0084B6; color: #00668c; }
.stability.Unmarked { border-color: #BBBBBB; }

.summary {
    padding-right: 0px;
}
.summary.Deprecated { background-color: #A071A8; }
.summary.Experimental { background-color: #D46D6A; }
.summary.Unstable { background-color: #D4B16A; }
.summary.Stable { background-color: #54A759; }
.summary.Unmarked { background-color: #BBBBBB; }

:target { background: #FDFFD3; }

/* Code highlighting */
pre.rust .kw { color: #8959A8; }
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
pre.rust .number, pre.rust .string { color: #718C00; }
pre.rust .self, pre.rust .boolval, pre.rust .prelude-val,
pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
pre.rust .comment { color: #8E908C; }
pre.rust .doccomment { color: #4D4D4C; }
pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
pre.rust .lifetime { color: #B76514; }

.rusttest { display: none; }
pre.rust { position: relative; }
.test-arrow {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 150%;
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}

.methods .section-header {
    /* Override parent class attributes. */
    border-bottom: none !important;
    font-size: 1.1em !important;
    margin: 0 0 -5px;
    padding: 0;
}
.section-header:hover a:after {
    content: '\2002\00a7\2002';
}

/* Media Queries */

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }

    nav, .content {
        margin-left: 0px;
        max-width: 100vw;
    }
}

.collapse-toggle {
    font-weight: 100;
    position: absolute;
    left: 13px;
    color: #999;
    margin-top: 2px;
}

.toggle-wrapper > .collapse-toggle {
    left: -24px;
    margin-top: 0px;
}

.toggle-wrapper {
    position: relative;
}

.toggle-wrapper.collapsed {
    height: 1em;
    transition: height .2s;
}

.collapse-toggle > .inner {
    display: inline-block;
    width: 1ch;
    text-align: center;
}

.toggle-label {
    color: #999;
    font-style: italic;
}

/* dark mode */

.dark-mode body {
    background-color: var(--clr-dark-main);
    color: var(--clr-light-main);
}

.dark-mode h1 {
    color: var(--clr-light-main);
}

.dark-mode h2 {
    color: var(--clr-light-main);
}

.dark-mode h3 {
    color: var(--clr-light-main);
}

.dark-mode h4 {
    color: var(--clr-light-main);
}

.dark-mode .docblock code {
    background-color: var(--clr-dark-element-highlight);
}

.dark-mode pre {
    background-color: var(--clr-dark-element-highlight);
}

.dark-mode .docblock table {
    background-color: var(--clr-dark-table);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .docblock th, .dark-mode .docblock td {
    border: 1px solid var(--clr-dark-table-border);
}

.dark-mode .docblock th {
    background-color: var(--clr-dark-table-header);
}

.dark-mode .docblock tr:nth-child(even) {
    background-color: var(--clr-dark-table-nth);
}

.dark-mode .block a:hover {
    background: var(--clr-dark-element-highlight);
}

.dark-mode a {
    color: var(--clr-light-main);
}

.dark-mode p a { color: #4e8bca; }

.dark-mode .content a.fn, .dark-mode .block a.current.fn { color: var(--clr-dark-current-selection); }
.dark-mode .content .fnname { color: var(--clr-dark-current-selection); }

.dark-mode :target { background: var(--clr-dark-current-selection); }

.dark-mode .search-input {
    color: var(--clr-dark-searchbox-text);
    background-color: var(--clr-dark-searchbox-back);
}

.dark-mode tr.result:hover {
    background-color: var(--clr-dark-element-highlight);
}

.sun-icon, .moon-icon {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.moon-icon {
    display: none;
}

.dark-mode .sun-icon {
    display: none;
}

.dark-mode .moon-icon {
    display: inline-block;
}