@import url("reset.css");
/* Google web fonts for headers (Biorhyme) and body (Lato) */
@import url('https://fonts.googleapis.com/css?family=BioRhyme|Lato&subset=latin-ext');

html {
    font-size: 16px;
    font-family: 'Lato', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background-color: #fffff0;
    color: #262626;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'BioRhyme', serif;
}

h1 {
    font-size: 2.8rem;
}
h2 {
    font-size: 2.3rem;
}
h3 {
    font-size: 1.8rem;
}
h4 {
    font-size: 1.3rem;
}


a {
    color: #8a0f0f;
}

a:visited {
    color: #600000;
    font-size: 1.5em;
}

a:hover {
    color: #ff531a;
}

nav#mainnav {
    width: 100%;
    height: 3em;
    background-color: #8a0f0f;
    color: #eee;
}

nav ul,
footer ul {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    vertical-align: middle;
    height: 100%;
    text-align: center; 
}

nav li,
footer li {
    font-family: 'BioRhyme', serif;
    margin: auto;
}

nav#mainnav a {
    color: #eee;
    text-decoration: none;
}

nav#mainnav a:visited {
    color: #eee;
    text-decoration: none;
}

nav#mainnav a:hover {
    color: #ff531a;
    text-decoration: none;
}

nav.breadcrumb {
    display: inline-flex;
    flex-direction: row;
    margin-left: 1.5em;
    background-color: #fffff0;
    padding: 1.5em;
}

nav.breadcrumb li.spacer {
    font-size: 1.5em;
    margin-left: 0.5em;
    margin-right: 0.5em;
}

#content {
    flex: 1;
    background-color: #8a0f0f;
}

section {
    padding: 0.5rem;
}


/* Wagtail CSS to make images fit their container */
.rich-text img {
    max-width: 100%;
    height: auto;
}

.responsive-object {
    position: relative;
}

.responsive-object iframe,
.responsive-object object,
.responsive-object embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
article {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    padding: 2rem;
    background-color: #fffff0;
}

article.freeform {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

article.freeform h1,h2,h3,h4,h5,h6 {
    width: 100%;
}

article.freeform img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

article.freeform .freeform-block {
    width: 75%;
}

footer {
    width: 100%;
    height: 4em;
    background-color: #8a0f0f;
    color: #eee;
    display: flex;
    text-align: center;
}

footer li {
    padding-left: 2rem;
    margin: auto;
}
footer img {
    height: 3em;
}
b {
    font-weight: bold;
}
p {
    margin: 1rem;
}

.mobile {
    display: none;
}
.rich-text ul {
    list-style: initial;
    padding-left: 2rem;
}
/* Styling for cultivar list attribtes */
.cultivar dd, .cultivar li {
    padding-left: 2rem;
}

.cultivar dt {
    font-weight: bold;
}

article.cultivar {
    display: flex;
    flex-wrap: wrap;
}

img.cultivar {
    max-width: 100%;
    min-width: 200px;
}

article.cultivar > #data {
    width: 40%;
}

article.cultivar > h1,
article.cultivar > #citation {
    width: 100%;
}
.infobox {
    background: white;
    box-shadow: 2px 2px 2px 1px;
    padding: 2rem;
    width: 80%;
    margin: auto;
}

/* Correlation grid stuff */
#tablewrapper {
    max-width: 80vw;
    max-height: 80vh;
    overflow: scroll;
    margin: auto;
}
#correlationgrid {
    table-layout: fixed;
    width: 100%;
}
thead tr {
    display:block;
    position: sticky;
    top: 0;
    font-weight: initial;
    background-color: #fffff0;
}

td, th {
    padding: 1em;
    border: 2px solid transparent;
    text-align: center;
    min-width: 6rem;
    max-width: 6rem;
}
td.value {
    font-weight: bold;
}
td[data-col="0"] {
    /* This is getting a bit ahead of what is strictly in wide use, but it's at 90% in US
     * folks will catch up, and the failure case isn't bad. */
    position: sticky;
    left: 0;
    background-color: #fffff0;
}
tbody {
    display: block;
}

form#updater {
    padding: 1em;
    text-align: center;
}
.cultivar-group {
    width: 20%;
    margin-bottom: 1em;
}
.cultivar-group li {
    font-size: 1.5em;
    padding: 0.25em;
}
#cultivars-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

/* Search stuff */
#id_description {
    width: 100%;
}
#search-submit, #toggle-tags {
    margin: 0.5rem;
}
#tag-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.tag-filter {
    width: 10em;
}
.tag-filter > select {
    width: 80%;
}
.hidden {
    display: none !important;
}

@media (max-width: 900px) and (min-width: 720px) {
    .cultivar-group {
        width: 33%;
    }
}

@media (max-width: 720px) and (min-width: 500px) {
    .cultivar-group {
        width: 50%;
    }
}
@media (max-width: 500px) {
    .cultivar-group {
        width: 100%;
    }
}

@media (max-width: 720px) {
   .mobile {
        display: inline;
    }

    .full {
        display: none;
    }
    article {
        margin-left: 0;
        margin-right: 0;
    }
    article.cultivar > #data {
        width: 100%
    }
    #content {
        padding: 0;
    }
    nav.breadcrumb {
        margin-left: 0;
    }
}

