* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*     Fonts       */

@font-face {
    font-family: notosansreg;
    src: url(../fonts/notosansreg.ttf);
}

@font-face {
    font-family: comfortaa;
    src: url(../fonts/comfortaa.ttf);
}

@font-face {
    font-family: fortuna;
    src: url(../fonts/fortunaschwein.ttf);
}

@font-face {
    font-family: nunito;
    src: url(../fonts/nunito.ttf);
}




/*       Main content       */

body {
    background-image: url("../images/bg-general3.png");
    background-repeat: no-repeat;
    background-position: center top;
    color: rgb(15,15,15);
    font-family: 'nunito', sans-serif;
    font-size: 12pt;
    font-style: normal;
    width: 100%;
}

@media screen and (min-width: 700px) {
    body {
        display: flex;
        flex-direction: column;

        align-items: center;
    }
}

h2, h3 {
    clear: both;
    font-family: 'fortuna', sans-serif;
    font-size: 24pt;
    font-weight: bold;
}

h2 { 
    margin: 0;
    padding: 0;
    text-align: center; 
    font-size: 2rem;
}

h3 {
    font-family: 'comfortaa', sans-serif;
    text-align: center;
    font-size: 18pt;
    margin: 20px 0 0 20px;
    padding: 5px 0;
}

h4 {
    padding: 10px 0;
    font-size: 1.25rem;
}

p {
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

a {
    color: #000;
    text-decoration: none;
}

a:hover, a:active {
    font-weight: bold;
}





/* --- HEADER --- */

.hero { width: 100%; }

@media screen and (min-width: 700px) {
    .hero { max-width: 700px; }

    header { text-align: center; }
    
    #header-wrapper {
        grid-area: header-area;
        max-width: 1000px;
    }
}




/* --- FORM --- */

#container {
    background-color: rgba(255,255,255, 0.6);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    min-width: 350px;
    margin-bottom: 30px;
    width: 100%;
}

@media screen and (min-width: 700px) {
    #container { width: 850px; }
}

#search-wrapper { margin: 1rem; }

@media screen and (min-width: 700px) {
    #search-wrapper { max-width: 800px; }

    form {
        grid-area: form-area;
        display: block;
        grid-template-areas: 
            'names names dataset'
            'opened closed type'
            'incukndate incukndate type'
            'buttons buttons buttons';
        
        grid-gap: 1rem;
    }
}

fieldset {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    border: 0;
}

label { 
    padding: 0.5rem 0;
    font-weight: bold; 
}

input, select {
    padding: 1rem 0.25rem;
    font-size: 1rem;
    border-radius: 5px;
}

select#type {
    padding-top: 0;
    padding-bottom: 0;
}

input { padding-left: 0.5rem; }

input#name { width: 100%; }

.search-button {
    margin: 0 auto;
    padding: 5px;
    font-size: 0.9em;
    text-align: center;
    width: 100%;
}

@media screen and (min-width: 700px) {
    input, option, select { 
        padding: 0.25rem; 
    }

    #name-field { grid-area: names; }

    #dates-field {
        display: flex;
        justify-content: space-between;

        margin: -20px auto;
        width: 400px;
    }

    #datagroup-field { grid-area: dataset; }
    
    #datagroup { min-width: 200px; }

    .type-field { grid-area: type; }

    #opened-field { 
        grid-area: opened; 
        text-align: center;
        justify-self: center;
    }

    #closed-field { 
        grid-area: closed; 
        text-align: center;
        justify-self: center;
    }

    #incunkdate-field { 
        /* grid-area: incukndate; */
        width: 400px; 
        margin: 0 auto; 
        justify-content: center;
    }

    .search-button {
        width: auto;
    }
}

.year-field { width: 100%; }

@media screen and (min-width: 700px) {
    .year-field { height: 30px; }
}

.year-range {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 2rem 3.5rem;
}

@media screen and (min-width: 700px) {
    .year-range { justify-content: space-between; }
}

.year-range label { grid-column: 1 / -1; }

.year-range select { grid-column: span 2; }

.year-range p {
    text-align: center;
    font-size: 2rem;
    align-self: center;
}

@media screen and (min-width: 700px) {
    .year-range p {
        padding: 0;
        font-size: 1.5rem;
    }
}

.cbox {
    flex-direction: row;
    flex-wrap: nowrap;
}

.cbox input {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
}

@media screen and (min-width: 700px) {
    #button-field { grid-area: buttons; }
}

.submit-area {
    flex-direction: row;
    justify-content: space-evenly;
}

.submit-area>* {
    background: transparent;
    border-color: #777;
    padding: 0.5rem;
    width: 10rem;
}

.search-btn { background: #cfcfcf; }







/* --- RESULTS --- */

#results-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

@media screen and (min-width: 700px) {
    #results-header {
        display: flex;
        flex-direction: row;
    }
}

#results-header>* { padding: 0.25rem 1rem; }

#sort-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    text-align: left;
    margin: 0;
    width: 400px;
}

.sort-link {
    cursor: pointer;
    border-right: 1px solid black; 
    padding: 0 5px;
}

@media screen and (min-width: 700px) {
    #results-header h2 {
        grid-column: 1 / -1;
        margin: 0;
    }

    #sort-links, .sort-link {
        display: none;
    }
}

.arrow {
    margin-left: 2px;
    width: 10px;
    height: 10px;
}

#result-head { display: none; }

@media screen and (min-width: 700px) {
    #result-head {
        display: block;
        display: grid;
        grid-template-columns: repeat(10, 1fr);
        align-content: flex-start;
        padding: 0.5rem 1rem;
        font-weight: bold;
    }

    #result-head .result-title { font-weight: bold; }
}

.result-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #ddd;
}

