:root {
    --bgMain: #1f1b25;
    --global--color-primary: #f7f7fd;

    @media (min-width: 822px) {
        --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), 64ch);
        --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), 128ch);
    }
}

/* Might delete later. 🤷‍♀️ */
body {
    background-attachment: fixed;
    background-image: url('../img/p1.webp');
}

/* Just trying to make sure these don't affect line heights. */
p :is(sup, sub) {
    display: inline !important;
    font-size: 75% !important;
    line-height: 1 !important;
    padding: 0 !important;
    position: relative !important;

    a {
        line-height: 0 !important;
    }
}

p sup {
    top: 0 !important;
    vertical-align: top !important;
    vertical-align: super !important;
}

p sub {
    bottom: 0 !important;
    vertical-align: bottom !important;
    vertical-align: sub !important;
}

form {
    button,
    input[type="submit"] {
        border-color: magenta;
    }

    fieldset {
        border: 0;
        margin: 1rem 0;
        padding: 0;

        &:has(input[type="radio"]) {
            display: block;

            label {
                display: inline;
                margin: 0 1em 0 0;
            }
        }
    }
}

del,
s {
    background-color: #e6999966;
    color: inherit;
    text-decoration: none;
}

ins,
mark {
    background-color: #99e69966;
    color: inherit;
    text-decoration: none;
}

picture {
    display: block;
}

.alignmid {
    @media (min-width: 100ch) {
        max-width: 96ch !important;
    }
}

ol.long,
ul.long {
    li+li {
        margin-top: 1rem;
    }
}

ol.nowrap,
ul.nowrap {
    >li {
        white-space: nowrap;
    }
}

p.note {
    background: rgba(102, 102, 140, 0.2);
    padding: 1em;
    padding-top: 0.9em;
    position: relative;

    &::before {
        @media (min-width: 768px) {
            content: '\1f4dd';
            font-size: 2em;
        }

        left: -2em;
        position: absolute;
    }

    &.tldr {
        &::before {
            @media (min-width: 768px) {
                content: '\1f9a5';
            }
        }
    }
}

.text-align-left {
    text-align: left;
}

.too-tall-bro {
    max-height: 360px;
}

.wait {
    cursor: wait;
}

#wpadminbar {
    border-bottom: 1px solid magenta;
}

#page * {
    font-family: Consolas, 'SF Mono', Inconsolata, 'Fira Code', Monaco, monospace;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.42;
}

#page {
    .page-header {
        border: 0;
        padding: 0;
        text-align: center;
    }

    a {
        color: magenta;

        &:hover {
            color: #ffaa00;
            text-decoration: none;
        }

        &:focus {
            background: transparent;
        }
    }

    strong {
        font-weight: bold;
    }

    blockquote {
        border-left: 1px solid magenta;
        background: rgba(255, 0, 255, 0.06);
        padding: 1em;
        padding-top: 0.9em;

        &::before {
            display: none;
        }

        p {
            opacity: 0.80;
        }

        + p.caption {
            margin-top: calc(-1 * var(--global--spacing-unit));
        }
    }
}

#primary {
    overflow-x: hidden;

    p.caption,
    figcaption {
        font-size: 0.8125rem;
        margin-bottom: 0;
        margin-top: calc(0.5 * var(--global--spacing-unit));
        opacity: 0.69;
        text-align: center;

        > * {
            font-size: 0.8125rem;
        }
    }

    hr {
        border-color: magenta;
        margin-bottom: calc(var(--global--spacing-vertical) * 1.5);
        margin-top: calc(var(--global--spacing-vertical) * 1.5);
        min-width: 150px;
        position: relative;

        &::before,
        &::after {
            color: magenta;
            position: absolute;
            top: -0.7em;
        }

        &::before {
            content: '❦ ';
            left: -1em;
        }

        &::after {
            content: ' ❦';
            right: -1em;
        }
    }

    img {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    }

    ul,
    ol {
        ::marker {
            color: magenta;
        }
    }

    :is(p, ul, ol) {
        hyphens: auto;
        text-wrap: pretty;

        &:not(.text-align-left) {
            @media (min-width: 768px) {
                text-align: justify;
            }
        }
    }

    :is(p, ul, ol, td) {
        code,
        kbd {
            background-color: color-mix(in srgb, currentColor 20%, transparent);
            color: var(--wp--preset--color--pale-cyan-blue);
            padding-left: 0.25em;
            padding-right: 0.25em;
            position: relative;
            /* white-space: nowrap; */
        }
    }

    .wp-block-list {
        padding-left: var(--global--spacing-horizontal);
        padding-right: var(--global--spacing-horizontal);
    }

    .twitter-tweet {
        margin: 0 auto !important;
    }

    .code-toolbar {
        &:has(.alignmid) {
            max-width: 96ch;
        }

        &:has(+ p.caption) {
            margin-bottom: 0;
        }
    }
}

