/* Main CSS for soto.codes */

:root {
    --content-width: 768px;
    --nav-width: 280px;
    --total-width: calc(var(--content-width) + var(--nav-width));
    --nav-width-fixed: 300px;
    --text-color: #221;
    --link-hover-color: #664;
    --separator-color: #ccc;
}

@media screen and (max-device-width: 768px) {
    :root {
        --nav-width: 0px;
    }
}

html {
    box-sizing: content-box;
}

body {
    background-color: #eee;
}

body,
button,
input,
select,
textarea,
p {
  color: var(--text-color);
  font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
  font-weight: 300;
}

body {
    margin: 0px 0px 0px 0px;
    padding: 32px 8px 0px 8px;
    margin-left: var(--nav-width);
    overflow-x: hidden;
}

/* if screen width is less than content width then set min width to be 100% of screen */
@media only screen and (max-width: 800px) {
    body {
        min-width: 100%;
    }
}

p {
    margin-top: 24px;
    margin-bottom: 24px;
}

/* content size and centering */
.content, .menu, .header, .footer {
    padding: 8px 8px 8px 8px;
    width: calc(100% - 48px);
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.content p {
    line-height: 1.4;
}

.clear {
    clear: both;
}

/* Title */

.site-title-image img {
    max-width: 100px;
    display: inline-block;
    margin-right: 8px;
    float: left;
}
.site-title-text {
    display: inline;
    vertical-align: bottom;
}
#soto-title-text {
    font-weight: 700;
    font-size: 2em;
    margin: 0px;
}
.site-title-text-byline p {
    margin: 0px;
}

.header a {
    text-decoration: none;
    color: var(--text-color);
}

.header a:hover {
    text-decoration: none;
    color: var(--link-hover-color);
}

/* Navigation menu */
nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--nav-width);
    padding: 0px;
    border-right-width: 1px;
    border-right-color: var(--separator-color);
    border-right-style: solid;
    overflow-x: hidden;
    overflow-y: scroll;
}

nav p {
    margin-top: 16px;
    margin-bottom: 16px;
}

.nav-interior {
    padding: 32px 16px 32px 16px;
    width: var(--nav-width-fixed);
    font-size: 95%;
}

#nav-toggle {
    position: fixed;
    left: 16px;
    top: 8px;
    padding: 0px;
    border-width: 1px;
    cursor: pointer;
}

/* hide menu transition This is now set in Javascript
nav, body, #nav-toggle {
    transition: 0.5s ease-out all;
    -moz-transition: 0.5s ease-out all;
    -webkit-transition: 0.5s ease-out all;
}*/

/* code */
pre {
    display: block;
    padding: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
    margin-left: min(1.5%, 16px);
    margin-right: min(1.5%, 16px);
    background-color: #ddd;

    border-width: 1px 1px 1px 1px;
    border-style: solid;
    border-color: #888;

    overflow: scroll;
}
code {
    color: #111;
    font-family: "Courier New", monospace;
    font-weight: 300;
    font-size: 90%;
    padding-left: 1px;
    padding-right: 1px;
    background-color: #ddd;
}

/* next previous post */
.prevNextPost {
    padding: 16px 0px;
    font-weight: 600;
    overflow: auto;
}
.prevNextPost a {
    text-decoration: none;
}
.prevPost {
    float: left;
    font-size: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nextPrevPostSeparator {
    float: left;
    width: 5%;
    height: 20px;
}
.nextPost {
    float: right;
    font-size: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}
.prevPost::before {
    content: "\2190\00a0";
    white-space: pre-wrap;
}
.nextPost::after {
    content: " \2192";
}

/* Footer */
.footer {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: var(--separator-color);
    margin-top: 8px;
    padding-bottom: 32px;
}

.footer-icon {
    height: 24px;
    width: 24px;
    padding-right: 8px;
    fill: #ccc;
}
.footer-icon:hover {
    fill: #888
}
.footer-icons a img {
}
.footer-icons {
    float: left;
}

.footer-copyright {
    float: right;
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: none;
    color: #888;
}

/* Collapsible list */
.collapsibleList {
    list-style-type: none;
    padding-left: 0px;
}
.collapsibleList ul {
    padding-left: 28px;
}

.collapsibleList li > input ~ * {
    display: none;
}
.collapsibleList li > input:checked ~ * {
    display: block;
}
.collapsibleList li > input + label {
    display: block;
}
.collapsibleList li > input {
    display: none;
}
.collapsibleList li > input + label::before {
    content: "\25b9 ";
}
.collapsibleList li > input:checked + label::before {
    content: "\25bf ";
}
.collapsibleList li {
    line-height: 2;
}
.collapsibleList li li {
    line-height: 1.5;
}
.collapsibleList label {
    cursor: pointer;
}
.collapsibleList p {
    font-size:80%;
    margin-bottom:8px;
}
.collapsibleList.subList {
    margin-left: 20px;
}

/* code highlighting */
.swift-keyword { color: darkred; }
.swift-string { color: orangered; }
.swift-type { color: dodgerblue; }
.swift-call { color: darkblue; }
.swift-number { color: red; }
.swift-comment { color: grey; }
.swift-property { color: dodgerblue; }
.swift-dotAccess { color: black; }
.swift-preprocessing { color: coral; }

/* content */
.content a {
    text-decoration: none;
    color: #888;
}

.content a:hover {
    text-decoration: underline;
    color: #888;
}

.content a:active, a:focus {
    box-shadow: none;
    outline: none;
}

.content .brief_header a {
    text-decoration: none;
    color: var(--text-color);
}

.content .brief_header a:hover {
    text-decoration: none;
    color: var(--link-hover-color);
}

.centre img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 90%;
}

.article-icon img {
    float: left;
    max-width: 128px;
    padding-right: 16px;
    padding-bottom: 8px;
}

.article-update {
    font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
    font-weight: 300;
    display: inline-block;
    margin-left: min(1%, 16px);
    margin-right: min(1%, 16px);
    padding: 12px;
    background-color: #ccc;
    line-height: 1.3;

    font-size: 90%;
    font-weight: 400;
}

.separator {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: var(--separator-color);
}

/* brief */
.brief p {
    margin-top: 12px;
    margin-bottom: 12px;
}
.brief_header h2 {
    font-size: 120%;
}
.brief_date {
    font-size: 85%;
}
.brief_readmore {
    font-size: 85%;
}
.latest {
    margin-bottom: 24px;
}

/* tags */
.post_tags {
    padding-top: 8px;
}
.post_tag {
    padding-right: 4px;
    font-size: 80%;
}

/* reference files */
.reference li p {
    margin-top: 8px;
    margin-bottom: 8px;
}
.reference h3 {
    margin-top: 32px;
}
.reference h3 code {
    padding: 8px;
    font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
    background-color: #ccccd8;
}
/* hide function */
.reference h3 + pre {
    display: none;
}
.reference-footer {
    text-align: right;
    font-size: 75%;
}

/* reference page list */
.referenceList {
    list-style-type: none;
    padding: 0px;
    line-height: 1.5;
}

