/* Thread pages, archive and live (owner 2026-10-25, mockup https://claude.ai/artifact/VJJYbnBV1dgFcMREyUNRVo): only
   what is particular to posts. The page, head card, buttons, fields and chips are the site's own (site.css, inside
   <main class="ui-page tp">), the badges and member names the forum's (forum-pages.css). Loaded after forum.css,
   whose MyBB rules still style what is inside a post (quotes, code, smilies). Phone layout from 600 px, as site.css. */

.tp-search { flex-wrap: wrap; margin: 0; }
.tp-search .ui-input { flex: 1 1 200px; width: 240px; }

/* ---- Posts: author column beside the post; above it on phones ---- */
.tp-post { display: flex; overflow: hidden; }
.tp-post-hidden { background: #fbf6f6; }
.tp-author {
  flex: 0 0 200px; padding: 18px 22px; background: var(--ui-tint); border-right: 1px solid var(--ui-soft-line);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0;
}
.tp-avatar img { display: block; width: 80px; height: 80px; object-fit: cover; border: 1px solid var(--ui-line); border-radius: 6px; image-rendering: pixelated; }
.tp-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tp-name { font-size: 15px; font-weight: bold; }
.tp-rank { font-size: 13px; color: var(--ui-muted); }
.tp-stars img { margin-right: 1px; }
.tp-stats { margin: 0; width: 100%; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ui-muted); }
.tp-stats div { display: flex; justify-content: space-between; gap: 10px; }
.tp-stats dt { font-weight: normal; }
.tp-stats dd { margin: 0; color: var(--ui-text); text-align: right; }
.tp-worlds { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; font-size: 13px; }
.tp-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tp-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 22px;
  border-bottom: 1px solid var(--ui-soft-line); font-size: 13px; color: var(--ui-muted);
}
.tp-num { font-weight: bold; }
.tp-edited { font-style: italic; }
.tp-hidden-note { margin: 12px 22px 0 !important; font-size: 13px; color: #8a2f2c; font-style: italic; }
.tp-body { flex: 1 0 auto; padding: 18px 22px 22px; font-size: 15px; line-height: 1.6; color: var(--ui-text); overflow-wrap: anywhere; }
.tp-body img { max-width: 100%; height: auto; }
/* Quotes: MyBB's box (forum.css) at the post's own size; Bootstrap's blockquote is 17.5 px */
.tp-body blockquote { margin: 0 0 10px; padding: 8px 12px; font-size: 14px; line-height: 1.55; background: var(--ui-tint-2); border-color: var(--ui-line); }
.tp-body blockquote cite { margin: 0 0 6px; padding-bottom: 4px; font-size: 13px; border-color: var(--ui-soft-line); }
.tp-body blockquote cite span { color: var(--ui-muted); }
.tp-actions {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; padding: 8px 14px;
  border-top: 1px solid var(--ui-soft-line);
}
.tp-actions:not(:has(a, button)), .tp-actions-left:not(:has(a)) { display: none; }
.tp-actions-left, .tp-actions-right { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-actions-right { margin-left: auto; }

/* ---- Pager, other threads, the saved "browsing" line: solid bars like the forum's (forum-pages.css .fp-bar) ---- */
.tp-pager, .tp-browsing {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; align-self: flex-start; padding: 8px 12px;
  background: #fff; border: 1px solid var(--ui-line); border-radius: 8px; font-size: 13px; color: var(--ui-muted);
}
.tp-browsing { margin: 0; }
.tp-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tp-nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #333 !important; text-decoration: none !important; min-width: 0; }
.tp-nav-link:hover { background: var(--ui-tint-2); }
.tp-nav-link > span { display: flex; flex-direction: column; min-width: 0; }
.tp-nav-newer { justify-content: flex-end; text-align: right; grid-column: 2; }
.tp-nav-dir { font-size: 13px; color: var(--ui-muted); }
.tp-nav-title { font-weight: bold; color: var(--ui-link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Reply box (live threads; the post editor uses the toolbar too) ---- */
.tp-reply { margin: 0; overflow: hidden; }
.tp-reply-head { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--ui-soft-line); }
.tp-reply-head img { border-radius: 4px; image-rendering: pixelated; }
.tp-reply-head label { font-size: 15px; font-weight: bold; color: var(--ui-text); }
.tp-reply-box { padding: 18px 22px 0; }
.tp-toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--ui-tint); border: 1px solid var(--ui-control);
  border-bottom: 0; border-radius: 6px 6px 0 0;
}
.tp-toolbar[hidden] { display: none; }
.tp-tool {
  width: 36px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0;
  border-radius: 4px; background: transparent; color: #333; font: 15px Georgia, serif; cursor: pointer;
}
.tp-tool:hover { background: #e6ecf2; }
.tp-tool-gap { width: 1px; margin: 4px 6px; background: var(--ui-control); }
.tp-reply textarea { display: block; min-height: 170px; margin: 0; }
.tp-toolbar:not([hidden]) + textarea { border-radius: 0 0 6px 6px; }
.tp-reply-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 18px; }
.tp-reply-buttons { display: flex; gap: 8px; margin-left: auto; }

/* ---- Moderator tools (live threads) ---- */
.tp-mod {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 18px; background: #fcf8e3;
  border: 1px solid #ecdcae; border-radius: 8px; font-size: 13px; color: #6b5427;
}
.tp-mod-title { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; }
.tp-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.tp-mod .ui-btn { border-color: #d9c68f; color: #4d3c17 !important; }
.tp-mod .ui-btn:hover { background: #fffdf3; }
.tp-mod select { min-height: 38px; border: 1px solid #d9c68f; border-radius: 6px; background: #fff; font: inherit; max-width: 100%; }
.tp-move { margin-left: auto; }
.tp-move label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---- Phones ---- */
@media (max-width: 600px) {
  .tp .ui-head-actions, .tp-search { width: 100%; }
  .tp .ui-head-actions .ui-btn-primary, .tp-search .ui-btn { flex: 1 1 auto; min-height: 44px; }
  .tp-post { flex-direction: column; }
  .tp-author {
    flex: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px;
    border-right: 0; border-bottom: 1px solid var(--ui-soft-line);
  }
  .tp-avatar img { width: 44px; height: 44px; }
  .tp-who { flex: 1 1 120px; }
  .tp-stats { flex-direction: row; flex-wrap: wrap; gap: 2px 12px; width: auto; }
  .tp-stats div { gap: 4px; }
  .tp-meta { padding: 10px 16px; }
  .tp-body { padding: 14px 16px 18px; font-size: 16px; }
  .tp-actions .ui-btn-ghost { min-height: 44px; }
  .tp-nav { gap: 10px; }
  .tp-nav-link { padding: 10px 12px; }
  .tp-reply-head, .tp-reply-foot { padding-left: 16px; padding-right: 16px; }
  .tp-reply-box { padding: 12px 12px 0; }
  .tp-tool { width: 44px; height: 44px; }
  .tp-reply textarea { font-size: 16px; }
  .tp-reply-buttons { width: 100%; }
  .tp-reply-buttons .ui-btn { flex: 1 1 0; min-height: 44px; }
  .tp-mod .ui-btn, .tp-mod select { min-height: 44px; }
  .tp-move { margin-left: 0; }
}
