/* The live preview beside a setup: a small window with the two sides joined by a line that starts flowing once both
   are chosen, what has been picked so far, and the steps ticking off. Shared by the integration and AI agent setup. */

.pv { display: flex; flex-direction: column; gap: 10px; position: sticky; top: calc(var(--topbar) + var(--banner-h, 0px) + 18px); }
.pv-lbl { padding-left: 4px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-4); }
.pv-win {
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-l); background: color-mix(in srgb, var(--paper) 7%, var(--panel));
  border-color: color-mix(in srgb, var(--paper) 12%, var(--line)); box-shadow: var(--card-rim, none), var(--sh-card);
}
.pv-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
.pv-dots { display: flex; gap: 5px; flex: none; }
.pv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--panel-3); }
.pv-title { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pv-pill {
  margin-left: auto; flex: none; padding: 3px 9px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--brand-text) 14%, transparent); color: var(--brand-text);
  font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap;
}

.pv-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(36px, .8fr) minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 28px 16px 24px;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px); background-size: 18px 18px;
}
.pv-node { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.pv-node b { max-width: 100%; overflow-wrap: anywhere; line-height: 1.35; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.pv-node.unset b { color: var(--ink-4); font-weight: 500; }
.pv-logo {
  display: flex; align-items: center; justify-content: center; height: 60px; min-width: 60px; max-width: 100%; padding: 0 8px; border-radius: 14px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--paper-line), 0 10px 24px -14px var(--shade-card);
}
.pv-logo .brandmark { flex: 0 1 132px; width: 132px; min-width: 0; overflow: hidden; height: 46px; padding: 0 4px; border: 0; background: none; box-shadow: none; }
.pv-logo.empty { width: 60px; background: var(--panel-3); box-shadow: none; color: var(--ink-4); font-weight: 700; }
.pv-logo.pv-ai { width: 60px; background: var(--brand-grad-fill); color: var(--on-brand); }
.pv-logo.pv-ai svg { width: 24px; height: 24px; }
.pv-logo.pop { animation: pv-pop .4s ease both; }
.pv-logos { display: flex; gap: 6px; }
.pv-logo.pv-mini { min-width: 0; width: 46px; height: 46px; padding: 0; border-radius: 12px; }
.pv-logo.pv-mini img { width: 28px; height: 28px; }

.pv-wire { position: relative; height: 3px; border-radius: var(--r-full); background: var(--panel-3); }
.pv-wire span {
  position: absolute; left: -6px; right: -6px; bottom: 9px; text-align: center; line-height: 1.25; overflow-wrap: break-word;
  font-family: var(--mono, 'Geist Mono', monospace); font-size: var(--fs-2xs); color: var(--ink-4);
}
.pv-wire.on {
  background: repeating-linear-gradient(90deg, var(--brand-text) 0 10px, transparent 10px 20px); background-size: 40px 3px;
  animation: pv-flow .9s linear infinite;
}
.pv-wire.on.both { animation: pv-flow-both 1.8s ease-in-out infinite alternate; }

.pv-facts { display: grid; gap: 0; margin: 0; padding: 4px 16px 10px; }
.pv-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-s); }
.pv-facts dt { flex: none; color: var(--ink-3); }
.pv-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 600; text-align: right; }
.pv-facts dd.muted { color: var(--ink-4); font-weight: 500; }

.pv-check { display: grid; gap: 11px; margin: 0; padding: 16px; border-top: 1px solid var(--line); list-style: none; }
.pv-check li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-s); color: var(--ink-4); }
.pv-check a { color: var(--ink-2); }
.pv-check a:hover { color: var(--ink); }
.pv-dot { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background .25s ease, border-color .25s ease; }
.pv-dot svg { width: 12px; height: 12px; opacity: 0; }
.pv-check li.now { color: var(--ink); font-weight: 600; }
.pv-check li.now .pv-dot { border-color: var(--brand-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-text) 15%, transparent); }
.pv-check li.done .pv-dot { border-color: var(--ok); background: var(--ok); color: var(--on-ok); }
.pv-check li.done .pv-dot svg { opacity: 1; }
.pv-note { margin: 0; padding: 0 4px; font-size: var(--fs-xs); line-height: 1.55; color: var(--ink-4); }

@keyframes pv-flow { to { background-position: 40px 0; } }
@keyframes pv-flow-both { from { background-position: 0 0; } to { background-position: 80px 0; } }
@keyframes pv-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

@media (max-width: 1080px) { .pv { position: static; } }
@media (prefers-reduced-motion: reduce) { .pv-wire.on, .pv-logo.pop { animation: none; } }