#announcement {
    background-color: #111;
    border-bottom: 3px solid magenta;
    padding: 0.5rem 1rem;
    text-align: center;

    a {
        text-decoration: none;
    }
}

.site-header {
    align-items: center;
}

.site-branding {
    margin-top: 0;

    @media (min-width: 768px) {
        max-width: 50%;
    }

    @media (min-width: 1337px) {
        max-width: 35%;
    }

    .site-title {
        background-color: magenta;
        color: var(--bgMain);
        padding: 0.125em 0.5em;
        text-transform: uppercase;

        a {
            color: var(--bgMain) !important;
            text-decoration: none;
        }
    }

    .site-description {
        display: none;

        @media (min-width: 440px) {
            display: block;
        }

        @media (min-width: 768px) {
            text-align: justify;
        }
    }
}

#site-navigation {
    .menu-item {
        a:not([href]) {
            color: var(--global--color-primary);
            pointer-events: none;
        }
    }
}

.entry-header {
    max-width: var(--responsive--aligndefault-width);

    &.alignwide {
        max-width: var(--responsive--aligndefault-width);
    }
}

.entry-title {
    #page & {
        background-color: magenta;
        color: var(--bgMain);
        font-size: 1.5rem;
        letter-spacing: -0.05em;
        line-height: 1.21;
        padding: 0.125em 0.5em;

        @media (min-width: 768px) {
            font-size: 2rem;
        }

        a {
            color: var(--bgMain);
            font-size: 1.5rem;
            line-height: 1.21;
            text-decoration: none;

            @media (min-width: 768px) {
                font-size: 2rem;
            }
        }
    }
}

.entry-content {
    #page & {
        h2 {
            background-color: magenta;
            color: var(--bgMain);
            padding: 0.125em 0.5em;
            text-transform: uppercase;
        }

        h3 {
            font-size: 1.3125rem;
        }
    }
}

.singular {
    .entry-header {
        border-bottom-width: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    /* .entry-title {} */

    .entry-footer {
        border-top-width: 1px !important;
        display: block !important;
        text-align: right;

        .posted-by {
            display: flex;
            flex-direction: column-reverse;
        }

        .byline {
            display: none !important;
        }
    }
}

/* Not sure what the base theme was trying to accomplish with this nonsense. */
.entry-content>[class="wp-block-image"]+* {
    margin-top: calc(0.666 * var(--global--spacing-vertical));

    @media (min-width: 482px) {
        margin-top: var(--global--spacing-vertical);
    }
}

.pagination {
    border-top: 0;
}

#colophon {
    margin-top: var(--global--spacing-vertical);

    &:has(.footer-navigation) {
        .footer-navigation {
            border-top: 1px solid;
            margin-bottom: 0;
            padding-top: var(--global--spacing-vertical);
        }

        .site-info {
            border-top: 0;
            margin-top: 0;
        }
    }

    .site-info {
        border-top-width: 1px;
        position: relative;
        text-align: center;

        &:hover {
            &::before {
                transform: rotateY(180deg);
            }
        }

        &::before {
            content: '#eidnind';
            right: 50%;
            translate: 50% 0;
            transition: transform 0.5s cubic-bezier(0.6, -0.28, 0.735, 0.045);

            @media (min-width: 900px) {
                position: absolute;
            }
        }

        &::after {
            content: 'Copyright Forever by Default';
            right: 0;

            @media (min-width: 900px) {
                position: absolute;
            }
        }

        .powered-by {
            display: none;
        }
    }
}

.tooltip {
    background-color: #111;
    border: 1px solid magenta;
    display: none;
    max-width: var(--responsive--aligndefault-width);
    min-height: 100px;
    padding: 1rem;
    position: absolute;

    &.show {
        display: block;
    }

    .title {
        border-bottom: 1px solid;
        margin-bottom: 1rem;
    }

    p:not(:last-child) {
        margin-bottom: 1rem;
    }

    img,
    video {
        display: block;
        width: 100%;
    }
}

#comments {
    &::before {
        content: 'Hover or tap here if you wish to leave a comment.';
        display: block;
    }

    &.show,
    &:hover {
        #respond {
            display: block;
        }
    }

    &.show {
        &:before {
            color: transparent;
        }
    }

    #respond {
        display: none;
    }

    #reply-title,
    .required-field-message,
    label[for="comment"] {
        display: none;
    }
}
