@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url(reset.css);
/* Inter Montserrat Open Sans Poppins */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    background-color: rgb(249, 249, 250);
    color: rgb(31, 31, 31);

    --home-border: rgb(212, 219, 223);

    font-size: 1rem;
    line-height: 1.5rem;
}

h1, h2, h3, h4, h5, h6 { color: black; font-family: "Open Sans"; }
h1 { font-size: 2rem; margin-bottom: 20px; }
h6 { font-weight: bold; }

.site-logo {
    font-size: 3rem;
    font-family: "Inter";
    box-sizing: border-box;
}

.site-logo.bigger {
    font-size: 4rem;
}

.site-logo > .hover-unhide {
    display: none;
}

.site-logo:hover > .hover-unhide {
    display: auto;
}

.medium-logo {
    width: 50px;
    margin-bottom: 20px;
}

body:has(.account-enter) {
    min-height: 100vh;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;
}

.account-enter {
    display: flex;
    flex-direction: row;
    column-gap: 20px;
    justify-content: space-between;

    height: 100%;
    width: 100%;

    margin-bottom: 150px;

    max-width: 800px;
    min-height: 300px;
    padding: 30px;

    background-color: white;
    border: 1px solid rgb(148, 148, 148);
    border-radius: 4px;
}

@media only screen and (max-width: 650px) {
    .account-enter {
        flex-direction: column;
    }
}

.account-enter fieldset {
    border: 1px solid darkgray;
    border-radius: 4px;
}

.account-enter fieldset legend {
    margin-left: 10px;
    padding: 0 3px 0 3px;
}

.account-enter fieldset:has(input:focus) {
    color: rgb(57, 136, 189);
    border: 1px solid rgb(115, 179, 221);
}

fieldset.error {
    color: rgb(189, 57, 57);
    border: 1px solid rgb(221, 115, 115);
}

.account-enter > form {
    display: flex;
    flex-direction: column;

    justify-content: space-between;
    align-items: flex-end;

    max-width: 400px;
    width: 100%;
}

.account-enter > form > div {
    width: 100%;
}

.account-enter input, .account-enter label {
    display: block;

    outline: none;
    border: none;
}

.account-enter input:not([type="submit"]) {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    background-color: transparent;
    
    width: 100%;
    height: 2.25rem;

    font-size: 1rem;
    padding: 0 10px 10px 10px;

    box-sizing: border-box;
}

.account-enter form.error input:not([type="submit"]) {
    color: rgb(57, 136, 189);
    border: 1px solid rgb(115, 179, 221);
}

.account-enter .buttons {
    display: flex;
    justify-content: flex-end;
}

.account-enter input[type="submit"] {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;

    border-radius: 5px;
    padding: 10px 30px 10px 30px;

    background-color: rgb(73, 165, 226);
    color: white;

    cursor: pointer;
}

.account-enter input[type="submit"]:hover {
    filter: brightness(90%);
}

.account-enter span {
    display: block;
    color: rgb(66, 66, 66);
    margin-top: 10px;
}

.account-enter span a {
    color: rgb(0, 102, 204);
}

.account-enter .error-reason {
    color: rgb(189, 57, 57);
}

.processing {
    position: relative;
    overflow: hidden;
}

.processing > * {
    filter: blur(1px);
}

.processing::before, .processing::after {
    position: absolute;
    content: "";

    --size: 20px;
    --dist: 50px;
    
    background-color: rgb(69, 102, 134);
    
    width: var(--size);
    height: var(--size);

    top: min(50%, 200px);
    left: calc(50% - var(--dist));
    z-index: 10;

    border-radius: 100%;

    transform-origin: var(--dist) 0;
    animation: processing-animation infinite 1s linear;
}

.processing::after {
    animation-delay: 500ms;
}

