/* Pakstoor :: pks-scams.css :: v1.0-000001 :: 2026-10-24 */
/*
  Copyright (c) 2026 Pakstoor (Pty) Ltd. All rights reserved.
  "Common marketplace scams, and how Pakstoor stops them" (owner 2026-10-24): six rows, each pairing a common
  marketplace scam with the Pakstoor safeguard that stops it. One component, used on the home page (/, in place of
  the four "What Pakstoor stops" cards), on Safety (/safety) and on the Trust Centre (/trust). Every string lives in
  js/pks-scams-i18n.js (English and Afrikaans), so the three pages always say the same thing.
  Desktop and tablet (721 px and up): one table-like panel, a column header row, then six rows (the scam on the left,
  muted; the safeguard on the right with the Pakstoor orange icon). Phones (720 px and less): six stacked cards, each
  half labelled "The scam" / "How Pakstoor stops it" (on wider screens those labels are read by screen readers only,
  and the column header row is shown instead).
  Brand Pack v1.0: orange #F47A20 is the Pakstoor emphasis (in light mode a fill only, orange text is #B5520F), red
  only marks the scam label, no gold. Light is the default theme (html[data-theme="light"]); dark tokens apply to
  any other value. No motion, no will-change, no backdrop-filter, no filters (iPhone rules).
*/

/* ---- tokens: dark (no theme attribute, or an explicit dark choice) ---------------------------------------- */
.pks-scams {
  --sc-panel: rgba(255, 255, 255, .035);
  --sc-panel-line: rgba(255, 255, 255, .11);
  --sc-row-line: rgba(255, 255, 255, .08);
  --sc-scam-bg: rgba(0, 0, 0, .22);
  --sc-head-bg: rgba(255, 255, 255, .03);
  --sc-scam-ink: #B8B1AA;
  --sc-label: #9C958E;
  --sc-num: #8C857E;
  --sc-bad: #F05252;
  --sc-fix-lead: #F4F1EE;
  --sc-fix-body: #BDB7B1;
  --sc-brand: #F47A20;
  --sc-brand-text: #FF9A52;
  --sc-icon-bg: rgba(244, 122, 32, .14);
  --sc-icon-line: rgba(244, 122, 32, .40);
  --sc-icon-ink: #FF9A52;
}
/* ---- tokens: light (the default theme) ----------------------------------------------------------------------- */
html[data-theme="light"] .pks-scams {
  --sc-panel: #FFFFFF;
  --sc-panel-line: #E6E3DE;
  --sc-row-line: #ECE9E4;
  --sc-scam-bg: #F7F6F3;
  --sc-head-bg: #FBFAF8;
  --sc-scam-ink: #57514B;
  --sc-label: #6B655E;
  --sc-num: #8A847D;
  --sc-bad: #DC2626;
  --sc-fix-lead: #1E1B18;
  --sc-fix-body: #4A453F;
  --sc-brand: #F47A20;
  --sc-brand-text: #B5520F;
  --sc-icon-bg: #FFF1E5;
  --sc-icon-line: rgba(181, 82, 15, .28);
  --sc-icon-ink: #B5520F;
}

/* ---- the panel ------------------------------------------------------------------------------------------------- */
.pks-scams {
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  text-align: left;
  background: var(--sc-panel);
  border: 1px solid var(--sc-panel-line);
  border-radius: 16px;
  overflow: hidden;
}
html[data-theme="light"] .pks-scams {
  box-shadow: 0 1px 2px rgba(20, 18, 15, .04), 0 10px 28px -18px rgba(20, 18, 15, .20);
}
.pks-scams *, .pks-scams *::before, .pks-scams *::after { box-sizing: border-box; }

/* column header row (desktop and tablet; hidden from screen readers, every row carries its own labels) */
.pks-scams .pks-scams-cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--sc-head-bg);
}
.pks-scams .pks-scams-col {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 13px 24px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pks-scams .pks-scams-col.is-scam {
  color: var(--sc-label);
  background: var(--sc-scam-bg);
  border-right: 1px solid var(--sc-row-line);
}
.pks-scams .pks-scams-col.is-fix { color: var(--sc-brand-text); }
.pks-scams .pks-scams-col::before,
.pks-scams .pks-scams-tag::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sc-brand);
}
.pks-scams .pks-scams-col.is-scam::before,
.pks-scams .pks-scams-tag.is-scam::before { background: var(--sc-bad); }

