/* ── Visualizer entry components (VZ family: ::viz-card) ─────────────────────
   Shipped by post.twig only when the article embeds one ('apw-viz' in the
   rendered HTML). Card look matches the thank-you page visualizer card (dark
   navy gradient, green accent); float metrics mirror blog-product.css
   .apw-align-inline-end so all floated families sit identically. */

.apw-viz-card {
  background: linear-gradient(135deg, #0f1b2d 0%, #1a2b4e 100%);
  border-radius: 6px;
  padding: 1rem;
  margin: 1.25rem 0;
}
.apw-viz-float { float: right; width: min(22rem, 46%); margin: .35rem 0 1rem 1.4rem; }
@media (max-width: 767px) {
  .apw-viz-float { float: none; width: auto; margin: 1.25rem 0; }
}

/* before/after media — clip-path split, CSS defaults to 50/50 so the slider
   reads even before (or without) viz.js */
.apw-viz-slider,
.apw-viz-still { position: relative; display: block; overflow: hidden; border-radius: 4px; margin-bottom: .8rem; line-height: 0; }
.apw-viz-slider { cursor: ew-resize; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.apw-viz-slider img,
.apw-viz-still img { display: block; width: 100%; height: auto; }
.apw-viz-after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.apw-viz-after img { width: 100%; height: 100%; object-fit: cover; }
.apw-viz-tag {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  line-height: 1.4; padding: 2px 6px; border-radius: 3px; pointer-events: none;
}
.apw-viz-tag--after { left: auto; right: 8px; }
.apw-viz-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none; z-index: 2;
}
.apw-viz-handle-line { flex: 1; width: 2px; background: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .4); }
.apw-viz-handle-grip {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: #333;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); flex-shrink: 0;
}

/* body — text rules are scoped under .apw-viz-card (0-2-0) so they beat the
   blog theme's .post-content p / .post-content a (0-1-1), same trick as the
   IQ family */
.apw-viz-card .apw-viz-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: #4ecb71; margin-bottom: .35rem;
}
.apw-viz-card .apw-viz-head { color: #fff; font-weight: 700; font-size: 1.05rem; line-height: 1.3; margin: 0 0 .35rem; }
.apw-viz-card .apw-viz-sub { color: rgba(255, 255, 255, .75); font-size: .88rem; line-height: 1.5; margin: 0 0 .8rem; }
.apw-viz-card .apw-viz-cta {
  display: block; width: 100%; text-align: center;
  background: #4ecb71; color: #0f1b2d;
  font-weight: 700; font-size: .85rem;
  padding: .5rem .9rem; border-radius: 4px;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.apw-viz-card .apw-viz-cta:hover,
.apw-viz-card .apw-viz-cta:focus { background: #5fd680; color: #0f1b2d; text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.apw-viz-card .apw-viz-foot { color: rgba(255, 255, 255, .5); font-size: .72rem; margin: .5rem 0 0; }

/* ── BA1 ::before-after (real-project evidence figure) ───────────────────────
   Reuses the slider mechanics above verbatim (same [data-viz-slider] hook, so
   this file + viz.js gate in via the 'apw-viz' substring in its markup); only
   the block wrapper + caption are BA-specific. */
.apw-ba { margin: 1.5rem 0; }
.apw-ba .apw-viz-slider { border: 1px solid #dfe3e8; border-radius: 6px; margin-bottom: 0; }
.apw-ba .apw-ba-caption { display: block; font-size: .8rem; color: #6b7381; line-height: 1.5; margin-top: .5rem; }
.apw-ba .apw-ba-facts { font-weight: 700; color: #3c4656; }
.apw-ba .apw-ba-note { font-style: italic; }
