html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 14pt;
}

body {
    --bg-light: #eeeeee;
    --link-light: white;
    --text-light: white;
    --link-dark: #3b7dc5;
    --bg-dark: #323232;
    --text-dark: #1f1f1f;
    --text-mid: #666666;
    --highlight-color: #aa1111;
    --highlight-hover-color: #d81f1f;
    --published-color: #3b7dc5;
    --draft-color: #ffd530;
    --review-color: #a080ff;
    --rejected-color: #aa1111;

    font-family: Arial, Helvetica, "Nimbus Sans L", sans-serif;
    line-height: 1.35;
    color: var(--text-dark);
}

button, input, select, option, textarea, ::file-selector-button { font-size: 1rem; }
textarea { font-family: inherit; }

a { color: var(--link-dark); }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { text-decoration: none; }
header a:not(:hover), footer a:not(:hover), header input[type="submit"].link-button:not(:hover), footer input[type="submit"].link-button:not(:hover) {
    text-decoration: none;
}
.inline-delimited form { display: inline; }

button, input[type="submit"]:not(.link-button), ::file-selector-button {
    box-sizing: border-box;
    border: 0;
    padding: 0.5rem 1rem;
    background-color: var(--highlight-color);
    color: var(--text-light);
    cursor: pointer;
}
button:hover, input[type="submit"]:not(.link-button):hover, ::file-selector-button:hover {
    background-color: var(--highlight-hover-color);
}
input:not(.link-button):not([type="file"]):not([type="submit"]), select {
    box-sizing: border-box;
    padding: 0.5rem;
}
input[type="submit"].link-button { 
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--link-dark);
    text-decoration: underline;
    cursor: pointer; 
}

header h1 {
    margin: 0;
    font-size: 18pt;
}
@media (max-width: 1500px) {
    header h1 { max-width: 24rem; }
}
header h1 a {
    color: var(--text-light);
}
header h1 a:hover {
    color: var(--link-light);
}

main section > h2:not(:first-child) { margin-top: 3rem !important; }
main section > h3:not(:first-child) { margin-top: 2rem !important; }
main section > h4:not(:first-child) { margin-top: 1rem !important; }

h4 { margin: 0.5rem 0; }

blockquote, .entry-meta {
    padding: 1rem;
    box-sizing: border-box;
    background-color: var(--bg-light);
}

kbd {
    font-family: monospace;
    background-color: var(--bg-light);
    padding: 0 0.25rem;
    border-radius: 0.25rem;
    white-space: pre;
}

.row, .row-eq, .text-row {
    display: flex;
    flex-direction: row;
    align-self: stretch;
    gap: 0.5rem;
}
.row-eq > * {
    flex-basis: 0;
    flex-grow: 1;
}
.text-row {
    align-items: baseline;
}

.column {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 0.5rem;
}

main { flex-grow: 1; }
header, footer, section { padding: 1em; }

header, footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
}
header a, footer a, header input[type="submit"].link-button, footer input[type="submit"].link-button {
    color: var(--link-light);
}

main section > *:not(table.entries) {
    width: 40rem;
    margin: 0.5rem auto;
}
main section > table.entries {
    max-width: min(55rem, 95vw);
    margin: 0.5rem auto;
}

.video-embed iframe {
    width: 40rem;
    height: 22.5rem;
}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
#welcome { flex-grow: 1; }
#welcome > .inline-delimited { justify-content: end; }

#splash {
    position: relative;
    padding: 3rem;
    color: var(--text-light);
    font-size: 15pt;
}
#splash::before {
    content: "";
    position: absolute !important;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #373737;
    background-image: url('/static/swansea-university-library.jpg');;
    background-size: cover;
    filter: contrast(20%) brightness(40%);
}
#splash > * {
    position: relative;
}
#splash_form_container {
    margin-top: 3rem;
    padding: 1rem;
    border-radius: 1rem;
    background-color: white;
    color: var(--text-dark);
}

#logo_arwap {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}
#logo_arwap > img {
    max-width: min(40rem, 75vw);
}
#logos {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

footer {
    justify-content: center;
}

table { border-collapse: collapse; }
table th, table td { text-align: left; padding: 0.5rem; }
table th { white-space: nowrap; }
table th:not(:last-child), table td:not(:last-child) {
    padding-right: 1rem;
}
table thead tr { border-bottom: 2px solid var(--bg-dark); }
table tbody tr { border-bottom: 1px solid var(--bg-dark); }

.inline-delimited {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    flex-direction: row;
}
.inline-delimited > :not(:first-child)::before {
    content: '·';
    margin: 0 0.5rem;
}

.entry-summary {
    padding: 0.5rem;
    border-width: 1px 1px 1px 0.5rem;
    border-style: solid;
}
.entry-summary.published { border-color: var(--published-color); }
.entry-summary.rejected { border-color: var(--rejected-color); }
.entry-summary.draft { border-color: var(--draft-color); }
.entry-summary.review { border-color: var(--review-color); }

form label { display: block; }
form .error { color: red; }
input#entry_title, input#entry_author, input#entry_cite_as, input#entry_doi, input#entry_external_url, textarea#entry_text { width: 100%; }
textarea#entry_text { min-height: 15rem; }
input#search_q { flex-grow: 1; }

.entry-category { text-align: center; text-wrap: nowrap;}
.entry-category .icon { font-size: 28pt; color: var(--highlight-color); }
.file-attachment { align-items: center; }
.file-attachment .icon { font-size: 28pt; }