/* ---- rows ------------------------------------------------------------------------------------------------------ */
.pks-scams .pks-scams-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pks-scams .pks-scams-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--sc-row-line);
}
.pks-scams .pks-scams-row::before,
.pks-scams .pks-scams-row::marker { content: none; }

/* the scam (muted) */
.pks-scams .pks-scams-scam {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 20px 24px;
  background: var(--sc-scam-bg);
  border-right: 1px solid var(--sc-row-line);
}
.pks-scams .pks-scams-num {
  grid-column: 1;
  min-width: 2ch;
  padding-top: 3px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--sc-num);
  font-variant-numeric: tabular-nums;
}
.pks-scams .pks-scams-scam-text {
  grid-column: 2;
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sc-scam-ink);
  overflow-wrap: break-word;
}

/* the safeguard (Pakstoor emphasis) */
.pks-scams .pks-scams-fix {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
  min-width: 0;
  padding: 20px 24px;
}
.pks-scams .pks-scams-icon {
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sc-icon-bg);
  border: 1px solid var(--sc-icon-line);
  color: var(--sc-icon-ink);
}
.pks-scams .pks-scams-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pks-scams .pks-scams-fix-text {
  grid-column: 2;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--sc-fix-body);
  overflow-wrap: break-word;
}
.pks-scams .pks-scams-lead {
  display: block;
  margin: 0 0 3px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--sc-fix-lead);
}

/* per-row labels: screen readers only on wider screens (the column header row shows them), visible on phones */
.pks-scams .pks-scams-tag {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.pks-scams .pks-scams-tag.is-scam { color: var(--sc-label); }
.pks-scams .pks-scams-tag.is-fix { color: var(--sc-brand-text); }

/* ---- phones: six stacked cards ------------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .pks-scams {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  html[data-theme="light"] .pks-scams { box-shadow: none; }
  .pks-scams .pks-scams-cols { display: none; }
  .pks-scams .pks-scams-list { display: grid; gap: 12px; }
  .pks-scams .pks-scams-row {
    grid-template-columns: minmax(0, 1fr);
    border: 1px solid var(--sc-panel-line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--sc-panel);
  }
  html[data-theme="light"] .pks-scams .pks-scams-row {
    box-shadow: 0 1px 2px rgba(20, 18, 15, .04), 0 8px 22px -16px rgba(20, 18, 15, .18);
  }
  .pks-scams .pks-scams-scam,
  .pks-scams .pks-scams-fix {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
    padding: 14px 16px;
  }
  .pks-scams .pks-scams-scam {
    border-right: 0;
    border-bottom: 1px solid var(--sc-row-line);
  }
  .pks-scams .pks-scams-fix { padding-bottom: 16px; }
  .pks-scams .pks-scams-num { padding-top: 0; }
  .pks-scams .pks-scams-tag {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .pks-scams .pks-scams-scam-text,
  .pks-scams .pks-scams-fix-text { flex: 1 1 100%; }
  .pks-scams .pks-scams-scam-text { font-size: 15.5px; }
  .pks-scams .pks-scams-icon { width: 30px; height: 30px; }
  .pks-scams .pks-scams-icon svg { width: 16px; height: 16px; }
  .pks-scams .pks-scams-lead { font-size: 15px; }
  .pks-scams .pks-scams-fix-text { font-size: 14px; }
}

/* ---- where the component sits ---------------------------------------------------------------------------------- */
/* home page: inside the existing section shell (.stops: eyebrow, title, "See how it works" link) */
.stops .pks-scams { margin-bottom: var(--s-8, 32px); }
/* Trust Centre: a section head without an article numeral */
.dossier-page .pks-scams-section .dossier-section-head { grid-template-columns: minmax(0, 1fr); }
.dossier-page .pks-scams-section .pks-scams { margin-top: 32px; }
/* Safety: inside a pks-visual-section */
.pks-visual-section .pks-scams { margin-top: 20px; }

@media print {
  .pks-scams, .pks-scams .pks-scams-row { box-shadow: none !important; }
  .pks-scams .pks-scams-row { break-inside: avoid; }
}
