/* Community discussion threads: new-thread form, opening post + reply posts, post
   controls, status badges, edit form and reply form — split out of style.css. Used
   on thread pages. */

.thread-opening-post,
.thread-post { margin: 0.6rem 0; overflow: hidden; }

.thread-opening-post .post-header { padding: 0.65rem 1rem; background: var(--clr-surface-alt); border-bottom: 1px solid var(--clr-border); display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

.post-author { font-weight: 600; }
.post-timestamp { font-size: 0.82rem; color: var(--clr-text-muted); }
.post-permalink { text-decoration: none; }
.post-permalink:hover { text-decoration: underline; color: var(--clr-link); }
.thread-post:target,
.thread-opening-post:target { border-color: var(--clr-link); box-shadow: 0 0 0 1px var(--clr-link); }
.post-edited-label { font-size: 0.82rem; color: var(--clr-text-muted); font-style: italic; }
.post-visibility-label { font-size: 0.82rem; color: var(--clr-text-muted); font-style: italic; }

.post-controls { margin-left: auto; display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.post-controls button,
.post-controls input[type=text] { font-size: 0.82rem; padding: 0.2rem 0.5rem; }

.thread-opening-post .post-body,
.thread-post .post-body { padding: 0.9rem 1rem; word-break: break-word; line-height: 1.6; }
.thread-opening-post .post-body > *:first-child,
.thread-post .post-body > *:first-child { margin-top: 0; }
.thread-opening-post .post-body > *:last-child,
.thread-post .post-body > *:last-child { margin-bottom: 0; }
/* Reply posts use <details> */
.thread-post > summary { list-style: none; cursor: pointer; padding: 0.65rem 1rem; background: var(--clr-surface-alt); border-bottom: 1px solid transparent; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; user-select: none; }
.thread-post > summary::-webkit-details-marker { display: none; }
.thread-post[open] > summary { border-bottom-color: var(--clr-border); }

.thread-post--hidden-by-author { border-color: var(--clr-border); }
.thread-post--hidden-by-author > summary { color: var(--clr-text-muted); }

.thread-post--moderator-deleted { border-color: var(--clr-danger-border); border-left: 3px solid var(--clr-danger); }
.thread-post--moderator-deleted > summary { color: var(--clr-danger); }

.thread-post--self-deleted { background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-small); padding: 0.5rem 1rem; color: var(--clr-text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }

.post-edit-form { padding: 0 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.post-edit-form .edit-form-actions { display: flex; gap: 0.4rem; }
.post-edit-form textarea { min-height: 100px; }

.thread-reply-form { padding: 1rem; background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-large); margin-top: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.thread-reply-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.thread-reply-hint { font-size: 0.8rem; color: var(--clr-text-muted); }
