/*
 * component-compare.css — comparison components (matrix / vs / cards / before-after / checklist).
 * apb-rx-* namespace, tokens only, no !important. Rendered by trait-apb-component-render-compare.php.
 */
.apb-rx-cmp-head { text-align: center; max-width: 560px; margin: 0 auto 32px; }
.apb-rx-cmx-ey, .apb-rx-cvs-ey, .apb-rx-ccd-eyt, .apb-rx-cba-ey, .apb-rx-cck-ey {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--apb-rx-accent-text, var(--apb-rx-brand));
}
.apb-rx-cmx-h, .apb-rx-cvs-h, .apb-rx-ccd-h, .apb-rx-cba-h, .apb-rx-cck-h {
  font-family: var(--apb-rx-font-display, inherit); font-weight: 800; font-size: clamp(26px, 4.2vw, 40px); letter-spacing: -.02em; line-height: 1.06; margin: 8px 0 0;
}
.apb-rx-cmp-dash { color: var(--apb-rx-dim); }
/* optional competitor/brand logos (matrix column, vs header, option card) */
.apb-rx-cmx-logo { display: block; height: 26px; width: auto; max-width: 90px; margin: 0 auto 8px; object-fit: contain; }
.apb-rx-cvs-logo { height: 20px; width: auto; max-width: 70px; object-fit: contain; vertical-align: middle; margin-right: 8px; }
.apb-rx-ccd-img { display: block; height: 40px; width: auto; max-width: 120px; object-fit: contain; margin-bottom: 14px; }

