/* /mcp: Apify MCP setup page. Loaded after v3-blueprint.css; uses its tokens only. */

.mcp-hero { padding: 7.5rem 0 3.5rem; }
.mcp-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: center; }
.mcp-hero-grid > * { min-width: 0; }
.mcp-cta-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.6rem; }
.mcp-btn-lg { padding: .95rem 1.4rem; font-size: 1rem; }
.mcp-cta-note { margin-top: .8rem; color: var(--ink-2); font-size: .9rem; }

/* ---------- animated chat ---------- */
.mcp-chat { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--lift); overflow: hidden; }
.mcp-chat-bar { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
.mcp-dots { display: flex; gap: .3rem; }
.mcp-dots i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--line); }
.mcp-chat-client { font-weight: 700; color: var(--ink); transition: opacity .3s; }
.mcp-chat-mcp { margin-left: auto; font-family: var(--font-mono); color: var(--accent-text); background: var(--accent-soft); padding: .15rem .5rem; border-radius: 999px; }
.mcp-chat-body { padding: 1rem; min-height: 21rem; display: flex; flex-direction: column; gap: .7rem; }
.mcp-chat-foot { padding: .6rem 1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--ink-3); }

.mcp-msg { margin: 0; padding: .7rem .9rem; border-radius: var(--radius-md); font-size: .92rem; line-height: 1.5; max-width: 90%; }
.mcp-msg-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.mcp-msg-ai { align-self: flex-start; background: var(--surface-3); color: var(--text-body); border-bottom-left-radius: 4px; }
.mcp-tool { margin: 0; display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--ink-2); flex-wrap: wrap; }
.mcp-tool code { font-family: var(--font-mono); font-size: .8rem; }
.mcp-spin { width: .85rem; height: .85rem; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: mcp-spin .8s linear infinite; }
.mcp-tool-ok { color: var(--ok); font-weight: 700; display: none; }
.mcp-result { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; }
.mcp-result table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.mcp-result th, .mcp-result td { padding: .4rem .6rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.mcp-result th { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; color: var(--ink-3); }
.mcp-result tr:last-child td { border-bottom: 0; }

/* Stages: an element with data-show=N is visible once the stage reaches N. */
.mcp-chat [data-show] { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.mcp-chat[data-stage="0"] [data-show="0"],
.mcp-chat[data-stage="1"] [data-show="0"], .mcp-chat[data-stage="1"] [data-show="1"],
.mcp-chat[data-stage="2"] [data-show]:not([data-show="3"]),
.mcp-chat[data-stage="3"] [data-show], .mcp-chat[data-stage="4"] [data-show] { opacity: 1; transform: none; }
.mcp-chat[data-stage="2"] .mcp-spin, .mcp-chat[data-stage="3"] .mcp-spin, .mcp-chat[data-stage="4"] .mcp-spin { display: none; }
.mcp-chat[data-stage="2"] .mcp-tool-ok, .mcp-chat[data-stage="3"] .mcp-tool-ok, .mcp-chat[data-stage="4"] .mcp-tool-ok { display: inline; }
.mcp-chat[data-stage="2"] tbody tr { animation: mcp-row .4s var(--ease-out) both; animation-delay: calc(var(--i) * .25s); }
.mcp-typed.is-typing::after { content: '|'; animation: mcp-blink .7s steps(1) infinite; margin-left: 1px; }

@keyframes mcp-spin { to { transform: rotate(360deg); } }
@keyframes mcp-blink { 50% { opacity: 0; } }
@keyframes mcp-row { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ---------- flow ---------- */
.mcp-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; position: relative; }
.mcp-flow::before { content: ''; position: absolute; top: 1.4rem; left: 12%; right: 12%; height: 2px; background: var(--line); }
.mcp-flow::after { content: ''; position: absolute; top: calc(1.4rem - 4px); left: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: mcp-travel 4s var(--ease-out) infinite; }
.mcp-flow li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; min-width: 0; }
.mcp-flow-n { width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--accent); color: var(--accent-text); font-family: var(--font-mono); font-weight: 700; }
.mcp-flow li span:last-child { color: var(--ink-2); font-size: .9rem; }
@keyframes mcp-travel { 0% { left: 12%; opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { left: 87%; opacity: 0; } }

/* ---------- setup ---------- */
.mcp-step { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.mcp-step:last-child { border-bottom: 0; }
.mcp-step > div { min-width: 0; }
.mcp-step h3 { margin: 0 0 .4rem; }
.mcp-step p { color: var(--text-body); margin: 0 0 .9rem; }
.mcp-step-n { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--font-mono); font-weight: 700; }
.mcp-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .9rem; }
.mcp-tab { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .45rem .9rem; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.mcp-tab:hover { border-color: var(--line-strong); }
.mcp-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mcp-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.1rem; animation: mcp-row .3s var(--ease-out); }
.mcp-panel-where { font-weight: 700; margin: 0 0 .5rem; }
.mcp-oneclick { margin: 0 0 .8rem; }
.mcp-panel-steps {margin: 0 0 .9rem; padding-left: 1.2rem; color: var(--text-body); }
.mcp-panel-steps li { margin-bottom: .3rem; }
.mcp-code { position: relative; background: #0d1b2e; border-radius: var(--radius-sm); }
.mcp-code pre { margin: 0; padding: .9rem 5rem .9rem 1rem; overflow-x: auto; }
.mcp-code code { color: #e6edf7; font-family: var(--font-mono); font-size: .85rem; white-space: pre; }
.mcp-copy { position: absolute; top: .5rem; right: .5rem; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; border-radius: var(--radius-xs); padding: .3rem .65rem; font: inherit; font-size: .78rem; cursor: pointer; }
.mcp-copy:hover { background: rgba(255,255,255,.1); }
.mcp-prompts { margin: 0; padding-left: 1.2rem; color: var(--text-body); }
.mcp-prompts li { margin-bottom: .45rem; }

/* ---------- one scraper ---------- */
.mcp-urls { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.mcp-urls li { min-width: 0; }
.mcp-urls-name { display: inline-block; font-weight: 700; margin-bottom: .3rem; }
.mcp-code-sm pre { padding-top: .6rem; padding-bottom: .6rem; }
.mcp-code-sm code { font-size: .8rem; }
.mcp-more { margin-top: 1.4rem; color: var(--ink-2); }

.mcp-final { text-align: center; }
.mcp-final .section-desc { margin: .6rem auto 1.4rem; }

@media (max-width: 900px) {
  .mcp-hero { padding-top: 6rem; }
  .mcp-hero-grid { grid-template-columns: 1fr; }
  .mcp-flow { grid-template-columns: 1fr 1fr; row-gap: 1.6rem; }
  .mcp-flow::before, .mcp-flow::after { display: none; }
}
@media (max-width: 480px) {
  .mcp-chat-mcp { display: none; }
  .mcp-btn-lg { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .mcp-chat [data-show], .mcp-panel, .mcp-chat tbody tr { transition: none; animation: none !important; }
  .mcp-flow::after, .mcp-spin { animation: none; }
}
