/* Color classes */

.white {
    color:white;
}

.bgwhite {
    background-color: white;
}

.black {
    color:black;
}

.bgblack {
    background-color: black;
}

/* Classes */

.inline {
    display: unset;
    display: inline-flex;
}

.inline-wrapper * {
    display: inline;
}

.centerdiv {
    display:flex;
    height:100%;
    justify-content: center;
    align-items: center;
}

.column {
    display: flex;
    flex-direction: column;
}

.row {
    display:flex;
    flex-direction: row;
}

.start {
    justify-content: start;
}

.end {
    justify-content: flex-end;
    align-items: flex-end;
}

.ta-right {
    text-align: right;
}

.full-width {
    width:100%;
}

.half {
    width:50%;
}

.vr {
    width:1px;
    border-left: 2px solid;
}

.return {
    font-weight: bold;
}

/* General */

body {
    margin:0;
}

main {
    width:80%;
    height:100%;
    display: flex;
    flex-direction: column;
    margin:auto;
    padding:1.5em 0 1.5em 0;
    flex-grow: 1;
}

div#container {
    width:100%;
    min-height: 100vh;
    display:flex;
    flex-direction: column;
    margin:0;
}

button {
    border:none;
    font-size: 1em;
    transition: background-color 150ms ease-in-out
}

button:hover {
    transition: background-color 150ms ease-in-out;
    cursor: pointer;
}

input, img, button, textarea {
    border-radius: 6px;
}

hr {
    border:0;
    border-top:2px solid;
}

/* Navbar and footer */

nav,footer {
    width:100%;
    height:4em;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
} 

nav > a {
    margin:0 1em 0 1em;
}

.mobile-nav {
    display: none;
}

footer > div.fcenter {
    width:40%;
}

footer > div.fright, footer > div.fleft {
    width:30%;
}

footer > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lang-select p {
    margin: 0 0.25em 0 0.25em;
}

/* Homepage */

main#hp > hr, main#hp > h1 {
    margin:0;
}

main#hp > div.row {
    justify-content: center;
    margin-top: 1.5em;
}

main#hp > div.row > a.hpbtn {
    margin: 0 1.5em 0 1.5em;
    border-radius: 6px;
}

a.hpbtn > button {
    padding: 0.75em 1.25em 0.75em 1.25em;
    font-size: 1em;
}

main#hp > div.row > a p {
    margin: 0;
}

div.hpcont {
    width:100%;
    display: flex;
    flex-direction: row;
}

div.hpcont > div.half {
    display: flex;
    flex-direction: column;
    padding: 0 0.4em 0 0.4em;
}

div.hpblogpost {
    padding:0 0.5em 0 0.5em;
    overflow: hidden;
    text-overflow: ellipsis;
}

div.hpblogpost > a {
    width:fit-content;
}

div.hpcont > div.half > h3 {
    margin: 1.5em 0 1.5em 0;
}

div.hpblogpost > h3 {
    margin:0
}

div.hpblogpost > h4 {
    margin-top: 0.5em;
    margin-bottom:1.5em;
}

.hpblogpost > .title-cont {
    display: flex;
}

.hpblogpost > .title-cont h3 {
    margin:0;
    max-width: 75%;
    white-space: nowrap;
}

.hpblogpost > .title-cont p {
    margin: 0 0 1.8px 1em;
    font-size: 14px;
    align-self:end;
}

a.hpbtn:active p, a.hpbtn:focus p, a.hpbtn:hover p {
    text-decoration: underline;
}

hr:last-of-type {
    margin-top:0.5em;
    margin-bottom:1em;
}

.postsep {
    width: 25%;
    border-top: 1px solid;
}

.postsep:last-child {
    display: none;
}

#hp > .h-logo {
    width:70%;
}

#hp .v-logo {
    width: 20%;
    margin-top: 1em;
}

.logo-cont {
    display: flex;
    align-items: center;
    justify-content: center;
    width:100%;
}

/* Blog index */

.bi-title {
    display: flex;
    margin-bottom:0.5em;
}

.bi-title p {
    font-size: 18px;
}

.bi-title * {
    margin: 0;
}

.blog-index > hr {
    margin:0;
}

.blog-index-cont {
    display: flex;
}
.blog-index-posts > .half > h2, .blog-author-list > h2 {
    padding:0.25em;
}

