:root {
  --background: #ccc;
  --text: #333333;
  --link: #00018c;
  --secondary: #ccc;
  --tertiary: #F0f0f0;
  --contrast: #414141;
  --separator: #7777bb;
  --shade: rgba(255,255,255,0.25);
  --highlight: rgba(0,0,0,0.25);
  --accent: rgb(250, 4, 197);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #222233;
    --text: #ffffff;
    --link: #8c8dff;
    --secondary: #444455;
    --tertiary: #333344;
    --contrast: #C0C0C0;
    --separator: #111122;
    --shade: rgba(0,0,0,0.25);
    --highlight: rgba(255,255,255,0.25);
    --accent: rgb(250, 4, 197);
  }
}

body {
    background: var(--background);
    color: var(--text);
    font-size: 15px;
    padding: 0;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

fieldset {
    padding: 0;
    margin: 0;
    border: none;
}

.toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--secondary);
    font-size: 1.5rem;
    background: var(--tertiary); 
}

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

.toolbar ul li {
    display: inline-block;
    text-align: center;
    flex-grow: 1;
    position: relative;
    padding: 0;
    margin: 0;
    border-right: 1px solid var(--secondary);
}

.badge {
    position: absolute;
    right: calc(50% - 1.35rem);
    top: 0.25rem;
    font-size: 0.8rem;
    border-radius: 20px;
    padding: 0.1rem 0.25rem;
    background: var(--accent);
}
.badge span {
    display: none;
}

.toolbar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.toolbar ul li .label {
    display: none;
}

.toolbar ul li a {
    display: block;
    padding: 0.5rem 2rem 1rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.04rem;

}

#main {
    padding-bottom: 60px;
}


nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}


#nav {
    /* display: none; */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    border-top: 1px solid var(--secondary);
    font-size: 1.5rem;
    background: var(--tertiary); 

}


#nav ul {
    display: flex;
    flex-direction: row;
}

#nav ul li {
    display: inline-block;
    text-align: center;
    flex-grow: 1;
    position: relative;
    padding: 0;
    margin: 0;
    border-right: 1px solid var(--secondary);
}

#nav ul li a  {
    display: block;
    text-decoration: none;
    padding: 0.5rem 2rem 1rem;
}

#nav ul li#logo { display: none; }

#menu {
    width: 90vw;
    max-width: 300px;
    position: fixed;
    top: 0;
    left: -100%;
    bottom: 0;
    transition: left 0.25s;
    box-shadow: 10px 0px 5px rgba(0,0,0,0.25);

    overflow-y: auto;
    background: var(--tertiary);
    border-right: 1px solid  var(--separator);
    flex-grow: 0;
    font-size: 14px;
    letter-spacing: 0.04rem;
    padding-bottom: 2rem;
}

#menu.active {
    left: 0;
}

#menu form {
    padding: 0.5rem 1rem;
}

#menu input {
    width: 100%;
}

#menu a {
    color: var(--text);
    text-decoration: none;

    padding: 0.5rem 1rem;
    display: block;
    
}

#menu a:hover {
    background: var(--highlight);
}

#content {
    padding-bottom: 3rem;
}

#content.nonav {
    padding-bottom: 0;
}

#top_nav {
    margin-top: 1rem;
    display: none;
}

#close_menu {
    background: none;
    border: 0;
    padding: 1rem;
    width: 100%;
    text-align: right;
}

#top_feeds {
    margin-top: 1rem; 
    font-size: 0.75rem;
}

#top_nav li {
    position: relative;
}

#menu li.current a {
    background-color: var(--secondary);
} 
#top_feeds li a {
    display: flex;
    align-items: center;
}
#top_feeds li a img {
    width: 25px;
    height: 25px;
    margin-right: 1rem;
}


@media screen and (min-width: 769px) {

    #wrapper {
        height: 100vh;
        display: flex;
        flex-direction: row;
    }

    #close_menu {
        display: none;
    }
    
    #nav {
        width: 50px;
        overflow-y: auto;
        background: var(--secondary);
        border-right: 1px solid var(--separator);
        position: inherit;
        flex-shrink: 0;
    }


    #nav ul li { 
        display: none;
    }
    #nav ul li a {
        padding: 0;
    }
    #nav ul li#logo { display: block; text-align: center; padding-top: 1rem; }


    #menu {
        position: inherit;
        box-shadow: none;
    }


    #top_nav {
        display: block;
    }


    #top_feeds {
        margin-top: 2rem; 
        font-size: 0.75rem;
    }


    #content {
        flex-grow: 1;
        flex-shrink: 1;
        overflow-y: auto;
    }

    #content .stream {
        margin: 1rem;
    }


    .toolbar {
        position: relative;
        height: 100vh;
        flex-shrink: 0;
        border-right: 1px solid var(--secondary);
        border-top: none;
        font-size: 2rem;
        background: var(--tertiary); 
    }

    .toolbar ul {
        display: block;
    }

    .toolbar ul li {
        text-align: left;
        display: block;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--secondary);
    }


    .badge {
        position: absolute;
        right: 0.25rem;
        top: 0.25rem;
        font-size: 0.8rem;
        border-radius: 20px;
        padding: 0.25rem 0.5rem;
        background: var(--shade);
    }
    .badge span {
        display: none;
    }
    
    .toolbar ul li .label {
        display: inline;
    }   

    .toolbar {
        font-size: 0.9rem;
    }

    .toolbar ul li a {
        padding: 1rem 0.5rem;
        padding-right: 2rem;
        color: var(--text);
        text-decoration: none;
        letter-spacing: 0.04rem;
    }
}

