/* Men in Motion — the comment block (views/partials/comments.php), on the
 * content agent's article and video pages. Loaded after app.css, whose
 * components it uses (.btn, .field, .alert, .pill, .check). Every rule is
 * scoped to .cmt so it cannot reach the page around it. Colours are app.css
 * tokens only; status is always words + colour; nothing new is below 4.5:1.
 * Phone first: one column, the rules after the box; two columns from 900px. */

.cmt { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--body); color: var(--ink); }
.cmt .cmt-title { display: flex; align-items: baseline; gap: 10px; font-size: 22px; margin: 0 0 16px; }
.cmt .cmt-n { display: inline-block; min-width: 26px; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font: 700 13px var(--body); text-align: center; }
.cmt .cmt-flash { margin: 0 0 16px; }
.cmt .cmt-flash:focus { outline: 3px solid var(--blue-600); outline-offset: 2px; }
.cmt .cmt-quiet { color: var(--ink-2); font-size: 14px; }

/* DOM order is box, rules, conversation — on a phone the rules come straight
   after the box. From 900px the rules sit beside the box AND the conversation,
   so a short box never leaves a gap above the comments. */
.cmt .cmt-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 24px; }
@media (min-width: 900px) {
  .cmt .cmt-layout { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "box rules" "thread rules"; grid-template-rows: auto 1fr; }
  .cmt .cmt-box { grid-area: box; }
  .cmt .cmt-rules { grid-area: rules; align-self: start; }
  .cmt .cmt-thread { grid-area: thread; }
}
.cmt .cmt-box, .cmt .cmt-rules, .cmt .cmt-thread { min-width: 0; }
.cmt .cmt-thread { margin-top: 8px; }

/* the box */
.cmt .cmt-form .field { margin-bottom: 6px; }
.cmt .cmt-form textarea, .cmt .cmt-reply textarea, .cmt .cmt-report textarea { width: 100%; }
.cmt .cmt-left { margin: 0 0 10px; text-align: right; font-variant-numeric: tabular-nums; }
.cmt .cmt-left.is-low { color: var(--warn); font-weight: 700; }
.cmt .cmt-first { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; color: var(--ink-2); }
.cmt .cmt-first svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--blue-600); }
.cmt .cmt-form .alert, .cmt .cmt-reply .alert, .cmt .cmt-report .alert, .cmt .cmt-confirm .alert { margin-bottom: 12px; }
.cmt .cmt-note { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 15px; }
.cmt .cmt-note p { margin: 0 0 8px; }
.cmt .cmt-note p:last-child { margin-bottom: 0; }
.cmt .cmt-note-act { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

/* the rules, beside the box */
.cmt .cmt-rules { background: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 14px; color: var(--ink-2); }
.cmt .cmt-rules h3 { font-size: 16px; color: var(--ink); margin: 0 0 8px; }
.cmt .cmt-rules p { margin: 0 0 10px; }
.cmt .cmt-rules ul { margin: 0 0 12px; padding-left: 18px; }
.cmt .cmt-rules li { margin: 0 0 4px; }
.cmt .cmt-danger { color: var(--bad); margin: 0 0 12px; }
.cmt .cmt-rules .cmt-danger { margin: 0; }

/* the conversation */
.cmt .cmt-empty { color: var(--ink-2); font-size: 15px; margin: 0; }
.cmt .cmt-list, .cmt .cmt-replies { list-style: none; margin: 0; padding: 0; }
.cmt .cmt-list > .cmt-item { padding: 16px 0; border-top: 1px solid var(--line); }
.cmt .cmt-list > .cmt-item:first-child { border-top: 0; padding-top: 0; }
.cmt .cmt-replies { margin: 12px 0 0 14px; padding-left: 14px; border-left: 3px solid var(--line); }
@media (min-width: 600px) { .cmt .cmt-replies { margin-left: 28px; } }
.cmt .cmt-replies > .cmt-item + .cmt-item { margin-top: 14px; }

.cmt .cmt-c { border-radius: 10px; }
.cmt .cmt-c:focus { outline: 3px solid var(--blue-600); outline-offset: 4px; }
.cmt .cmt-c.is-pending { background: var(--bg-soft); padding: 10px 12px; }
.cmt .cmt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 6px; }
.cmt .cmt-by { font-size: 15px; color: var(--ink); }
.cmt .cmt-meta time { font-size: 13px; color: var(--ink-3); }
.cmt .cmt-meta .pill { white-space: normal; }
/* Plain text as typed: line breaks kept, nothing becomes a link, a long word wraps. */
.cmt .cmt-text { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.cmt .cmt-gone { margin: 0; font-size: 14px; font-style: italic; color: var(--ink-2); }

.cmt .cmt-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; align-items: center; }
.cmt .cmt-actions .btn-link { font-size: 13.5px; padding: 6px 0; min-height: 24px; }
.cmt .cmt-actions .btn-link:hover { text-decoration: underline; }
.cmt .cmt-actions .cmt-del { color: var(--bad); }
.cmt .cmt-reported { font-size: 13px; color: var(--ink-2); }

/* the moving reply and report forms, and the delete confirmation */
.cmt .cmt-slot:empty { display: none; }
.cmt .cmt-slot { margin-top: 12px; }
.cmt .cmt-reply, .cmt .cmt-report, .cmt .cmt-confirm { background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; }
.cmt .cmt-confirm { margin-top: 10px; }
.cmt .cmt-confirm p { margin: 0 0 10px; font-size: 14px; }
.cmt .cmt-report-h { font-size: 16px; margin: 0 0 6px; }
.cmt .cmt-report > p.small { margin: 0 0 12px; color: var(--ink-2); }
.cmt .cmt-report fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cmt .cmt-report legend { padding: 0; margin-bottom: 8px; }
.cmt .cmt-reasons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; }
@media (min-width: 600px) { .cmt .cmt-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cmt .cmt-reasons .check { margin-bottom: 6px; color: var(--ink); }
.cmt .cmt-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cmt [hidden] { display: none !important; }