.blog-index-posts {
    display:flex;
    flex-direction: row;
    width:75%;
}

.blog-index-posts .half {
    width:47%;
    margin-top:0.5em;
}

.bi-center {
    margin:0 2% 0 2%;
}

.blog-index-posts > .vr {
    margin-right: 2%;
}

.half .blogpost:last-of-type > hr {
    display: none;
}

.blogpost *, .hpblogpost * {
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blogpost h4, .blog-author-list h3 {
    font-size: 20px;
    margin: 1em 0 0.5em 0;
}

.blog-author-list bi-author:first-of-type h3 {
    margin-top:0;
}

.blogpost h5, .blog-author-list p {
    font-size: 18px;
    margin: 0.5em 0 0.5em 0;
    font-family: "Red Hat Display", sans-serif;
}

.blogpost > .inline-wrapper {
    margin: 0.75em 0 1em 0;
}

.blogpost > .inline-wrapper * {
    font-size:14px;
}

.blogpost > .inline-wrapper img, .blogpost > .inline-wrapper hr, .blogpost > .inline-wrapper blockquote {
    display: none;
}

.blogpost > .title-cont {
    display: flex;
}

.blogpost > .title-cont h4 {
    margin:0;
    max-width: 75%;
    white-space: nowrap;
}

.blogpost > .title-cont p {
    margin: 0 0 1.4px 1em;
    font-size: 16px;
    align-self:end;
}

.post-title-cont {
    display: flex;
    width:100%;
}

.post-title-cont h2 {
    margin:0;
    overflow: scroll;
}

.post-title-cont p {
    margin: 0 0 3.4px 0;
}

.post-title-cont i, .postTitle i {
    margin-left: 0.5em;
}

.post-header > div:first-child {
    width:60%;
}

.post-header > div:last-child {
    width:40%;
}

.blog-author-list {
    display:flex;
    flex-direction: column;
    width:25%;
    margin-top:0.5em;
}

.posts-navigation {
    display: flex;
    flex-direction: row;
}

.pn-l, .pn-c, .pn-r {
    display: flex;
    width:33.33%;
    margin-top:1.5em;
}

.pn-c a.current {
    font-weight: bold;
    font-size: 1.25em;
}

.pn-c p {
    margin: 0 0.5em 0 0.5em;
}

.end .views {
    margin:0;
}

.views {
    min-width:fit-content;
}

h5 .last-edit, h3 .last-edit {
    font-size: 16px;
}

.last-edit {
    display: block;
    min-width: fit-content;
    margin-top:0.5em;
}

.edit-post {
    margin: 0 0 0 1em;
}

/* Post */

.text-cont blockquote {
    border-left: 2px solid;
    padding: 0em 0.5em 0em 0.5em
}

.text-cont a {
    text-decoration: underline;
}

.text-cont p {
    width:100%;
}

.text-cont hr {
    width:90%;
}

.text-cont img {
    max-width: 100%;
    object-fit: contain;
    border-radius: 0;
    border:2px solid;
    display: block;
    margin:auto;
}

/* Login and register */

.login {
    height:100%;
    width:fit-content;
    margin: auto;
    display: flex;
    align-items: center;
}

div.login > form > label, div.login > form > label > p {
    margin:0;
    font-size: 1.05em;
    font-weight: bold;
}

input[type=text], input[type=email], input[type=password] {
    border: 1px solid;
    margin-top: 0.25em;
    margin-bottom:1.25em;
    padding: 0.375em;
    font-size: 1em;
    font-family: "Red Hat Display", sans-serif;
}

.loginbtn {
    border: 1px solid;
    padding: 0.5em 1.5em 0.5em 1.5em
}

.loginbtn > p {
    margin: 0;
}

#successpage h2 {
    margin:0 0 0.5em 0;
}

#successpage p {
    margin:0;
}

/* User page */

div.usercont {
    display:flex;
    flex-direction: row;
    width:100%;
    justify-content: space-between;
}

.userL > h2 {
    margin:0.5em 0 0 0;
} 

.userL > .row > p {
    margin: 0.5em 0.5em 0.5em 0;
}

.userL hr {
    width: 100%;
    margin: 1.5em 0 1.5em 0;
    justify-self: center;
}

.usercont table {
    display: table;
    border-collapse: collapse;
    max-width: 100%;
    margin-bottom: 0.5em;
}