@keyframes processing-animation {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


main {
    display: grid;
    grid-template-columns: 200px 1fr;

    padding: 0 0 0 10px;

    width: 100%;
    height: 100%;

    min-height: 100vh;
    max-width: 1220px;

    overflow: hidden;
    
    box-sizing: border-box;
    margin: auto;
}

main > div {
    min-width: 0;
    /* overflow: auto; */
    box-sizing: border-box;
    border-right: 1px solid var(--home-border);
    border-collapse: collapse;
}

nav {
    font-family: "Poppins";
    font-size: 1.25rem;
    font-weight: bold;

    display: flex;
    flex-direction: column;

    width: inherit;

    line-height: 4rem;
}

nav > * {
    display: block;
    text-decoration: none;
    color: inherit;
    width: inherit;
}

nav img {
    width: 40px;
    height: 40px;
    margin-right: 15px;

    vertical-align: middle;
}

nav > a:hover {
    color: #0066cc;
}

nav > a:hover > img {
    filter: invert(20%) sepia(94%) saturate(2516%) hue-rotate(198deg) brightness(98%) contrast(101%);
}

.site-navigation {
    width: inherit;
    height: 100%;
    max-height: 500px;
    
    position: fixed;
    display: flex;
    flex-direction: column;
}

#post-load-zone {
    height: 250px;
    box-sizing: border-box;
}

.end-of-posts {
    display: flex;

    font-family: "Montserrat";
    font-weight: bold;

    align-items: center;
    justify-content: center;

    height: 250px;
}

#content-length {
    margin-right: 10px;
}

.information-container {
    height: 100%;
}

.post-container.processing {
    height: 100%;
}

.post {
    /* background-color: white; */

    padding: 20px 10px 20px 10px;

    border: 1px solid var(--home-border);
    border-collapse: collapse;
}

.post-content {
    display: grid;

    grid-template-columns: 50px 1fr;
    /* grid-template-rows: 1fr; */
    column-gap: 20px;
}

.post:nth-child(odd) {
    /* background-color: rgb(245, 248, 250); */
}

.post .post-content > .author-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;

    grid-row: 1 / 3;
}

.post .author {
    font-weight: bold;
}

.post .author-line {
    display: flex;
    justify-content: space-between;
}

.post .post-info {
    margin-left: 10px;
    color: rgb(78, 78, 78);
}

.post .post-content .keyword {
    color: #0066cc;
    text-decoration: none;
}

.post:not(#create-post-form) .post-content .keyword:hover {
    text-decoration: underline;
}

.post-prompt {
    border-bottom: 3px solid var(--home-border);
}

.post-prompt-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    margin-top: 10px;
}

.post-prompt-buttons > input {
    font-family: "Montserrat";
    font-size: 1rem;
    font-weight: bold;

    border-radius: 15px;
    padding: 10px 30px 10px 30px;

    border: none;
    outline: none;

    background-color: rgb(54, 93, 119);
    color: white;

    cursor: pointer;
}

.post .reactions {
    margin-top: 10px;
    grid-column: 2 / 3;
}

.post .reaction.reacted {
    color: #0066cc;
}

.post .reaction.reacted img {
    filter: invert(20%) sepia(94%) saturate(2516%) hue-rotate(198deg) brightness(98%) contrast(101%);
    z-index: -1;
}

.post .reaction:hover {
    cursor: pointer;
    color: #0066cc;
}

.post .reaction:hover img {
    filter: invert(20%) sepia(94%) saturate(2516%) hue-rotate(198deg) brightness(98%) contrast(101%);
    z-index: -1;
}

.post .reaction {
    display: flex;
    align-items: center;
}

.post .reaction .reaction-count {
    margin-left: 5px;
}

.post .reaction img {
    height: 1.75rem;
}

#create-post-form {
    overflow: hidden;
}

.post-edit-preview {
    cursor: text;
    padding-top: 5px;
    font-size: 1.15rem;

    max-width: 100%;

    overflow-wrap: break-word;
    overflow: hidden;
    white-space: pre-wrap;
}

.post-edit-preview:empty:before {
    content: attr(data-placeholder);
    color: gray;
}

.post-edit-preview:empty:before {
    content: attr(data-placeholder);
    color: gray;
}

.post-edit-preview:focus {
    outline: none;
}

.post-edit-preview .keyword {
    color: #0066cc;
}

#post-category-select {
    display: block;
    outline: none;
    border: none;
    padding: 0;

    background-color: transparent;
    /* color: #0066cc; */

    font-family: inherit;
    font-size: 0.9rem;
}

