/* Wiki page comments: public/js/wiki_comments.bundle.js */
.jwc-section { margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--border-color, #e2e6e9); }
/* hidden while the page is being edited (the editor is an earlier sibling) */
.wiki-editor:not(.hide) ~ .jwc-section { display: none; }
.jwc-title { font-size: 17px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.jwc-count { background: #ebeef0; color: #525f6b; border-radius: 99px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.jwc-loading, .jwc-empty { color: var(--text-muted, #8d99a6); font-size: 13px; margin: 8px 0; }

.jwc-composer { margin: 0 0 16px; }
.jwc-input-wrap { position: relative; }
/* a visible edge (WCAG 1.4.11, 3:1): the wiki's inputs have a white border on white (found in QA, 2026-12-06) */
.jwc-input { resize: vertical; min-height: 60px; font-size: 14px; }
.jwc-composer .jwc-input.form-control { border: 1px solid #7c8794; } /* beats the wiki's .form-control rule */
.jwc-composer-f { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 6px; }
.jwc-hint { margin-right: auto; color: var(--text-muted, #8d99a6); font-size: 12px; }
@media (max-width: 480px) { .jwc-hint { display: none; } }

.jwc-suggest { position: absolute; left: 0; top: 100%; z-index: 50; min-width: 260px; max-width: 100%; margin-top: 2px; background: var(--background-color, #fff); border: 1px solid var(--border-color, #d1d8dd); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); overflow: hidden; }
.jwc-sugg { padding: 6px 10px; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jwc-sugg.on, .jwc-sugg:hover { background: #eef4ff; }

.jwc-thread { border: 1px solid var(--border-color, #e2e6e9); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.jwc-resolved { opacity: .85; }
.jwc-resolved-bar { font-size: 12px; color: #16583a; margin-bottom: 8px; font-weight: 500; }
.jwc-comment { display: flex; gap: 10px; border-radius: 8px; transition: background .4s; }
.jwc-comment + .jwc-comment { margin-top: 10px; }
.jwc-flash { background: #fff6d6; }
.jwc-avatar { flex: 0 0 30px; height: 30px; border-radius: 50%; background: #e6f1ff; color: #1e63c4; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.jwc-main { flex: 1 1 auto; min-width: 0; }
.jwc-head { font-size: 13px; }
.jwc-when { color: var(--text-muted, #8d99a6); font-size: 12px; font-weight: normal; }
.jwc-body { font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.jwc-body a { text-decoration: underline; }
.jwc-deleted { font-style: italic; color: var(--text-muted, #8d99a6); }
.jwc-mention { background: #e6f1ff; color: #1e63c4; border-radius: 4px; padding: 0 3px; font-weight: 500; }
.jwc-acts { display: flex; gap: 12px; margin-top: 0; }
.jwc-act, .jwc-toggle-resolved { border: 0; background: none; padding: 0; min-height: 24px; min-width: 24px; font-size: 12px; color: var(--text-muted, #6b7a8a); cursor: pointer; }
/* WCAG 2.5.8: 24px targets everywhere; roomier on touch screens */
@media (pointer: coarse) { .jwc-act, .jwc-toggle-resolved { min-height: 36px; padding: 0 4px; } .jwc-acts { gap: 8px; margin-top: 0; } }
.jwc-act:hover, .jwc-toggle-resolved:hover { color: var(--text-color, #1f272e); text-decoration: underline; }
.jwc-toggle-resolved { margin: 4px 0 10px; font-size: 13px; }
.jwc-replies { margin: 10px 0 0 40px; padding-left: 12px; border-left: 2px solid var(--border-color, #e2e6e9); }
.jwc-reply-slot .jwc-composer { margin: 10px 0 0 40px; }
.jwc-comment .jwc-composer { margin: 6px 0 0; }
@media (max-width: 480px) { .jwc-replies, .jwc-reply-slot .jwc-composer { margin-left: 12px; } }

/* Dark theme. The wiki marks it with body.dark (not data-theme, which the dark rules
   used to target, so they never applied: found in QA, 2026-12-06). Both are kept. */
:is(body.dark, [data-theme="dark"]) .jwc-count { background: #30363d; color: #e5e7eb; }
:is(body.dark, [data-theme="dark"]) :is(.jwc-thread, .jwc-section, .jwc-replies) { border-color: #30363d; }
:is(body.dark, [data-theme="dark"]) :is(.jwc-avatar, .jwc-mention) { background: #10243f; color: #9cc3ff; }
:is(body.dark, [data-theme="dark"]) .jwc-composer .jwc-input.form-control { background: var(--input-bg-color, #242a30); color: var(--text-color, #f9fafb); border-color: #6b7280; }
:is(body.dark, [data-theme="dark"]) .jwc-input::placeholder { color: #9ca3af; }
:is(body.dark, [data-theme="dark"]) :is(.jwc-hint, .jwc-when, .jwc-act, .jwc-toggle-resolved, .jwc-deleted, .jwc-empty, .jwc-loading) { color: #a3acb9; }
:is(body.dark, [data-theme="dark"]) :is(.jwc-act, .jwc-toggle-resolved):hover { color: #f9fafb; }
:is(body.dark, [data-theme="dark"]) .jwc-suggest { background: #1c2128; border-color: #30363d; }
:is(body.dark, [data-theme="dark"]) :is(.jwc-sugg.on, .jwc-sugg:hover) { background: #10243f; }
:is(body.dark, [data-theme="dark"]) .jwc-flash { background: #3a3110; }
:is(body.dark, [data-theme="dark"]) .jwc-resolved-bar { color: #7ee2a8; }
@media print { .jwc-section { display: none; } }