.usercont table, .usercont th, .usercont td {
    font-family: "Red Hat Display", sans-serif;
    border: 1.5px solid;
    padding:0.5em;
    text-align: left;
}

.usercont td {
    word-break: break-word;
}

div.userR, div.userL {
    display: flex;
    flex-direction: column;
}

.userR {
    padding-left:1em;
}

.userL {
    padding-right: 1em;
    flex-grow: 1;
}

/* div.userL {
    width:100%;
} */

.userL .row:first-of-type p {
    margin-top:1em;
}

.userL .row:last-of-type p {
    margin-bottom: 1em;
}

div.userR {
    justify-content: right;
    /* margin-left: 2.5em; */
}

.userR #avatarUpload {
    display:none;
}

.smallbtn {
    display:inline;
    padding: 0 0.375em 0 0.375em;
    height: 2em;
    margin:auto;
}

.smallbtn p {
    font-size: 0.9em;
    margin:0;
}

.userR #uploadlabel {
    margin:1em 0 1em 0;
}

.userR #uploadlabel p {
    margin:0;
}

.userR #uploadlabel:hover > p, .userR #uploadlabel:active > p, .userR #uploadlabel:focus > p {
    text-decoration: underline;
    cursor: pointer;
}

div.avatarcont {
    display: flex;
    flex-direction: column;
}

.avatarcont > img {
    border:2px solid;
}

.avatarcont > form {
    width:70%;
    margin:auto;
    display: flex;
    justify-content: center;
}

.avatarcont > form > button {
    margin-right:0;
}

.username {
    text-decoration: underline;
}

#set-perms label > p {
    margin-top:0;
}

#set-perms select {
    margin-bottom:1.25em;
}

.user-title-mobile {
    display: none;
}

/* New post */

.newpost form > label:first-of-type p {
    margin-top: 1em;
}

.newpost p {
    margin: 0.5em 0 0.5em 0;
}

.newpost textarea {
    min-width: 99.5%;
    max-width: 99.5%;
    min-height: 32em;
    font-size: 16px;
    font-family: "Red Hat Display", sans-serif;
}

.newpost .smallbtn {
    margin: 0;
}

.newpost .smallbtn p {
    font-size: 1.25em;
    margin: 0;
}

.newpost .full-width p {
    margin-top: 0;
}

.new-post-label > p {
    font-weight:bold;
}

.publish {
    margin-top: 0.5em;
}

.publish p {
    margin-bottom: 0.375em;
    margin-right: 1em;
}

/* Markdown Guide */

.md-guide h3 {
    border-bottom: 2px solid;
}

.md-guide div {
    border: 2px solid;
    border-radius: 6px;
    padding: 0.5em;
    margin-bottom:0.5em;
    margin: 0 0.5em 0 0.5em;
}

.md-guide div > h3 {
    border: none;
}

/* Text */

h1,h2,h3,h4,p,a,ol,ul {
    font-family: "Red Hat Display", sans-serif;
    width:fit-content;
}

a {
    text-decoration: none;
}

a:active, a:focus, a:hover {
    text-decoration: underline;
}

/* Icons */

.hpblogpost .views > .material-symbols-outlined {
    font-size: 16px;
    vertical-align: -3px;
    margin-right:0.25em;
}

.blogpost .views > .material-symbols-outlined, .post-cont .views > .material-symbols-outlined, .post-header .views > .material-symbols-outlined, .last-edit > .material-symbols-outlined, .userL .material-symbols-outlined, .edit-post .material-symbols-outlined, .return .material-symbols-outlined, .md-guide-link .material-symbols-outlined, .publish > label .material-symbols-outlined, .successmsg .material-symbols-outlined, .errormsg .material-symbols-outlined {
    font-size: 20px;
    vertical-align: -4px;
    margin-right:0.25em;
}

.return > .material-symbols-outlined {
    margin:0;
}

button .material-symbols-outlined {
    font-size:18px;
    vertical-align: -3px;
    margin-right: 0.25em;
}

h1 .material-symbols-outlined {
    font-size:48px;
    vertical-align: -12px;
    margin-right: 0.25em;
}

.postTitle .material-symbols-outlined, .post-title-cont .material-symbols-outlined {
    vertical-align: -4px;
}

/* Media queries */

