/* ═══════════════════════════════════════════════════════════════
   LAWRYSE — PUBLIC VOICES (W5)

   The board listing, a single question + its replies, and the ask/reply/
   vote forms (inc/public-voices.php). Reuses .lw-field, .lw-btn, .lw-grid
   and the archive head/empty-state classes rather than inventing parallel
   ones — same discipline as directory.css.

   The one rule that matters most here: an ATTORNEY reply and a PUBLIC
   reply must never look like the same card with a different label
   (MASTER §21.1.1) — .lw-pv-reply--attorney and .lw-pv-reply--public are
   deliberately NOT just a colour swap of one base style.
   ═══════════════════════════════════════════════════════════════ */

/* ── Ask a question ──────────────────────────────────────────────── */

.lw-pv-ask,
.lw-pv-reply-form {
  margin-bottom: var(--lw-s7);
  padding: var(--lw-s5);
  border: 1px solid var(--lw-border);
  border-radius: var(--lw-radius);
  background: var(--lw-canvas-alt);
}

/* The ask box — Alice, 2026-09-24: "we're not using teal anymore" (the
   discussions-page redesign). Plain bordered panel, same family as the
   reply form beneath a question, rather than a second background colour. */
.lw-pv-ask {
  border-color: var(--lw-border);
  background: var(--lw-canvas-alt);
}
.lw-pv-ask__title {
  margin: 0 0 var(--lw-s2);
  font-family: var(--lw-font-head);
  font-size: var(--lw-fs-lg);
  font-weight: 700;
  color: var(--lw-ink);
}
.lw-pv-ask__lede {
  margin: 0;
  font-size: var(--lw-fs-sm);
  color: var(--lw-body);
}

.lw-pv-ask__field {
  display: block;
  width: 100%;
  margin-top: var(--lw-s3);
}

.lw-pv-ask .lw-btn,
.lw-pv-reply-form .lw-btn {
  margin-top: var(--lw-s4);
}

.lw-pv-ask__status {
  display: inline-block;
  margin: var(--lw-s3) 0 0 var(--lw-s3);
  font-size: var(--lw-fs-sm);
  color: var(--lw-muted);
}
.lw-pv-ask__status.is-error { color: var(--lw-red); }

/* ── Board listing ───────────────────────────────────────────────── */

.lw-pv-board__title {
  margin: 0 0 var(--lw-s3);
  font-family: var(--lw-font-head);
  font-size: var(--lw-fs-lg);
  font-weight: 700;
  color: var(--lw-ink);
}

/* Latest / Most Discussed / Unanswered — client-side tab switcher, same
   underline-on-current pattern as the "Take a Vote | Poll Results" tabs
   (components.css) rather than a third distinct tab style. */
.lw-pv-tabs {
  display: flex;
  gap: var(--lw-s5);
  margin-bottom: var(--lw-s4);
  border-bottom: 1px solid var(--lw-border);
}
.lw-pv-tabs__tab {
  padding: var(--lw-s2) 0 var(--lw-s3);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: var(--lw-fs-sm);
  font-weight: 600;
  color: var(--lw-muted);
  cursor: pointer;
}
.lw-pv-tabs__tab:hover { color: var(--lw-ink); }
.lw-pv-tabs__tab.is-current {
  border-bottom-color: var(--lw-red);
  color: var(--lw-red);
}

.lw-pv-board__empty {
  margin: var(--lw-s5) 0;
  font-size: var(--lw-fs-sm);
  color: var(--lw-muted);
}

/* One column, full width (Alice's discussions-page redesign, 2026-09-24 —
   was a 2-up grid). Plain bordered white card, same family as every other
   content card on the site — the teal treatment is retired (see the ask
   box above). */
.lw-pv-grid {
  display: flex;
  flex-direction: column;
  gap: var(--lw-s4);
  margin-bottom: var(--lw-s6);
}

