/* ═══════════════════════════════════════════════════════════════════════════
   PolitiDex — Biggest Controversies section (controversies.js)
   A visually distinct, neutral "flashpoints" block on the politician profile.
   Colour tokens mirror the Say-vs-Do verdict palette (say-vs-do.css) so a
   contradiction reads red, a red flag amber — consistent across the app.
   ═══════════════════════════════════════════════════════════════════════════ */

.pdx-ctv {
  position: relative;
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.05), rgba(10, 15, 30, 0) 55%),
    rgba(12, 17, 32, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 0.95rem;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 22px rgba(248, 113, 113, 0.06);
}
/* Distinct left rail so the section is unmistakable against neighbouring blocks. */
.pdx-ctv::before {
  content: "";
  position: absolute;
  left: 0; top: 0.9rem; bottom: 0.9rem;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f87171, #f59e0b);
  opacity: 0.85;
}

.pdx-ctv-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.pdx-ctv-title { margin-bottom: 0.35rem; }
.pdx-ctv-count {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}
.pdx-ctv-note { margin-bottom: 0.9rem !important; }

.pdx-ctv-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* ── individual flashpoint card ─────────────────────────────────────────────── */
.pdx-ctv-card {
  --ctv-accent: #f59e0b;
  position: relative;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--ctv-accent);
  border-radius: 0.7rem;
  padding: 0.8rem 0.9rem 0.85rem;
}
.pdx-ctv-card.v-contradicts { --ctv-accent: #f87171; border-color: rgba(248, 113, 113, 0.28); }
.pdx-ctv-card.v-flag        { --ctv-accent: #f59e0b; border-color: rgba(245, 158, 11, 0.28); }
.pdx-ctv-card.v-consistent  { --ctv-accent: #4ade80; border-color: rgba(74, 222, 128, 0.28); }

.pdx-ctv-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}
.pdx-ctv-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--ctv-accent);
  background: color-mix(in srgb, var(--ctv-accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--ctv-accent) 40%, transparent);
  border-radius: 0.4rem;
  min-width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}
.pdx-ctv-verdict {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ctv-accent);
  background: color-mix(in srgb, var(--ctv-accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--ctv-accent) 38%, transparent);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}
.pdx-ctv-vico { font-size: 0.8rem; line-height: 1; }
.pdx-ctv-issue {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: #cbd9ec;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
}
.pdx-ctv-date {
  margin-left: auto;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: #7e92b4;
  white-space: nowrap;
}

.pdx-ctv-said {
  font-size: 0.75rem;
  line-height: 1.5;
  color: #b9cae3;
  background: rgba(96, 165, 250, 0.07);
  border-left: 2px solid rgba(96, 165, 250, 0.4);
  border-radius: 0.3rem;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.5rem;
}
.pdx-ctv-said-lb {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-right: 0.25rem;
}

.pdx-ctv-headline {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #f4f8ff;
  margin: 0 0 0.3rem;
}
.pdx-ctv-summary {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #9fb4d4;
  margin: 0 0 0.65rem;
}

/* ── card body disclosure ─────────────────────────────────────────────────────
   The quote and the summary fold behind one control per card so the collapsed
   section reads as three headlines with verdicts, not three paragraphs. Native
   <details>, styled to match the Official Record's issue rows (.pdxor-row >
   summary) — same marker suppression, same caret, same rotation — so the profile
   keeps one disclosure vocabulary rather than gaining a third.

   The last child inside the body drops its bottom margin: .pdx-ctv-said and
   .pdx-ctv-summary both carry one for the flow they used to sit in, and keeping
   it here would open a gap between the body and the action rail below it. */
.pdx-ctv-more { margin: 0 0 0.55rem; }
.pdx-ctv-more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.3rem 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pdx-ctv-more > summary::-webkit-details-marker { display: none; }
.pdx-ctv-more > summary::marker { content: ""; }
.pdx-ctv-more > summary:focus-visible {
  outline: 2px solid #7fb4ff;
  outline-offset: 3px;
  border-radius: 0.4rem;
}
.pdx-ctv-more-lbl {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9fc6e8;
}
.pdx-ctv-caret {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #7e93b3;
  transition: transform 0.15s ease;
}
.pdx-ctv-more[open] .pdx-ctv-caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .pdx-ctv-caret { transition: none; }
}
.pdx-ctv-more-body > :last-child { margin-bottom: 0; }

/* ── action rail: source + jumps to spotlight / receipt / record ────────────── */
.pdx-ctv-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pdx-ctv-act {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #cbd9ec;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  padding: 0.32rem 0.6rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.pdx-ctv-act:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.pdx-ctv-act:focus-visible {
  outline: 2px solid var(--ctv-accent);
  outline-offset: 2px;
}
.pdx-ctv-src {
  color: #a9e6c9;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.28);
}
.pdx-ctv-src:hover {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.45);
}

@media (max-width: 480px) {
  .pdx-ctv-date { margin-left: 0; width: 100%; }
  .pdx-ctv-act { font-size: 0.7rem; }
}
