@import "/static/themes/basic.css";

/* specific things */
:root {
    --bg-color: #1e1e2e;
    --main-text-color: #cdd6f4;
    --link-text-color: #cba6f7;
    --link-hover-color: #89dceb;
    --link-visited-color: var(--link-text-color);
    --surface-0: #181926;
    --surface-1: #45475a;
    --nav-icon-hover-color: #cba6f7;
    --subtext: #bac2de;

    --button-bg-color: #45475a;
    --card-color: var(--surface-0);
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

nav img {
    filter: brightness(0) invert(1);
}

input[type="text"] {
    border-radius: 0.3em !important;
}

.search-form {
    display: flex;
    justify-content: center;
}

.item-card {
    padding: 0.8em !important;
    border: 0 !important;
    border-radius: 0.2em;
}

.search-result {
    padding: 0.3em !important;
}

.username {
    bottom: -0.5em !important;   
}

.user-info {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1em;

    & .usernames {
        & p {
            display: inline-block;
        }

        & p:nth-child(1) {
            font-weight: bold;
            font-size: 1.4em;
        }

        & p:nth-child(2) {
            display: inline-block;
            &::before {
                content: "@";
            }
        }
    }

    & .user-bio {
        width: 100%;
    }

    & .profile-picture img {
        max-height: 8em !important;
        border-radius: 100% !important;
    }
}

.user-posts {
    display: grid;
    grid-template-columns: repeat(2, auto);
    max-width: 1280px;
    margin: 0 auto;

    & .item-heading {
        grid-column: span 2;
    }
}

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

    & .post-image, .carousel {
        max-width: 100%;
        margin-right: 0;
        align-self: center;
    }

    & .post-time {
        margin-top: 0.8em;
        display: inline-block;
        color: var(--subtext);
        font-size: 0.8rem;
    }

    & a[href^="/p/"] {
        padding-top: 0.8em;
        margin-top: auto;
    }
}

#main > .post > .post-info {
    display: flex;
    flex-direction: column;

    & .post-body {
        width: inherit;
        margin-left: 0;
    }
}

@media (max-width: 1024px) {
    .user-posts {
        grid-template-columns: repeat(1, auto);

        & .item-heading {
            grid-column: span 1;
        }

        & .item-card {
            max-width: 30em;
        }
    }
}

/* error message */
.item-card > details > pre {
    background-color: var(--surface-1);
}