.toolbar ul li a:hover {
    background: var(--highlight);
}

#header {
    width: 100%;
    font-family: 'Courier New', Courier, monospace;
    padding: 0.5rem;
    background: var(--separator);
    position: relative;
}

#header nav {
    position: absolute;
    right: 2rem;
    top: 0.5rem;
}

#main {
    height: 100vh;
    overflow-y: scroll;
    flex-grow: 1;
}

a { color: var(--link); }

.stream {
    width: 100%;
    max-width: 100%;
    text-overflow: ellipsis;
    overflow-x: hidden;
}

@media screen and (min-width: 769px) {

    .stream {
        max-width: 40rem;
    }

    .box {
        max-width: 40rem;
    }

}

header {
    color: var(--text);
    font-weight: bold;
    padding: 0.5rem 1rem;
    background: var(--separator);
}

 header.back {
    display: flex;
    align-items: center;
    gap: 1rem;
}

 header .unread {
    float: right;
    font-size: 0.8rem;
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    background: var(--highlight);
    text-decoration: none;
    color: var(--text);
}

header a { 
    text-decoration: none;
}

.empty {
    padding: 1rem;
    color: var(--highlight);
}


.activity {
    border-bottom: 1px solid var(--secondary);
    background: var(--tertiary);
    padding: 1rem 1rem;
    line-height: 1.25rem;
}

.byline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.author {
    font-weight: bold;
    color: var(--text);
    text-decoration: none;
    display: block;
}

.handle {
    color: var(--contrast);
}

    
.personCard {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 1rem;
}

.personCard .profile {
    flex-grow: 1;
}

.personCard .author {
    font-weight: bold;
    color: var(--text);
    text-decoration: none;
    display: block;
}

.personCard .handle {
    color: var(--contrast);
}

.personCard .tools {
    flex-shrink: 0;
    flex-grow: 0;
}

#lookup_results .personCard {
    gap: 0;
}

.activity .content {
    padding-left: calc(50px + 1rem);
}

.content_warning {
    background: var(--shade);
    padding:  0.5rem 1rem; 
    display: flex;
}

.content_warning .tools {
    flex-grow: 1;
    text-align: right;
    /* padding-right: 1rem; */
}

.content_warning .tools a {
    margin: 0px auto;
    padding: 0.25rem 1rem;
    border-radius: 4px;
    background: var(--shade);
    text-decoration: none;
}

@media screen and (min-width: 769px) {
    .activity .content {
        padding-left: 0;
    }
    .activity .content_warning {
        padding-left: 0.5rem;
    }
}

.activity .collapsed{
    display: none;
}

.activity .boost {
    background: var(--shade);
    padding:  0.25rem 0.5rem; 
    margin-bottom: 1rem;
}

.avatar {
    height: 50px;
    width: 50px;
}

.activity footer {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.permalink {
    color: var(--secondary);
    text-decoration: none;
}

.permalink:hover {
    color: var(--link);
    text-decoration: underline;
}

.activity .attachment {
    background: var(--shade);
}

.activity .attachment img,
.activity .attachment video {

    margin: 0px auto;
    width: 100%;
    height: 200px;
    object-fit: contain;
}

#composer {
    padding: 1rem;
}

@media screen and (min-width: 769px) {
    #composer {
        padding: 0;
        margin-top: 1rem;
    }
}

#composer.mini {
    margin-bottom: 0;
    background-color: var(--tertiary);
    border-bottom: 1px solid var(--secondary);
    position: fixed;
    bottom: 50px;
    left: 0;
    width: 100%;
}
#composer.mini fieldset {
    display: flex;
}


#composer.mini #post {
    flex-grow: 1;
}

#composer.mini #submit {
    border-radius: 0;
}


textarea#post {
    width: 100%;
    height: 5rem;
    margin-bottom: 0.5rem;
}
input#cw { 
    width: 100%;
    margin-bottom: 0.5rem;
}

#submit {
    padding: 0.5rem 1rem;
    background: #0cc13f;
    color: var(--text);
    border: none;
    border-radius: 5px;
    float: right;

}

