/* Stolen from https://bearblog.dev/ */
:root {
    --width: 800px;
    --font-main: Verdana, sans-serif;
    --font-secondary: Verdana, sans-serif;
    --font-scale: 1em;
    --background-color: #fff;
    --heading-color: #222;
    --text-color: #444;
    --link-color: #3273dc;
    --visited-color:  #8b6fcb;
    --code-background-color: #f2f2f2;
    --code-color: #222;
    --blockquote-color: #222;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #01242e;
        --heading-color: #eee;
        --text-color: #ddd;
        --link-color: #8cc2dd;
        --visited-color:  #8b6fcb;
        --code-background-color: #000;
        --code-color: #ddd;
        --blockquote-color: #ccc;
    }
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-scale);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
}

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: none;
}

a:hover {
    text-decoration: underline; 
}

nav a {
    margin-right: 8px;
}

strong, b {
    color: var(--heading-color);
}

button {
    margin: 5px 0;
    cursor: pointer;
}

main {
    line-height: 1.6;
}

table {
    width: 100%;
}

hr {
    border: 0;
    border-top: 1px dashed;
}

img {
    max-width: 100%;
}

code {
    font-family: monospace;
    padding: 2px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
}

blockquote {
    border-left: 1px solid #999;
    color: var(--code-color);
    padding-left: 20px;
    font-style: italic;
}

footer {
    padding: 25px 0;
    text-align: center;
}

.title:hover {
    text-decoration: none;
}

.title h1 {
    font-size: 1.5em;
}

.highlight, .code {
    padding: 1px 15px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 3px;
    margin-block-start: 1em;
    margin-block-end: 1em;
    overflow-x: auto;
}

/* blog post list */
ul.blog-posts {
    list-style-type: none;
    padding: unset;
}

ul.blog-posts li {
    display: flex;
}

ul.blog-posts li span {
    flex: 0 0 130px;
}

ul.blog-posts li a:visited {
    color: var(--visited-color);
}

        .title {
    display: inline-block;
}

.bear {
    font-weight: 400;
    font-family: "Menlo", sans-serif;
    white-space: nowrap;
    display: inline-block;
}

.flex::before {
    content: "ᕦʕ •ᴥ•ʔᕤ";
    animation: blink 10s infinite;
}

.flex:hover::before {
    content: "ᕙʕ ಠᴥಠʔᕗ";
    animation: none;
}

.upgrade:hover .flex::before {
    content: "ᕙʕ ಠᴥಠʔᕗ";
    animation: none;
    text-decoration: underline;
}

@keyframes blink {
    0%, 96% { content: "ᕦʕ •ᴥ•ʔᕤ"; }
    97%, 100% { content: "ᕦʕ -ᴥ-ʔᕤ"; }
}

a.account:hover {
    text-decoration: none;
}

a.account::before {
    content: "ʕ-ᴥ-ʔ";
}

.account:hover::before {
    content: "ʕ•ᴥ•ʔ";
}

header nav {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

header nav a:last-child {
    margin-right: 0;
}

label {
    font-weight: bold;
}

time {
    font-family: monospace;
    font-size: 15px;
}

textarea,
input:not([type="submit"]),
.editable {
    background-color: #eceff4;
    border: none;
    line-height: 1.7;
    outline: none;
    color: inherit;
    padding: 10px;
    font-size: 18px;
}

@media (prefers-color-scheme: dark) {
    textarea,
    input:not([type="submit"]),
    .editable {
        background-color: #004052;
    }
}

.full-width textarea,
.full-width input:not([type="submit"], [type="checkbox"], [type="radio"]) {
    width: calc(100% - 20px);
}

textarea:required,
input:required:not([type="submit"]){
    border-left: 1px solid #f99f9f;
}

input[type='checkbox'], input[type='radio'] {
    height: 15px;
    margin-right: 10px;
}

button.floating {
    position: fixed;
    bottom: 20px;
    right: 25px;
}

button#toggle-full-screen {
    float: right;
}

.sticky-controls {
    position: sticky;
    top: 0;
    background-color: white;
    line-height: 0;
    z-index: 10;
}

.helptext {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: small;
}

.helptext.sticky {
    position: sticky;
    bottom: 0;
    background-color: white;
    padding: 3px 0;
}

@media (max-width: 768px) {
    .helptext.sticky {
        position: static;
    }
}

@media (prefers-color-scheme: dark) {
    .helptext.sticky,
    .sticky-controls {
        background-color: var(--background-color);
    }
}

.errorlist {
    color: #eba613;
    font-size: small;
}

#date-range{
    display: none;
}

#date-range:target{
    display: block;
}

.notification {
    width: 100%;
    text-align: left;
    padding: 5px 0;
    margin-bottom: -15px;
}

.notification a {
    margin: 0;
}

button.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--link-color);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
}

button.link-button:hover {
    text-decoration: underline;
}

/* dashboard post list and analytics */
ul.post-list {
    list-style-type: none;
    padding: unset;
}

ul.post-list li {
    display: flex;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #eceff4;
}

ul.post-list li span {
    flex: 0 0 130px;
}

ul.post-list li span.number {
    flex: 0 0 50px;
}

ul.post-list li small {
    text-align: right;
    flex: 0 0 115px;
}

/* media center */

.media-container {
    display: flex;
    flex-flow: row wrap;
    gap: 5px;
}
.media-item {
    text-align: center;
    background-color: #eceff4;
    position: relative;
    color: #444;
}
.media-checkbox {
    position: absolute;
    top: 5px;
    right: 5px;
    margin: 0 !important;
    height: unset !important;
}

/* discovery feed */
ul.discover-posts {
    list-style-type: none;
    padding: unset;
}

ul.discover-posts li {
    display: flex;
    flex-flow: row no-wrap;
    gap: 10px;
    line-height: 1.2;
    position: relative;
}

ul.discover-posts li span {
    flex: 0 0 30px;
}

ul.discover-posts li a:visited {
  color: #8b6fcb;
}

ul.discover-posts li div {
    padding-bottom: 10px;
}

ul.discover-posts li small span, ul.discover-posts li small span a {
    color: #777 !important;
}


@media (prefers-color-scheme: dark) {

    .helptext {
        color: #aaa;
    }
}

th, td {
    text-align: center;
    border: 1px solid var(--text-color);
}