/* 1 — matrix --------------------------------------------------------------------------------- */
.apb-rx-cmx { text-align: center; }
.apb-rx-cmx-table { max-width: 920px; margin: 0 auto; border: 1px solid var(--apb-rx-line); border-radius: calc(var(--apb-rx-radius) * 1.1); overflow-x: auto; text-align: left; }
/* a 3-4 column matrix stays readable on phones by scrolling horizontally instead of squishing */
.apb-rx-cmx-hrow, .apb-rx-cmx-row { min-width: 560px; }
.apb-rx-cmx-hrow, .apb-rx-cmx-row { display: grid; align-items: center; }
.apb-rx-cmx-hrow { border-bottom: 1px solid var(--apb-rx-line); }
.apb-rx-cmx-row { border-bottom: 1px solid var(--apb-rx-line); font-size: 14px; }
.apb-rx-cmx-row:last-child { border-bottom: 0; }
.apb-rx-cmx-col { padding: 16px; text-align: center; }
.apb-rx-cmx-col.on { background: var(--apb-rx-soft); }
.apb-rx-cmx-cname { font-weight: 800; font-size: 14px; }
.apb-rx-cmx-col.on .apb-rx-cmx-cname { color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-cmx-note { font-size: 11px; color: var(--apb-rx-dim); margin-top: 2px; }
.apb-rx-cmx-lab { padding: 15px 16px; color: var(--apb-rx-dim); }
.apb-rx-cmx-cell { padding: 15px 16px; text-align: center; }
.apb-rx-cmx-cell.on { background: var(--apb-rx-soft); font-weight: 600; }
.apb-rx-cmx-cell svg { color: var(--apb-rx-accent-text, var(--apb-rx-brand)); vertical-align: middle; }

/* 2 — head to head --------------------------------------------------------------------------- */
.apb-rx-cvs { text-align: center; }
.apb-rx-cvs-table { max-width: 680px; margin: 0 auto; border: 1px solid var(--apb-rx-line); border-radius: calc(var(--apb-rx-radius) * 1.2); overflow: hidden; background: var(--apb-rx-surface); text-align: left; }
.apb-rx-cvs-hrow, .apb-rx-cvs-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; }
.apb-rx-cvs-hrow { background: var(--apb-rx-soft); font-size: 13px; font-weight: 700; }
.apb-rx-cvs-hrow > div, .apb-rx-cvs-row > div { padding: 15px 16px; font-size: 14px; }
.apb-rx-cvs-row { border-top: 1px solid var(--apb-rx-line); }
.apb-rx-cvs-lab { color: var(--apb-rx-dim); }
.apb-rx-cvs-mine { text-align: center; font-weight: 600; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-cvs-theirs { text-align: center; color: var(--apb-rx-dim); }
.apb-rx-cvs-mine svg { color: var(--apb-rx-accent-text, var(--apb-rx-brand)); vertical-align: middle; }
.apb-rx-cvs-cta { margin-top: 26px; }

/* 3 — option cards --------------------------------------------------------------------------- */
.apb-rx-ccd-grid { display: grid; grid-template-columns: repeat(var(--apb-rx-cols, 3), 1fr); gap: 20px; }
.apb-rx-ccd-card { position: relative; border: 1px solid var(--apb-rx-line); border-radius: calc(var(--apb-rx-radius) * 1.2); padding: 28px; background: var(--apb-rx-surface); }
.apb-rx-ccd-card.on { border: 2px solid var(--apb-rx-brand); }
.apb-rx-ccd-badge { position: absolute; top: -11px; left: 28px; background: var(--apb-rx-brand); color: var(--apb-rx-accent-contrast, #fff); font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 4px 12px; border-radius: 999px; }
.apb-rx-ccd-ey { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-ccd-title { font-family: var(--apb-rx-font-display, inherit); font-weight: 800; font-size: 22px; letter-spacing: -.01em; margin: 8px 0 0; }
.apb-rx-ccd-text { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--apb-rx-dim); }
.apb-rx-ccd-feats { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 0; font-size: 14px; }
.apb-rx-ccd-feat { display: flex; gap: 9px; align-items: flex-start; }
.apb-rx-ccd-feat svg { flex: none; margin-top: 2px; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-ccd-cta { display: block; text-align: center; margin-top: 24px; }

/* 4 — before / after ------------------------------------------------------------------------- */
.apb-rx-cba-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; max-width: 900px; margin: 0 auto; }
.apb-rx-cba-col { border: 1px solid var(--apb-rx-line); border-radius: calc(var(--apb-rx-radius) * 1.2); padding: 26px; background: var(--apb-rx-surface); }
.apb-rx-cba-after { border: 2px solid var(--apb-rx-brand); }
.apb-rx-cba-lbl { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--apb-rx-dim); }
.apb-rx-cba-after .apb-rx-cba-lbl { color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-cba-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.5; }
.apb-rx-cba-neg { color: var(--apb-rx-dim); }
.apb-rx-cba-list li { position: relative; padding-left: 26px; }
.apb-rx-cba-list li::before { position: absolute; left: 0; top: 0; }
.apb-rx-cba-neg li::before { content: "\00d7"; color: var(--apb-rx-dim); font-weight: 700; }
.apb-rx-cba-pos li::before { content: "\2713"; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); font-weight: 700; }
.apb-rx-cba-arrow { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--apb-rx-brand); color: var(--apb-rx-accent-contrast, #fff); }

/* 5 — checklist ------------------------------------------------------------------------------ */
.apb-rx-cck-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
.apb-rx-cck-card { border: 1px solid var(--apb-rx-line); border-radius: calc(var(--apb-rx-radius) * 1.2); padding: 26px; background: var(--apb-rx-surface); }
.apb-rx-cck-ours { background: var(--apb-rx-soft); }
.apb-rx-cck-lbl { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 16px; }
.apb-rx-cck-other .apb-rx-cck-lbl { color: var(--apb-rx-dim); }
.apb-rx-cck-mk { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.apb-rx-cck-mk-yes { background: var(--apb-rx-brand); color: var(--apb-rx-accent-contrast, #fff); }
.apb-rx-cck-mk-no { background: var(--apb-rx-surface); border: 1px solid var(--apb-rx-line); color: var(--apb-rx-dim); }
.apb-rx-cck-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.5; }
.apb-rx-cck-other .apb-rx-cck-list { color: var(--apb-rx-dim); }

/* 6 — pros & cons ---------------------------------------------------------------------------- */
.apb-rx-cpc-img { display: block; width: 56px; height: 56px; border-radius: calc(var(--apb-rx-radius) * .8); object-fit: cover; margin: 14px auto 0; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.apb-rx-cpc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 820px; margin: 0 auto; }
.apb-rx-cpc-card { border: 1px solid var(--apb-rx-line); border-radius: calc(var(--apb-rx-radius) * 1.2); padding: 26px; background: var(--apb-rx-surface); }
.apb-rx-cpc-lbl { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 16px; }
.apb-rx-cpc-cons { color: var(--apb-rx-dim); }
.apb-rx-cpc-mk { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.apb-rx-cpc-mk-yes { background: var(--apb-rx-soft); color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-cpc-mk-no { background: var(--apb-rx-surface); border: 1px solid var(--apb-rx-line); color: var(--apb-rx-dim); }
.apb-rx-cpc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; font-size: 14px; line-height: 1.5; }
.apb-rx-cpc-list li { position: relative; padding-left: 26px; }
.apb-rx-cpc-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); font-weight: 700; }
.apb-rx-cpc-muted { color: var(--apb-rx-dim); }
.apb-rx-cpc-muted li::before { content: "\2013"; color: var(--apb-rx-dim); }

/* 7 — scorecard ------------------------------------------------------------------------------ */
.apb-rx-csc-wrap { max-width: 720px; margin: 0 auto; }
.apb-rx-csc-legend { display: flex; justify-content: flex-end; gap: 24px; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.apb-rx-csc-lg { display: flex; align-items: center; gap: 8px; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-csc-lg-theirs { color: var(--apb-rx-dim); }
.apb-rx-csc-logo { height: 22px; width: auto; max-width: 60px; object-fit: contain; }
.apb-rx-csc-sw { width: 12px; height: 12px; border-radius: calc(var(--apb-rx-radius, 16px) * .2); background: var(--apb-rx-brand); }
.apb-rx-csc-sw-o { background: var(--apb-rx-line); }
.apb-rx-csc-rows { display: flex; flex-direction: column; gap: 20px; }
.apb-rx-csc-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.apb-rx-csc-lab { font-weight: 600; }
.apb-rx-csc-score { color: var(--apb-rx-dim); }
.apb-rx-csc-bars { display: flex; flex-direction: column; gap: 6px; }
.apb-rx-csc-track { height: 10px; border-radius: 999px; background: var(--apb-rx-soft); overflow: hidden; }
.apb-rx-csc-fill { display: block; height: 100%; border-radius: 999px; }
.apb-rx-csc-mine { background: var(--apb-rx-brand); }
.apb-rx-csc-theirs { background: var(--apb-rx-line); }

/* 8 — quadrant ------------------------------------------------------------------------------- */
.apb-rx-cqd-wrap { max-width: 560px; margin: 0 auto; display: flex; gap: 12px; }
.apb-rx-cqd-yl { display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--apb-rx-dim); }
.apb-rx-cqd-plotwrap { flex: 1; }
.apb-rx-cqd-plot { position: relative; aspect-ratio: 1; border: 1px solid var(--apb-rx-line); border-radius: calc(var(--apb-rx-radius) * 1.1); background: var(--apb-rx-surface); }
.apb-rx-cqd-vline { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--apb-rx-line); }
.apb-rx-cqd-hline { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--apb-rx-line); }
.apb-rx-cqd-win { position: absolute; left: 50%; top: 0; right: 0; height: 50%; background: var(--apb-rx-soft); border-top-right-radius: calc(var(--apb-rx-radius) * 1.1); }
.apb-rx-cqd-mark { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.apb-rx-cqd-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--apb-rx-dim); }
.apb-rx-cqd-dot.on { width: 16px; height: 16px; background: var(--apb-rx-brand); box-shadow: 0 0 0 5px var(--apb-rx-soft); }
.apb-rx-cqd-logo { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; filter: grayscale(1); opacity: .75; }
.apb-rx-cqd-logo.on { width: 34px; height: 34px; filter: none; opacity: 1; box-shadow: 0 0 0 4px var(--apb-rx-soft), 0 2px 8px rgba(0,0,0,.14); }
.apb-rx-cqd-name { font-size: 12px; color: var(--apb-rx-dim); }
.apb-rx-cqd-name.on { font-weight: 700; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-cqd-xl { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--apb-rx-dim); margin-top: 10px; }

/* 9 — spectrum ------------------------------------------------------------------------------- */
.apb-rx-csp-wrap { max-width: 680px; margin: 0 auto; }
.apb-rx-csp-axes { display: flex; flex-direction: column; gap: 26px; }
.apb-rx-csp-ends { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--apb-rx-dim); margin-bottom: 12px; }
.apb-rx-csp-track { position: relative; height: 4px; border-radius: 999px; background: var(--apb-rx-line); }
.apb-rx-csp-mark { position: absolute; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.apb-rx-csp-mine { width: 18px; height: 18px; background: var(--apb-rx-brand); box-shadow: 0 0 0 4px var(--apb-rx-soft); z-index: 2; }
.apb-rx-csp-other { width: 14px; height: 14px; background: var(--apb-rx-surface); border: 2px solid var(--apb-rx-dim); }
.apb-rx-csp-legend { display: flex; justify-content: center; gap: 24px; font-size: 13px; font-weight: 700; margin-top: 28px; }
.apb-rx-csp-lg { display: flex; align-items: center; gap: 8px; color: var(--apb-rx-accent-text, var(--apb-rx-brand)); }
.apb-rx-csp-lg-o { color: var(--apb-rx-dim); }
.apb-rx-csp-logo { height: 22px; width: auto; max-width: 60px; object-fit: contain; }
.apb-rx-csp-sw { width: 14px; height: 14px; border-radius: 50%; background: var(--apb-rx-brand); }
.apb-rx-csp-sw-o { background: var(--apb-rx-surface); border: 2px solid var(--apb-rx-dim); }

/* 10 — image slider -------------------------------------------------------------------------- */
.apb-rx-cis-frame { position: relative; border-radius: calc(var(--apb-rx-radius) * 1.3); overflow: hidden; aspect-ratio: 16/10; background: var(--apb-rx-soft); user-select: none; max-width: 820px; margin: 0 auto; touch-action: none; }
.apb-rx-cis-after, .apb-rx-cis-before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Clip the full-size "before" layer with clip-path (NOT a width-clipped wrapper) so both images stay the
   exact frame size at every viewport — a fixed-width inner image would misalign below the max width. */
.apb-rx-cis-beforewrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--apb-cis-p, 50%)) 0 0); }
.apb-rx-cis-lbl { position: absolute; bottom: 14px; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.apb-rx-cis-lbl-b { left: 14px; background: color-mix(in srgb, var(--apb-rx-surface) 85%, transparent); color: var(--apb-rx-ink); }
.apb-rx-cis-lbl-a { right: 14px; background: var(--apb-rx-brand); color: var(--apb-rx-accent-contrast, #fff); }
.apb-rx-cis-handle { position: absolute; top: 0; bottom: 0; left: var(--apb-cis-p, 50%); transform: translateX(-50%); width: 40px; display: flex; align-items: center; justify-content: center; cursor: ew-resize; }
.apb-rx-cis-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 2px; background: var(--apb-rx-surface); }
.apb-rx-cis-handle svg { position: relative; width: 40px; height: 40px; padding: 11px; border-radius: 50%; background: var(--apb-rx-surface); color: var(--apb-rx-ink); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.apb-rx-cis-cap { text-align: center; font-size: 13px; color: var(--apb-rx-dim); margin: 14px 0 0; }

@media (max-width: 720px) {
  .apb-rx-ccd-grid, .apb-rx-cck-grid, .apb-rx-cpc-grid { grid-template-columns: 1fr; }
  .apb-rx-cba-grid { grid-template-columns: 1fr; }
  .apb-rx-cba-arrow { transform: rotate(90deg); margin: 0 auto; }
}
