/* ===========================================================================
   wispa · Integration pages (/claude-code/ …) — page layout + the REAL reply
   overlay, ported verbatim from the app (src/styles/global.css). The overlay is
   always-dark glass (in the app it floats over other windows and ignores the app
   theme); here it keeps that look in both site themes, so it reads as a true
   product shot. Loaded after styles.css + tools.css + platform.css.
   =========================================================================== */

/* ─────────────────────────── hero: the logo pairing ─────────────────────── */
.int-pair {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
}
.int-pair-mark {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--hairline);
  background: var(--card, #17141c);
}
.int-pair-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* wispa mark: high-res square logo tiles (no baked rounding), one per theme,
   filled edge-to-edge like the agent logo. The tile's radius does the rounding. */
.int-pair-mark.is-wispa { background: transparent; }
.int-pair-mark.is-wispa .wm-light { display: none; }
:root[data-theme="light"] .int-pair-mark.is-wispa .wm-dark { display: none; }
:root[data-theme="light"] .int-pair-mark.is-wispa .wm-light { display: block; }
.int-pair-x {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
}

/* ──────────────────────────── the demo stage ───────────────────────────── */
/* The framed panel that holds the overlay — stays dark in both themes so the
   glass popup always reads (like the app screenshot). */
.int-stage {
  position: relative;
  margin: clamp(30px, 5vw, 56px) 0 0;
  border-radius: 30px;
  padding: clamp(30px, 6vw, 72px) clamp(16px, 4vw, 56px);
  display: flex;
  justify-content: center;
  align-items: center;
  /* fixed height so the box never grows/shrinks as the overlay cycles turns —
     tall enough to hold the longest message, so it is never content-driven */
  min-height: 600px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(130% 110% at 50% -10%, rgba(217, 119, 87, 0.16), rgba(139, 125, 255, 0) 55%),
    linear-gradient(180deg, #191521, #100d15 62%, #0c0a10);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
/* soft aurora blobs for depth (condensation motif) */
.int-stage::before,
.int-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}
.int-stage::before { top: -14%; left: 8%; width: 46%; height: 60%; background: radial-gradient(circle, rgba(217, 119, 87, 0.5), transparent 70%); }
.int-stage::after { bottom: -20%; right: 4%; width: 52%; height: 66%; background: radial-gradient(circle, rgba(122, 108, 255, 0.42), transparent 70%); }
/* hero subtitle: a touch wider on integration pages so it breaks less */
body[data-integration] .tool-hero .tool-sub { max-width: 660px; }

/* the shared tool container is 760px (built for single-column prose); the 3-up
   How-it-works / features grids need more room or the columns get cramped. */
body[data-integration] .tool-body .container { max-width: 1040px; }
/* keep the FAQ (and its accordion) at a comfortable reading width */
body[data-integration] #intFaqList { max-width: 720px; margin-inline: auto; }

/* cross-links to the other agent pages (in the closing CTA) */
.int-cross {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 32px);
}
.int-xbtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.int-xbtn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); background: color-mix(in srgb, var(--accent) 8%, transparent); transform: translateY(-1px); }
.int-xbtn img { width: 22px; height: 22px; border-radius: 6px; }
.int-xbtn .int-xbtn-go { color: var(--muted); }

/* ═══════════════════ the reply overlay (verbatim from the app) ═══════════ */
/* Agent accent: Claude = ocker (default), Codex = blue, Gemini = violet. */
.vp-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  --vp-accent: #d97757;
  --pill-accent: var(--vp-accent);
  width: min(600px, 100%);
  /* the overlay is left-aligned in the app; the hero centers its content, so
     reset it here or the message + list inherit center alignment. */
  text-align: left;
}
.vp-msg { transition: opacity 0.28s ease; }
.vp-wrap.is-swapping .vp-msg { opacity: 0; }
/* both parts fill the stack (same width as the message card) and reserve the
   taller state's height, so the edit↔record swap never resizes the box */