.content .tools { flex-grow: 1; }
.content .tools div { display: inline-block; }
.content .tools button { font-size: 1rem; background: none; border: none; padding: 0; margin-right: 0.5rem; }
/* .content .tools button.active { background: var(--highlight); } */
.content .tools button .active { display: none; }
.content .tools button.active .active { display: block; }
.content .tools button.active .inactive { display: none; }

button.follow { background: none; border: none; }
button.follow .active { display: none; }
button.follow.active .active { display: block; }

button.follow.active .inactive { display: none; }

button.bigfollow { 
    background: #0cc13f;
    color: var(--text);
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
}
button.bigfollow .active { display: none; }
button.bigfollow.active .active { display: block; }
button.bigfollow.active .inactive { display: none; }



@media screen and (min-width: 769px) {
    .content .tools button { font-size: 1.5rem;  }
}

.notification {
    margin-bottom: 1rem;
}

.notification a { 
    color: var(--contrast);
}

.preview {
    padding-left: 1rem;
    color: var(--contrast);
}

.Follow .preview {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.Follow .preview .avatar {
    height: 50px;
    width: 50px;
}

.showThread {
    display: inline-block;
    margin: 0px auto;
    padding: 0.25rem 1rem;
    border-radius: 4px;
    background: var(--shade);
    text-decoration: none;
}

.moreLink {
    display: inline-block;
    margin: 1rem auto;
    font-size: 1.25rem;
    padding: 0.25rem 1rem;
    border-radius: 4px;
    background: var(--shade);
    text-decoration: none;
}

.box {
    margin: 1rem;
    background: var(--tertiary); 
}

.box a {
    display: flex;
    padding: 1rem;
    text-decoration: none;
}

.box a span {
    flex-grow: 1;
    text-align: right;
}

.box form {
    padding: 1rem;
}

.box fieldset {
    margin-bottom: 1rem;
}

.box fieldset p {
    display: flex;
}

.box fieldset p label {
    width: 100px;
    flex-grow: 0;
    flex-shrink: 0;
}

.box fieldset legend {
    font-weight: bold;
}

#emojis input {
    font-size: 2rem;
}


.profileHeader {
    height: 150px;
    background: var(--separator);
}

.profileHeader img {
    object-fit: cover;
    height: 150px;
    width: 100%;
}

/* .profile {
    background: var(--tertiary);
} */


.profileToolbar {
    padding: 1rem;
    display: flex;
}

.profileToolbar .avatarLink {
    flex-grow: 0;
    margin-top: calc(-50px - 1rem);
}

.profileToolbar .avatar {
    width: 110px;
    height: 110px;
    border: 5px solid var(--tertiary);
}

.profileToolbar .tools {
    text-align: right;
    flex-grow: 1;
}


.profileBody {
    padding: 0 1rem 1rem;
}

.profileBody .author {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}


.inbox {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 60px;
    height: calc(100vh - 90px);
}

@media screen and (min-width: 769px) {
    .inbox {
        padding-bottom: 0;
        height: calc(100vh - 65px);
    }
}

.inbox .messages {
    flex-grow: 1;
    flex-direction: column-reverse;
    display: flex;
    overflow-y: auto;
}

.inbox .message {
    margin: 0.25rem 1rem;
}

.message_text {
    background: var(--highlight);
    border-radius: 0.5rem;
    padding: 1rem;
    max-width: 75%;
    display: inline-block;
}

.message_timestamp {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--highlight);
}

.inbox .message_text *:first-child {
    margin-top: 0;
}

.inbox .message_text *:last-child {
    margin-bottom: 0;
}

.inbox .message.outgoing  {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.inbox .message.outgoing .message_text  {
    background: var(--shade);
}

.feeds {
    flex-shrink: 1;
    background: var(--tertiary);
}

.feeds.inbox_visible {
    display: none;
}

@media screen and (min-width: 769px) {

    #composer.mini {
        background: none;
        border-bottom: none;
        bottom: 0;
        left: 0;
        position: inherit;
    }
}

.feeds .feed {
    position: relative;
    padding: 0.5rem 1rem;
    padding-right: 4rem;
    border-bottom: 1px solid var(--secondary);
    display: flex;
    align-items: center;
}

.feeds .feed .avatar {
    width: 25px;
    height: 25px;
    margin-right: 1rem;
}

.feeds .feed a { 
    text-decoration: none;
}

.feeds .unread {
    font-weight: bold;
    border-right: 10px solid var(--accent);
    /* background: var(--secondary); */
}

.feeds .current {
    /* font-weight: bold; */
    background: var(--secondary);
}

.meta_tag {
    background: var(--shade);
    color: var(--contrast);
    border-radius: 3px;
    font-size: 0.7rem;
    padding: 0.15rem;
}

details#bio {
    margin-top: 1rem;
}