.lw-pv-card {
  display: block;
  padding: var(--lw-s5);
  border: 1px solid var(--lw-border);
  border-radius: var(--lw-radius);
  background: var(--lw-canvas);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.lw-pv-card:hover {
  border-color: var(--lw-red);
  box-shadow: var(--lw-shadow-soft);
}

.lw-pv-card__heading {
  margin: 0 0 var(--lw-s2);
  font-family: var(--lw-font-head);
  font-size: var(--lw-fs-md);
  font-weight: 700;
  color: var(--lw-ink);
}

.lw-pv-card__excerpt {
  margin: 0 0 var(--lw-s4);
  font-size: var(--lw-fs-sm);
  color: var(--lw-body);
  line-height: var(--lw-lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lw-pv-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--lw-s3);
}

.lw-pv-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--lw-fs-xs);
  font-weight: 600;
  color: var(--lw-muted);
}
.lw-pv-card__icon { width: 16px; height: 16px; flex: none; }

.lw-pv-card__more {
  font-size: var(--lw-fs-xs);
  font-weight: 600;
  color: var(--lw-red);
  white-space: nowrap;
}

/* ── Replies ─────────────────────────────────────────────────────── */

.lw-pv-replies {
  display: flex;
  flex-direction: column;
  gap: var(--lw-s4);
  margin-bottom: var(--lw-s6);
}

.lw-pv-reply {
  position: relative;
  padding: var(--lw-s4) var(--lw-s5);
  padding-right: calc(var(--lw-s5) + 3rem);
  border-radius: var(--lw-radius);
  border: 1px solid var(--lw-border);
  background: var(--lw-canvas);
}

/* The whole point of §21.1.1: an attorney reply must read as verified —
   a red accent rule, not just a badge in the corner — and a public reply
   must never borrow it. */
.lw-pv-reply--attorney {
  border-left: 3px solid var(--lw-red);
}

.lw-pv-reply--public {
  background: var(--lw-canvas-alt);
}

/* A LAWRYSE reply (migration 64, Alice 2026-08-07 — "the reply needs to be
   highlighted in some way to indicate this is not from attorneys or the
   public but Lawryse itself"). Solid Midnight Navy, not a colour swap of
   the attorney or public treatment — same discipline as §21.1.1 above:
   three kinds of reply, three genuinely different looks, never a badge
   alone doing the work. */
.lw-pv-reply--lawryse {
  border: 1px solid var(--lw-ink);
  background: var(--lw-ink);
  color: #fff;
}
.lw-pv-reply--lawryse .lw-pv-reply__name,
.lw-pv-reply--lawryse .lw-pv-reply__body {
  color: #fff;
}
.lw-pv-reply--lawryse .lw-badge-lawryse {
  display: inline-block;
  margin-left: var(--lw-s2);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--lw-red);
  color: #fff;
  font-size: var(--lw-fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.lw-pv-reply__head {
  margin-bottom: var(--lw-s3);
}

.lw-pv-reply__author {
  display: flex;
  align-items: center;
  gap: var(--lw-s3);
  color: inherit;
  text-decoration: none;
}
.lw-pv-reply__author:hover .lw-pv-reply__name { color: var(--lw-red); }

.lw-pv-reply__author .lw-att-card__media {
  flex: none;
  width: 40px;
  height: 40px;
  margin-bottom: 0;
}

.lw-pv-reply__name {
  display: block;
  font-weight: 600;
  color: var(--lw-ink);
}

.lw-pv-reply__firm {
  display: block;
  margin-top: 2px;
  font-size: var(--lw-fs-xs);
  color: var(--lw-muted);
}

.lw-pv-reply__author--public {
  display: block;
}

/* The disclaimer is PART of the identity line, not a footnote — it has to
   be seen before the reply is read, not after (§21.1.1). */
.lw-pv-reply__disclaimer {
  display: block;
  margin-top: 2px;
  font-size: var(--lw-fs-xs);
  font-style: italic;
  color: var(--lw-muted);
}

.lw-pv-reply__body {
  margin: 0;
  font-size: var(--lw-fs-sm);
  line-height: var(--lw-lh-snug);
  color: var(--lw-body);
  white-space: pre-wrap;
}

/* ── Vote ────────────────────────────────────────────────────────── */

.lw-pv-vote {
  position: absolute;
  top: var(--lw-s4);
  right: var(--lw-s4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--lw-s2) var(--lw-s2);
  border: 1px solid var(--lw-border);
  border-radius: var(--lw-radius-sm);
  background: var(--lw-canvas);
  font-size: var(--lw-fs-xs);
  font-weight: 700;
  color: var(--lw-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lw-pv-vote svg { width: 16px; height: 16px; }
.lw-pv-vote:hover { border-color: var(--lw-red); color: var(--lw-red); }
.lw-pv-vote.is-voted { border-color: var(--lw-red); color: var(--lw-red); background: var(--lw-pink-soft); }
.lw-pv-vote:disabled { opacity: 0.6; cursor: default; }

/* ── Reply form ──────────────────────────────────────────────────── */

.lw-pv-reply-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lw-s4);
  margin-top: var(--lw-s3);
}
.lw-pv-reply-form__row .lw-field { flex: 1 1 16rem; }

.lw-pv-reply-form__anon {
  display: inline-flex;
  align-items: center;
  gap: var(--lw-s2);
  font-size: var(--lw-fs-sm);
  color: var(--lw-body);
  white-space: nowrap;
}

.lw-pv-reply-form input[type="text"]#lw-pv-reply-name {
  display: block;
  width: 100%;
  margin-top: var(--lw-s3);
}

