/* The BeOS Archive - forum additions.
   Loaded AFTER the site's own style.css; only adds what the base sheet lacks.
   Everything here keeps the bevelled/inset BeOS look: square corners,
   1px black rules, 2px outset/inset highlights, no shadows, no radii. */

/* --- defensive base, in case the forum is viewed without the main sheet --- */
body {
    background: #336698;
    color: #000;
    font-family: "Bitstream Vera Sans", Verdana, Geneva, sans-serif;
    font-size: 12px;
}

/* logo-only banner: no headline or tagline, just the plaque */
.banner-compact { padding: 10px 8px; line-height: 0; }

/* --- breadcrumb / user strip above the window ------------------------- */
.forum-bar {
    background: #7a1414;
    border-bottom: 3px solid #400a0a;
    color: #ffcc00;
    padding: 4px 0;
    font-size: 11px;
}
/* keep the strip full-bleed but line its contents up with .page below */
.forum-bar-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.forum-bar a { color: #ffcc00; text-decoration: underline; }
.forum-bar a:visited { color: #ffcc00; }
.forum-bar .who { white-space: nowrap; }

/* --- the BeOS "button": 2px outset bevel, inset when pressed ---------- */
.btn {
    display: inline-block;
    font-family: "Bitstream Vera Sans", Verdana, sans-serif;
    font-size: 11px;
    line-height: 1.2;
    padding: 2px 10px;
    background: #d8d8d8;
    color: #000;
    border: 2px outset #d8d8d8;
    cursor: pointer;
    text-decoration: none;
}
.btn:visited { color: #000; }
.btn:hover { background: #e4e4e4; }
.btn:active { border-style: inset; padding: 3px 9px 1px 11px; }
.btn-danger { color: #7a1414; font-weight: bold; }

/* --- forms: inset fields, matching the .dlbox bevel ------------------- */
.forum-form label {
    display: block;
    font-weight: bold;
    margin: 8px 0 3px;
}
.forum-form input[type="text"],
.forum-form input[type="password"],
.forum-form textarea {
    font-family: "Bitstream Vera Sans", Verdana, sans-serif;
    font-size: 12px;
    background: #fff;
    border: 2px inset #d8d8d8;
    padding: 3px;
    width: 100%;
    box-sizing: border-box;
}
.forum-form textarea {
    font-family: "Bitstream Vera Sans Mono", "Courier New", monospace;
    min-height: 140px;
    resize: vertical;
}
.forum-form .actions { margin-top: 10px; }

/* honeypot: off-screen rather than display:none, which naive bots skip */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- board / thread listings ------------------------------------------ */
table.forum-list {
    width: 100%;
    border-collapse: collapse;
    border: 2px inset #d8d8d8;
    background: #fff;
    font-size: 12px;
}
table.forum-list th {
    background: #c4c4c4;
    border: 1px solid #000;
    padding: 3px 6px;
    text-align: left;
    font-weight: bold;
}
table.forum-list td {
    border: 1px solid #a8a8a8;
    padding: 4px 6px;
    vertical-align: top;
}
table.forum-list tr:nth-child(even) td { background: #f0f0f0; }
table.forum-list .num {
    text-align: right;
    width: 60px;
    white-space: nowrap;
}
table.forum-list .when {
    width: 130px;
    white-space: nowrap;
    color: #444;
}
.forum-list .title-cell a { font-weight: bold; }
.forum-list .sub { color: #444; font-size: 11px; }

/* --- a single post: its own little window ----------------------------- */
.post {
    border: 2px outset #d8d8d8;
    background: #d8d8d8;
    margin: 0 0 10px;
}
.post-head {
    background: #c4c4c4;
    border-bottom: 1px solid #000;
    padding: 3px 6px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.post-head .author { font-weight: bold; color: #14307a; }
.post-head .meta { color: #444; white-space: nowrap; }
.post-body {
    background: #fff;
    border: 2px inset #d8d8d8;
    margin: 6px;
    padding: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.45;
}
.post-foot {
    padding: 0 6px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.post-tools { text-align: right; }

/* --- likes: a raised BeOS button that stays pressed in once liked ---- */
.like-form { display: inline; margin: 0; }
.btn.like { min-width: 64px; }
.btn.like.liked {
    border-style: inset;
    background: #c4c4c4;
    font-weight: bold;
}
.like-count { font-size: 11px; color: #444; }
.blog-stamp { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.blog-stamp .badge { margin-left: auto; }
.comment-note { margin: 0 0 10px; }

/* --- status flags ----------------------------------------------------- */
.flag {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 0 4px;
    border: 1px solid #000;
    background: #ffcc00;
    color: #000;
    margin-right: 4px;
}
.flag-locked { background: #7a1414; color: #ffcc00; }

/* --- pagination ------------------------------------------------------- */
.pager {
    margin: 10px 0;
    font-size: 11px;
}
.pager .cur {
    display: inline-block;
    padding: 2px 10px;
    border: 2px inset #d8d8d8;
    background: #c4c4c4;
    font-weight: bold;
}

/* --- flashed messages ------------------------------------------------- */
.notice {
    border: 2px outset #d8d8d8;
    background: #ffcc00;
    padding: 5px 8px;
    margin-bottom: 10px;
    font-weight: bold;
}

.empty { color: #444; font-style: italic; padding: 6px 0; }

/* --- blog ------------------------------------------------------------- */
.human-note {
    background: #fff;
    border: 2px inset #d8d8d8;
    padding: 6px 10px;
    font-size: 11px;
    margin: 0 0 4px;
}
.author-tools { margin: 10px 0 0; }
.blog-meta { font-size: 11px; color: #444; margin: -4px 0 10px; }
.blog-more { margin: 4px 0 0; font-size: 11px; font-weight: bold; }
.blog-stamp { margin: 14px 0 0; text-align: right; }
.blog-stamp .badge { margin-top: 0; }

.blog-body { line-height: 1.6; }
.blog-body p { margin: 0 0 10px; }
.blog-body h1, .blog-body h2 { font-size: 13px; color: #7a1414; margin: 16px 0 6px; }
.blog-body h3, .blog-body h4 { font-size: 12px; color: #14307a; margin: 14px 0 6px; }
.blog-body ul, .blog-body ol { margin: 0 0 10px; padding-left: 22px; }
.blog-body li { margin-bottom: 3px; }
.blog-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px auto;
    border: 2px inset #d8d8d8;
}
.blog-body pre {
    background: #fff;
    border: 2px inset #d8d8d8;
    padding: 8px 10px;
    margin: 0 0 10px;
    overflow-x: auto;
    font-size: 11px;
    line-height: 1.4;
}
.blog-body pre code { background: none; padding: 0; }
.blog-body blockquote {
    margin: 0 0 10px;
    padding: 6px 10px;
    background: #ececec;
    border-left: 3px solid #7a1414;
}
.blog-body blockquote p:last-child { margin-bottom: 0; }
.blog-body table { border-collapse: collapse; font-size: 11px; background: #fff; margin: 0 0 10px; }
.blog-body th, .blog-body td { border: 1px solid #999; padding: 3px 8px; text-align: left; }
.blog-body th { background: #c4c4c4; }
.blog-body hr { border: 0; border-top: 1px solid #999; margin: 14px 0; }

.forum-form textarea.blog-editor { min-height: 380px; }

/* --- blog editor: image upload ----------------------------------------------------------- */
.editor-tools { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.editor-tools .btn:disabled { color: #777; cursor: wait; }

.author-tools .badge { margin-top: 0; vertical-align: middle; }

/* --- search ------------------------------------------------------------ */
.bar-search { margin: 0 0 0 auto; }
.bar-search input {
    font-family: "Bitstream Vera Sans", Verdana, sans-serif;
    font-size: 11px;
    width: 140px;
    padding: 1px 4px;
    border: 2px inset #d8d8d8;
    background: #fff;
}
.search-form { display: flex; gap: 6px; max-width: 460px; margin-bottom: 12px; }
.search-form input[type="text"] { flex: 1; }
.result {
    background: #fff;
    border: 2px inset #d8d8d8;
    padding: 6px 8px;
    margin: 0 0 8px;
}
.result-title { font-weight: bold; }
.result-meta { font-size: 11px; color: #444; margin-left: 6px; }
.result-snip { margin-top: 3px; line-height: 1.45; color: #222; }
.result-snip mark { background: #ffcc00; color: #000; padding: 0 1px; }

/* --- reports ------------------------------------------------------------ */
.report-link { font-size: 11px; color: #7a1414; margin-left: 8px; }
.report-link:visited { color: #7a1414; }
.forum-bar a.has-reports { font-weight: bold; background: #ffcc00; color: #000; padding: 0 4px; text-decoration: none; }
.report-preview { margin: 0 0 12px; }
.forum-form label.radio { font-weight: normal; margin: 3px 0; }
.report-reasons { margin: 0 6px 6px; padding: 6px 10px 6px 26px; background: #fff; border: 1px solid #a8a8a8; font-size: 11px; }
.report-reasons li { margin: 2px 0; }
.forum-rule { margin-bottom: 12px; }

/* --- blog editor: live preview --------------------------------------- */
.page.page-wide { max-width: 1240px; }
.editor-tools .preview-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    margin: 0 0 0 auto; font-weight: normal; font-size: 11px;
}
.editor-tools .preview-toggle[hidden] { display: none; }
/* align-items: start, or the grid stretches the textarea to the preview's height,
   the preview resizes to match the textarea, and they grow each other forever */
.editor-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.editor-split.with-preview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) {
    .editor-split.with-preview { grid-template-columns: minmax(0, 1fr); }
}
.preview-window { margin: 0; }
.preview-scroll { overflow-y: auto; box-sizing: border-box; }
.preview-scroll h2 { margin-top: 0; }

/* narrow screens: the bar wraps, search gets its own full-width row */
@media (max-width: 600px) {
    .forum-bar-inner { flex-wrap: wrap; row-gap: 4px; }
    .forum-bar .crumbs { flex: 1 1 auto; min-width: 0; }
    .bar-search { order: 3; flex: 1 1 100%; margin: 0; }
    .bar-search input { width: 100%; box-sizing: border-box; }
}