.vp-part { width: 100%; min-height: 178px; }
.vp-wrap[data-agent="codex"] { --vp-accent: #4f9df5; }
.vp-wrap[data-agent="gemini"] { --vp-accent: #a78bfa; }

.vp-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.vp-msg {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 18px;
  border-radius: 20px;
  background: rgba(28, 28, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: #f2f2f5;
  box-sizing: border-box;
}
.vp-msg-head { display: flex; align-items: center; gap: 9px; }
.vp-title { font-weight: 600; font-size: 15px; }
.vp-msg-body { font-size: 13.5px; line-height: 1.5; color: #d7d7de; max-height: 320px; overflow-y: auto; }
.vp-session {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--vp-accent);
  margin-top: -3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vp-edit {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(28, 28, 34, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-sizing: border-box;
}
.vp-edit textarea {
  width: 100%;
  min-height: 96px;
  resize: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #f2f2f5;
  font-size: 13.5px;
  line-height: 1.5;
  font-family: inherit;
  padding: 10px 12px;
  box-sizing: border-box;
  outline: none;
  cursor: default;
}
.vp-edit textarea::placeholder { color: rgba(242, 242, 245, 0.4); }
.vp-edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vp-edit-actions { display: flex; align-items: center; gap: 8px; }
.pill-full-bar.vp-bar { justify-content: center; }

/* markdown (Claude's message is markdown-formatted) — dark overlay theme */
.md { display: flex; flex-direction: column; gap: 8px; }
.md-p { margin: 0; }
.md-code {
  /* match the app's overlay stack exactly (not the site's --mono) */
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 5px;
}
.md-ul, .md-ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }

/* the recording pill ("full", Superwhisper-style): waveform + footer */
.pill {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  background: rgba(24, 24, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.pill-bar {
  width: 3px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pill-accent, #8b7dff) 55%, white), var(--pill-accent, #8b7dff));
  will-change: height;
}
.pill-full {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: auto;
  padding: 0;
  border-radius: 28px;
  background: rgba(22, 22, 26, 0.94);
}
.pill-full-wave { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 8px 24px 0; }
.pill-full .pill-bar { width: 2.5px; flex-shrink: 0; }
.pill-full-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 22px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.pill-hotkeys { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.pill-hk {
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  margin: 0;
  padding: 4px 8px;
  border-radius: 9px;
  font-family: inherit;
}
.pill-hk-label { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.82); }
.pill-keys { display: flex; align-items: center; gap: 3px; }
.pill-key {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
}
/* the overlay is a non-interactive demo: buttons are purely visual */
.int-stage .pill-hk { pointer-events: none; cursor: default; transition: background 0.07s ease; }
/* a brief "pressed" tap on the key, like a real click */
.int-stage .pill-hk.is-cue { background: color-mix(in srgb, var(--vp-accent) 34%, transparent); }

/* the agent-logo chip (app BrandLogo) */
.brand-logo { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; flex: none; overflow: hidden; }
.brand-logo-img { background: transparent; }
.brand-logo-img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* JS toggles which part shows; no-JS falls back to the editing card */
.vp-part [hidden] { display: none !important; }

/* ──────────────────────────── how it works ─────────────────────────────── */
.int-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 34px);
  counter-reset: step;
}
.int-step { counter-increment: step; display: flex; flex-direction: column; gap: 9px; }
.int-step-n {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent, #6c5cff) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #6c5cff) 26%, transparent);
}
.int-step-n::before { content: counter(step); }
.int-step h3 { font-size: 1.02rem; margin: 2px 0 0; }
.int-step p { font-size: 0.94rem; line-height: 1.55; color: var(--muted); margin: 0; }

/* ──────────────────────────── feature trio ─────────────────────────────── */
.int-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 34px); }
.int-feat { display: flex; flex-direction: column; gap: 8px; }
.int-feat-ic {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent, #6c5cff) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #6c5cff) 22%, transparent);
  margin-bottom: 4px;
}
.int-feat-ic svg { width: 20px; height: 20px; }
.int-feat h3 { font-size: 1.05rem; margin: 0; }
.int-feat p { font-size: 0.94rem; line-height: 1.55; color: var(--muted); margin: 0; }

/* ──────────────────────────── responsive ───────────────────────────────── */
@media (max-width: 760px) {
  .int-steps, .int-feats { grid-template-columns: 1fr; }
  .int-pair-mark { width: 46px; height: 46px; }
}