.keyword-containers {
    margin-top: 10px;
}

#search-form {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 32px;
}

#search-form::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);

    width: 20px;
    height: 20px;

    background-image: url(../assets/icons/search-alt-1-svgrepo-com.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

#search-form > input {
    width: 100%;
    height: 100%;
    box-sizing: border-box;

    font-family: "Open Sans";
    font-size: 0.95rem;

    padding: 10px 10px 10px 40px;
    border-radius: 5px;
    border: 1px solid #c0c0c0;
    outline: none;
    background-color: transparent;
}

#keywords {
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
}

#keywords > a {
    color: #2e567d;
    /* color: #0066cc; */
    font-size: 0.9rem;
    text-decoration: none;

    transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

#keywords > a.active {
    /* color: #2a4968; */
    color: #0066cc;
}

#keywords:has(a.active) > a:not(.active) {
    /* color: #2e567d; */
    opacity: 0.5;
}

#keywords > a:hover {
    text-decoration: underline;
}

.post-filter {
    display: flex;
    row-gap: 6px;
    flex-direction: column;
    margin: 10px;
}

.post-filter .removelist > div {
    display: inline-block;

    border: 1px solid #c0c0c0;
    background-color: #f1f2f3;

    font-family: "Open Sans";
    font-size: 0.85rem;

    padding: 3px 8px 3px 8px;
    border-radius: 5px;

    margin: 0 3px 0 3px;

    height: 32px;
    box-sizing: border-box;
}

.post-filter .removelist .close {
    font-size: 0.9rem;
    margin-left: 5px;
    cursor: pointer;

    opacity: 0.8;
}

.post-filter .removelist {
    display: inline-block;
}

.post-filter select {
    display: inline-block;

    border: 1px solid #c0c0c0;
    background-color: #f1f2f3;

    font-family: "Open Sans";
    font-size: 0.85rem;

    padding: 3px 8px 3px 8px;
    border-radius: 5px;

    height: 32px;
    box-sizing: border-box;
}

.profile-select {
    position: relative;
    margin-top: auto;
    justify-self: flex-end;
}

.profile-select > summary > img {
    width: 50px;
    cursor: pointer;
}

.profile-select > summary::marker {
    content: "";
}

.profile-popout {
    position: absolute;
    bottom: calc(100% + 10px);

    z-index: 100;

    width: 275px;
    padding: 20px;
    border-radius: 5px;

    background-color: white;   
    border: 1px solid rgb(148, 148, 148);
}

.profile-popout .profile-name {
    font-weight: bold;
    font-size: 1.1rem;
    font-family: "Montserrat"
}

.profile-popout .profile-icon {
    width: 50px;
}

.profile-popout .profile-icon:hover {
    cursor: pointer;
    filter: brightness(50%);
}

.profile-popout .profile-header {
    display: flex;
    align-items: center;
    column-gap: 15px;
    margin-bottom: 10px;
}

.profile-popout .profile-bio {
    width: 100%;
    height: 100%;
    max-height: 350px;
    box-sizing: border-box;

    background-color: #f1f2f3;

    padding: 10px;
    border-radius: 5px;
}

.profile-popout .profile-options {
    display: flex;
    margin-top: 10px;
    justify-content: flex-end;

    column-gap: 5px;
}

.profile-popout .profile-options > a, .profile-popout input[type="submit"] {
    border: 1px solid #4b5664;
    background-color: #f1f2f3;
    color: inherit;
    text-decoration: none;

    font-family: "Open Sans";
    font-size: 0.85rem;

    padding: 3px 8px 3px 8px;
    border-radius: 5px;
    
    cursor: pointer;
}

.profile-popout input[type="submit"] {
    display: none;
}

.profile-popout.modified input[type="submit"] {
    display: block;
}

.pfp {
    border-radius: 100%;
}

.text-icon {
    height: 1.3rem;
}

.text-icon:hover {
    cursor: pointer;
    filter: invert(20%) sepia(94%) saturate(2516%) hue-rotate(198deg) brightness(98%) contrast(101%);
}