@media screen and (max-width:1600px) {
    
    /* Blog */

    .blog-index-posts .blogpost .last-edit {
        display: block !important;
        margin-top: 0.5em !important;
        margin-left:unset !important;
    }

}

@media screen and (max-width:1280px) {

    /* Post */

    .post-header > div:first-child {
        width:50% !important;
    }

    .post-header > div:last-child {
        width:50% !important;
    }

    /* Blog and homepage */

    .blog-index-posts .title-cont, .hpcont .title-cont {
        display: flex !important;
        flex-direction: column !important;
    }

    .blog-index-posts .title-cont .views, .hpcont .title-cont .views {
        margin:0.5em 0 0 0 !important;
        align-self: unset !important;
    }

    /* About page */

    .v-logo {
        width:25% !important;
    }
    
}

@media screen and (max-width:1080px) {

    /* User page */

    .userL {
        width:60% !important;
    }

    .userR {
        width:40% !important;
    }

    .avatarcont > form {
        width:90% !important;
    }

}

@media screen and (max-width:960px) {

    /* User page */

    .avatarcont > form {
        width:90% !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .avatarcont > form > button {
        margin: auto !important;
    }

}

@media screen and (max-width:900px) {

    /* Blog */

    .blog-index-cont {
        flex-direction: column !important;
    }

    .blog-index-posts {
        flex-direction: column !important;
        width:100% !important;
    }

    .blog-index-posts .vr {
        display: none !important;
    }

    .blog-index-posts > .half, .blog-author-list {
        width: 100% !important;
        margin: unset !important;
    }

    /* About page */

    .v-logo {
        width:40% !important;
    }

}

@media screen and (max-width:720px) {

    /* User page */

    .usercont {
        flex-direction: column-reverse !important;
    }

    .userL, .userR {
        padding: unset !important;
    }

    .userL {
        width:100% !important;
    }

    .userR {
        margin: auto !important;
        margin-bottom:1em !important;
    }

    .user-title {
        display: none !important;
    }
    
    .user-title-mobile {
        display: block !important;
    }

    /* About page */

    .v-logo {
        width:50% !important;
    }

    /* Nav bar */

    nav > a {
        display: none;
    }

    nav {
        justify-content: end;
    }

    .mobile-nav {
        display: block;
    }

    /**
    Hamburger
    **/
    .hamburger {
        position: absolute;
        top: 3.2em;
        right: 5%;
        margin-left: -2em;
        margin-top: -45px;
        width: 2em;
        height: 3em;
        z-index: 5;
    }

    .hamburger div {
        position: relative;
        width: 3em;
        height: 7px;
        border-radius: 3px;
        margin-top: 8px;
        transition: all 0.3s ease-in-out;
    }

    /**
    Nav Styles
    **/
    .hm-nav {
        position: fixed;
        width: 100%;
        height: 100%;
        top: -100%; left: 0; right: 0; bottom: 0;
        overflow: hidden;
        transition: all 0.3s ease-in-out;
        transform: scale(0);
    }
    .hm-nav-wrapper {
        position: relative;
        overflow: hidden;
        overflow-y: auto;
        height: 100%;
    }
    .hm-nav-items {
        text-align: left;
        margin-left: 25%;
    }
    .hm-nav-items a {
        position: relative;
        text-decoration: none;
        font-size: 2em;
        display: inline-block;
        margin-top: 1.25em;
        transition: color 0.2s ease-in-out;
        letter-spacing: 1px;
    }
    /* .hm-nav-items a:hover:before { 
    height: 100%;
    } */
    .hm-nav-items .lang-select > p > a {
        text-decoration: underline;
    }

    #toggle {
        display: none;
    }

    /**
    Animations
    **/
    #toggle:checked + .hamburger .top-bun {
        transform: rotate(-45deg);
        margin-top: 25px;
    }
    #toggle:checked + .hamburger .bottom-bun {
        opacity: 0;
        transform: rotate(45deg);
    }
    #toggle:checked + .hamburger .meat {
        transform: rotate(45deg);
        margin-top: -7px;
    }

    #toggle:checked + .hamburger + .hm-nav {
        top: 0;
        transform: scale(1);
    }

    /* Footer */

    .fleft {
        display: none !important;
    }

    footer {
        flex-direction: column !important;
        flex-grow: 1 !important;
        height: unset !important;
    }

}