.lw-pv-reply-form__note {
  margin: var(--lw-s3) 0 0;
  font-size: var(--lw-fs-xs);
  color: var(--lw-muted);
}

/* ── Question → replies rhythm (Alice, 2026-08-07) ──────────────────
   "You have to scroll halfway down the page to get the first answer."
   .lw-archive__head (padding-bottom + margin-bottom) and
   .lw-directory-profile__subhead (margin-top) are shared with every other
   archive/directory page, so tightened HERE only — scoped to the single-
   question template (.lw-pv-question, set in the template itself) rather
   than changed at the source, which would also flatten spacing on article
   archives and firm pages that were never part of this complaint. */
.lw-pv-question .lw-archive__head {
  padding-bottom: var(--lw-s3);
  margin-bottom: var(--lw-s4);
}
.lw-pv-question .lw-directory-profile__subhead {
  margin-top: 0;
}

/* Signed-in attorney replying from lawryse.com (cross-domain sign-in). */
.lw-pv-reply-form__attorney {
  margin: 0 0 var(--lw-s3);
  padding: var(--lw-s3);
  border-left: 3px solid #9D1624;
  background: #f6f7f9;
  font-size: 0.9rem;
}
.lw-pv-reply-form [hidden] {
  display: none !important;
}

/* ── "You may also want to read…" (plain text links, never thumbnails) ── */

.lw-pv-suggest {
  margin: var(--lw-s4) 0;
  font-size: var(--lw-fs-sm);
  color: var(--lw-muted);
}
.lw-pv-suggest[hidden] { display: none; }
.lw-pv-suggest__lead {
  margin: 0 0 var(--lw-s2);
  font-style: italic;
}
.lw-pv-suggest__list {
  margin: 0;
  padding-left: var(--lw-s5);
}
.lw-pv-suggest__list li + li { margin-top: var(--lw-s1, 0.25rem); }
.lw-pv-suggest__list a { color: var(--lw-teal); }

/* ── Help lines shown to someone in distress ── */

.lw-pv-support {
  margin: var(--lw-s4) 0;
  padding: var(--lw-s4);
  border-left: 4px solid var(--lw-red);
  background: var(--lw-surface, #f7f7f7);
  font-size: var(--lw-fs-sm);
}
.lw-pv-support[hidden] { display: none; }
.lw-pv-support__lead { margin: 0 0 var(--lw-s2); font-weight: 600; }
.lw-pv-support__list { margin: 0; padding-left: var(--lw-s5); }
.lw-pv-support__list a { color: var(--lw-red); }

/* ── Quick links at the top of a single question ── */

.lw-pv-backlink {
  margin: 0 0 var(--lw-s3);
  font-size: var(--lw-fs-sm);
  color: var(--lw-muted);
}
.lw-pv-backlink a { color: var(--lw-teal); }
.lw-pv-backlink span { margin: 0 var(--lw-s2); }
