/* Forum + ticket thread components on the pa design tokens (scoped under .pa).
   Replaces the legacy theme's .forum / .forum-post / .forum-reply / .post rules. Markup is unchanged. */
.pa {
  /* ---- board index / topic lists ---- */
  .forum { display: table; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; border-collapse: separate; }
  .forum + .forum-headline { margin-top: var(--s6); }
  .forum .forum-head { display: table-header-group; }
  .forum .forum-head > div, .forum .forum-footer > div { display: table-cell; padding: .75rem 1rem; font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); background: var(--surface-2); border-bottom: 1px solid var(--border); }
  .forum .forum-footer { display: table-header-group; }
  .forum .forum-group { display: table-row-group; }
  .forum .forum-group .forum-row { display: table-row; }
  .forum .forum-group .forum-row > div { display: table-cell; vertical-align: middle; padding: 1rem; font-size: var(--fs-sm); border-bottom: 1px solid var(--border); }
  .forum .forum-group:last-child > .forum-row > div { border-bottom: 0; }
  .forum .forum-group:hover .forum-row > div { background: var(--surface-2); }
  .forum .forum-group.forum-closed { opacity: .6; }
  .forum .forum-group .forum-row .forum-icon { width: 56px; padding: 1rem .5rem 1rem 1.25rem; text-align: center; position: relative; color: var(--accent); }
  .forum .forum-group .forum-row .forum-icon i { font-size: 1.4rem; }
  .forum .forum-group .forum-row .forum-icon .badge { position: absolute; top: .75rem; right: -4px; padding: 2px 5px; font-size: 10px; }
  .forum .forum-group .forum-row .forum-title { width: 55%; padding-left: .75rem; }
  .forum .forum-group .forum-row .forum-title h4 { font-size: var(--fs-md); margin: 0 0 2px; }
  .forum .forum-group .forum-row .forum-title h4 a { color: #fff; }
  .forum .forum-group .forum-row .forum-title p { font-size: var(--fs-xs); margin: 0; color: var(--text-faint); }
  .forum .forum-group .forum-row .forum-latest > div { float: left; }
  .forum .forum-group .forum-row .forum-latest img { float: left; margin-right: .75rem; height: 32px; width: 32px; border-radius: 50%; }
  .forum .forum-group .forum-row .forum-latest span { display: inline-block; font-size: var(--fs-xs); color: var(--text-faint); }
  .forum .forum-group .forum-row .forum-latest h5 { margin: 0; font-size: var(--fs-sm); color: var(--text); }
  .forum-headline { font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--s4); color: #fff; }
  .forum-headline::after { display: block; content: ""; clear: both; }
  .forum-headline h5 { margin: 0; font-size: var(--fs-xl); color: #fff; }
  .forum-headline span { display: block; font-weight: 400; font-size: var(--fs-sm); color: var(--text-faint); margin-top: .35rem; }

  /* ---- topic starter / ticket message ---- */
  .forum-post { padding: var(--s5); margin-bottom: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .forum-post .forum-header { margin-bottom: var(--s4); display: block; padding: 0; background: none; border: 0; }
  .forum-post .forum-header::after { display: block; content: ""; clear: both; }
  .forum-post .forum-header > div { float: left; }
  .forum-post .forum-header > div:first-child { width: 50px; }
  .forum-post .forum-header > div:nth-child(2) { padding-left: var(--s3); padding-top: 2px; }
  .forum-post .forum-header > div:last-child { float: right; text-align: right; }
  .forum-post .forum-header > div:last-child span { display: block; font-size: var(--fs-sm); color: var(--text-faint); }
  .forum-post .forum-header .forum-title { font-weight: 700; font-size: var(--fs-lg); margin: 0; color: #fff; }
  .forum-post .forum-header .forum-meta { font-size: var(--fs-sm); margin: 3px 0 0; color: var(--text-faint); }
  .forum-post .forum-header .forum-meta span i { margin-right: 5px; }
  .forum-post .forum-header .forum-meta span::after { color: var(--border-strong); content: "/"; margin: 0 3px 0 8px; display: inline-block; }
  .forum-post .forum-header .forum-meta span:last-child::after { display: none; }
  .forum-post .forum-body { font-size: var(--fs-md); color: var(--text-dim); word-break: break-word; padding: 0; }
  .forum-post .forum-body img { max-width: 100%; height: auto; }
  .forum-post .forum-body .forum-thumbnail { margin-bottom: var(--s4); position: relative; }
  .forum-post .forum-footer { margin: var(--s5) calc(var(--s5) * -1) calc(var(--s5) * -1); padding: 0; border: 0; display: block; }
  .forum-post .forum-footer .forum-panel { background: var(--surface-2); padding: var(--s4) var(--s5); border-top: 1px solid var(--border); }
  .forum-post .forum-footer .forum-panel::after { display: block; content: ""; clear: both; }
  .forum-post .forum-footer .forum-users h5 { font-size: var(--fs-sm); color: var(--text-dim); margin-bottom: var(--s3); }
  .forum-post .forum-footer .forum-users a { display: inline-block; }
  .forum-post .forum-footer .forum-actions { display: block; border-top: 1px solid var(--border); padding: .75rem var(--s5); font-size: var(--fs-sm); }
  .forum-post .forum-footer .forum-actions::after { display: block; content: ""; clear: both; }
  .forum-post .forum-footer .forum-actions i { margin-right: 5px; }
  .forum-post .forum-footer .forum-actions a { margin-left: var(--s4); }
  .forum-post .forum-footer .forum-actions > div:first-child { float: left; }
  .forum-post .forum-footer .forum-actions > div:last-child { float: right; }
  .forum-post .forum-attachment { display: inline-block; float: left; margin-right: var(--s5); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
  .forum-post .forum-attachment a { display: block; padding: .6rem 1rem; font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); background: var(--accent); }
  .forum-post .forum-attachment span { display: block; padding: .4rem 1rem; font-size: var(--fs-xs); color: var(--text-faint); background: var(--surface-3); }

  /* ---- replies ---- */
  .forum-reply { padding: var(--s4) 0 var(--s5); border-bottom: 1px solid var(--border); margin-bottom: var(--s3); }
  .forum-reply::after { display: block; content: ""; clear: both; }
  .forum-reply:last-child { border-bottom: 0; }
  .forum-reply .forum-header::after { display: block; content: ""; clear: both; }
  .forum-reply .forum-header > div { float: left; }
  .forum-reply .forum-header > div:first-child { width: 46px; position: relative; margin-top: 3px; }
  .forum-reply .forum-header > div:first-child img { border-radius: 50%; }
  .forum-reply .forum-header > div:first-child .badge { position: absolute; bottom: -4px; right: -2px; border-radius: 50%; width: 22px; height: 22px; padding: 0; display: grid; place-items: center; }
  .forum-reply .forum-header > div:nth-child(2) { padding-left: var(--s4); }
  .forum-reply .forum-header > div:last-child { float: right; text-align: right; }
  .forum-reply .forum-header > div:last-child span { display: block; font-size: var(--fs-sm); color: var(--text-faint); }
  .forum-reply .forum-header .forum-title, .forum-reply .forum-header .forum-title h5 { font-size: var(--fs-md); margin: 0; color: #fff; }
  .forum-reply .forum-header .forum-title h5 { display: inline-block; }
  .forum-reply .forum-header .forum-meta { font-size: var(--fs-sm); color: var(--text-faint); }
  .forum-reply .forum-header .forum-meta span { margin-right: 5px; padding-right: 10px; border-right: 1px solid var(--border-strong); }
  .forum-reply .forum-header .forum-meta span:last-child { border-right: 0; }
  .forum-reply .forum-body { margin-top: var(--s4); padding-left: 62px; color: var(--text-dim); word-break: break-word; }
  .forum-reply .forum-body > p:last-child { margin-bottom: 0; }

  /* ---- blog-style posts ---- */
  .post { margin-bottom: var(--s5); padding-bottom: var(--s4); border-bottom: 1px solid var(--border); }
  .post::after { display: block; content: ""; clear: both; }
  .post .post-title { font-weight: 700; font-size: var(--fs-2xl); margin: 0; color: #fff; }
  .post .post-meta { font-size: var(--fs-sm); margin: 5px 0 var(--s4); color: var(--text-faint); }
  .post .post-meta span::after { color: var(--border-strong); content: "\2022"; margin: 0 5px; }
  .post .post-meta span:last-child::after { display: none; }
  .post .post-header { display: table; margin-bottom: var(--s4); }
  .post .post-header > div { display: table-cell; vertical-align: middle; }
  .post .post-header > div:first-child { width: 55px; vertical-align: top; }
  .post .post-header > div:first-child img { border-radius: 50%; }
  .post .post-header > div:last-child { padding-left: var(--s4); }
  .post-actions { margin: var(--s5) 0; padding-bottom: var(--s5); border-bottom: 1px solid var(--border); display: flex; }
  .post-related { margin-bottom: var(--s4); border-bottom: 1px solid var(--border); }
}