@media screen and (min-width: 700px) {
    .result-card {
        display: grid;
        grid-template-columns: repeat(10, 1fr);
        align-content: flex-start;
        grid-gap: 1rem;
    }
}

.result-card:nth-child(2n) { background: #bbb; }

.result-card>* {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.result-title {
    font-size: 1.1rem;
    font-weight: bold;
}

@media screen and (min-width: 700px) {
    .result-title {
        grid-column: 1 / 3;
        font-size: 1rem;
        font-weight: normal;
        padding: 0;
    }
}

.result-title a:hover, 
.result-title a:active {
    color: #096a9d;
}

@media screen and (min-width: 700px) {
    .result-title a:hover, 
    .result-title a:active {
        color: #000;
    }
}

.sort-header {
    float: left;
    cursor: pointer;
    padding-right: 5px;;
}

#result-aka {
    margin-top: -0.25rem;
    padding-top: 0;
    font-size: 0.85rem;
}

@media screen and (min-width: 700px) {
    #result-aka {
        grid-column: 3 / 5;
        font-size: 1rem;
        padding: 0;
        margin: 0;
        line-height: 1.3;
    }
}

.aka {
    display: block;
    float: left;
    padding-right: 5px;
}

@media screen and (min-width: 700px) {
    .aka { display: none; }
}

#result-type {
    /* display: flex; */
    flex-wrap: wrap;
}

@media screen and (min-width: 700px) {
    #result-type {
        grid-column: 5 / 7;
        padding: 0;
    }
}

#result-type p {
    display: inline-block;
    overflow: hidden;
    background: #ccc;
    color: #000;
    margin-left: 0;
    margin-right: 0.25rem;
    border-radius: 5px;
    padding: 0.25rem 0.35rem;
    text-align: left;
    font-size: 0.75rem;
    height: fit-content;
}

#result-dates { display: block; }

@media screen and (min-width: 700px) {
    #result-dates { display: none; }
}

#result-open, 
#result-close { 
    display: none;
}

@media screen and (min-width: 700px) {
    #result-open, #result-close { 
        display: block;
        padding: 0;
        min-width: 125px;
    }
    
    #result-open { grid-column: 7 / 8; }
    
    #result-close { grid-column: 8 / 9; }

    #result-notes {
        grid-column: 9 / -1;
        padding: 0;
        margin: 0;
    }
}

.type-field {
    display: flex;
    flex-direction: column;
}

#pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    margin: 0 auto;
    padding-bottom: 30px;
    max-width: 200px;
}

.page-arrow {
    cursor: pointer;
    background-color: #cfcfcf;
    text-align: center;
    margin: 5px;
    width: 25px;
    height: 25px;
}


/* --- FOOTER --- */

.about-link { 
    padding: 0 0 25px 0;
    text-align: center; 
}

@media screen and (min-width: 700px) {
    footer { grid-area: footer; }
}

footer p {
    font-size: 0.75rem;
    text-align: center;
    width: 100%;
}

.update { font-size: 9pt; }


/*   Info Pages   */

#info {
    background-color: rgba(255,255,255,0.75);
    margin: 20px auto;
    border-radius: 5px;
    padding: 2px;
    width: 100%;
}

@media screen and (min-width: 550px) {
    #info { width: 850px; }
}

.all-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 25px;
    
    margin: 0 auto;
    border-top: 1px dashed #000;
    border-bottom: 1px solid darkgray;
    padding: 30px;
    width: 100%;
}

.info-block {
    display: flex;
    flex-direction: column;

    line-height: 1.5;
    width: 100%;
}

@media screen and (min-width: 550px) {
    .info-block { max-width: 45%; }
}

.row {
    flex-direction: row;
    gap: 5px;
    align-items: center;
}

.spread { min-width: 100%; }

.info-block ul { list-style: none; }

#return-to-search {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
    
    margin: 5px auto;
    width: 80%;
}

@media screen and (min-width: 550px) {
    #return-to-search { 
        flex-direction: row; 
        width: 400px;
    }
}

.back-to-search, 
.back-to-search:hover, 
.back-to-search a:hover {
    background: #ccc;
    color: #222;
    margin: 5px auto;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 11pt;
    text-align: center;
    width: 100%;
}

@media screen and (min-width: 550px) {
    .back-to-search, 
    .back-to-search:hover, 
    .back-to-search a:hover { width: 160px; }
}

.back-to-search:hover, 
.back-to-search a:hover {
    border-radius: 5px;
    font-weight: bold;
}

.back-to-search a {
    border-radius: 5px;
    width: 100%;
}

#doc-wrapper {
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
}

section {
    padding-top: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid gray;
}

section p { text-align: left; }

section ul {
    padding-left: 50px;
    list-style: circle;
    font-size: 0.9rem;
}

section .endpoint h5 { font-size: 1.1rem; }

section p { padding-left: 0; }

code { font-weight: bold; }

section code em { color: #0078d7; }

section .endpoint { padding-bottom: 30px; }

.copy-text {
    background-color: #dfdfdf;
    padding: 20px;
    border-radius: 5px;
}

.copy-text code {
    font-weight: normal;
    font-size: 0.9rem;
}

tr { vertical-align: top; }

td {
    margin: 0;
    border: 1px solid lightgray;
    padding: 5px; 
}

.key-block { padding: 8px 0; }

.key-block p { padding: 2px 0; }

#keys-desktop { display: none; }

@media screen and (min-width: 700px) {
    #keys-desktop { display: block; }
}

#keys-mobile { display: block; }

@media screen and (min-width: 700px) {
    #keys-mobile { display: none; }
}

#dup-notice {
    font-size: 10pt;
    margin: 25px; 
}

.center { text-align: center; }


