/* Base — body, typography, resets, utilities */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    background-color: var(--body-background);
    color: var(--body-text-color);
    font-family: var(--font-family);
    font-size: var(--font-size);
    margin: 0;
    padding: calc(var(--nav-height) + 15px) 0 0;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - calc(var(--nav-height) + 15px));
    line-height: 1.5;
}

a {
    color: var(--link-color);
    text-decoration: none;
    cursor: pointer;
}

    a:hover {
        text-decoration: underline;
    }


img {
    display: block;
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5rem;
    line-height: 1.25;
}

h1 {
    font-size: 1.5rem;
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1rem;
}

ul, ol {
    margin: 0;
    padding: 0;
}

.hide, .Hide {
    display: none;
}

.invisible {
    visibility: hidden;
}

.bold {
    font-weight: 500;
}

hr.line {
    color: var(--border-color);
    height: 1px;
    background: var(--border-color);
    border: 0;
}

hr.menu {
    border-top: none;
    border-color: var(--border-color);
    margin: 4px;
    width: 96%;
}

.ajaxwait {
    cursor: wait;
}

.itemmask {
    opacity: 0.3;
    pointer-events: none;
}

.waitmask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    z-index: 100;
}

.text-muted {
    color: var(--secondary-text-color);
}

.text-small {
    font-size: 0.85rem;
}

.spoiler {
    background: var(--text-color);
    color: var(--text-color);
    cursor: pointer;
    padding: 0 4px;
}

    .spoiler:hover, .spoiler.revealed {
        background: transparent;
        color: inherit;
    }

pre.code, .postcontent pre, .codeblock {
    background: var(--alternate-background);
    border: 1px solid var(--post-quote-border-color);
    padding: 0;
    overflow: auto;
    font-family: 'Consolas','Courier New',monospace;
    font-size: 0.9rem;
    margin: 10px 0;
}

pre.code {
    padding: 1rem;
}

.codeblock .lang, pre.code-header {
    font-weight: bold;
    color: var(--post-quote-header-text-color);
    background: var(--post-quote-header-background);
    border-top: 1px solid var(--background);
    border-bottom: 1px solid var(--post-quote-border-color);
    padding: 2px 10px;
}

.codeblock ol {
    margin: 0;
    padding: 0 0 0 3em;
    list-style: decimal;
}

.codeblock li {
    font-family: 'Courier New',monospace;
    border-left: 1px solid #ccc;
    background: var(--background);
    padding-left: 6px;
}

    .codeblock li.alt {
        background: #F8F8F8;
    }

/* Login required prompt bar */
.sd-login-prompt {
    position: fixed;
    top: 1rem;
    left: 33%;
    right: 33%;
    z-index: 9999;
    background: var(--color-info);
    color: var(--color-white);
    text-align: center;
    padding: .75rem 2.5rem .75rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.sd-login-prompt a {
    color: var(--color-white);
    font-weight: 700;
    text-decoration: underline;
}

.sd-login-prompt a:hover {
    opacity: .85;
}

.sd-login-prompt__dismiss {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 .25rem;
}

.sd-login-prompt__dismiss:hover {
    opacity: .7;
}

/* Welcome Guest signup prompt — shown inline at the bottom of a thread when
   a guest tries to reply (Views/Post/View.cshtml), and as the sole content
   of the /login-required landing page. Kept in shared/base.css so both
   contexts pick it up without extra CSS wiring. */
.sd-signup-prompt {
    padding: 25px 1.5rem 1.5rem 190px;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
    line-height: 1.6;
    background: url(/images/base/sd.logo.png) no-repeat 20px center;
    min-height: 125px;
}

    .sd-signup-prompt ul {
        margin: .75rem 0 .75rem 1.25rem;
        padding: 0;
    }

    .sd-signup-prompt li {
        margin-bottom: .25rem;
    }

.sd-signup-action {
    display: inline-block;
    padding: .5rem 1.25rem;
    background: var(--link-color);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

    .sd-signup-action:hover {
        opacity: .9;
        color: var(--color-white);
    }

@media(max-width:600px) {
    .sd-signup-prompt {
        background-position: center 1rem;
        background-size: 80px auto;
        padding: 110px 1rem 1rem 1rem;
        text-align: center;
        min-height: auto;
    }
}

/* Wrapper for the standalone /login-required page — adds breathing room
   around the prompt since it isn't bordered by surrounding thread content. */
.sd-login-required {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

    .sd-login-required .sd-signup-prompt {
        margin-top: 0;
        border-top: none;
    }
