/* YES Funnel — public API docs page */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  background: #ffffff;
}

.docs-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 20;
}

.docs-header-spacer {
  flex: 1;
}

.docs-logo {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: rgb(25, 25, 25);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.docs-logo span {
  color: rgb(37, 99, 235);
}

.docs-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  background: rgb(240, 240, 240);
  color: rgb(75, 75, 75);
  border-radius: 4px;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

/* ---------- Code block copy button ---------- */

.code-block-wrapper {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgb(200, 200, 200);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  z-index: 5;
}

.code-block-wrapper:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.code-copy-btn.copied {
  background: rgb(22, 163, 74);
  border-color: rgb(22, 163, 74);
  color: white;
  opacity: 1;
}

.code-copy-btn svg {
  width: 12px;
  height: 12px;
}

.docs-header-link {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  background: #eff6ff;
}

.docs-header-link:hover { background: #dbeafe; }

.docs-layout {
  display: flex;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

.docs-nav {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  align-self: flex-start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.docs-nav a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  margin-bottom: 2px;
}

.docs-nav a:hover {
  background: #f9fafb;
}

.docs-nav a.active {
  color: #2563eb;
  border-left-color: #2563eb;
  background: #eff6ff;
  font-weight: 600;
}

.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 900px;
}

.docs-section {
  margin-bottom: 64px;
}

.docs-section h1 {
  font-size: 32px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
}

.docs-subheading {
  font-size: 17px;
  color: #4b5563;
  margin: 0 0 24px;
}

.docs-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  border-bottom: 2px solid #e2e8f0;
  padding-top: 16px;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.docs-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  margin: 24px 0 8px;
}

.docs-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px;
}

.docs-section p {
  font-size: 15px;
  color: #1e293b;
  line-height: 1.8;
  margin-bottom: 12px;
}

.docs-section ul {
  font-size: 15px;
  color: #374151;
  line-height: 1.8;
  padding-left: 20px;
}

.docs-section code {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Monaco', 'Menlo', monospace;
}

.docs-note {
  background: #eff6ff;
  border-left: 4px solid #2563eb;
  color: #1e40af;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  margin: 20px 0;
}

.docs-note a { color: #1e40af; font-weight: 600; }

.docs-warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  color: #78350f;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  margin: 20px 0;
}

pre.code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  font-size: 13px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', monospace;
  line-height: 1.6;
  margin: 16px 0;
}

pre.code-block .tok-cmd { color: #e2e8f0; }
pre.code-block .tok-flag { color: #c4b5fd; }
pre.code-block .tok-method { color: #93c5fd; }
pre.code-block .tok-url { color: #86efac; }
pre.code-block .tok-header-name { color: #fca5a5; }
pre.code-block .tok-header-value { color: #fde68a; }
/* Still used by the ActivePieces/Make "Method:/URL:/Headers:" config
   blocks, which aren't JSON so they keep the tok-key label styling. */
pre.code-block .tok-key { color: #93c5fd; }

/* JSON request/response body syntax coloring (distinct from the curl
   tok-* classes above, which stay untouched). */
.json-key { color: #93c5fd; }
.json-str { color: #86efac; }
.json-num { color: #fde68a; }
.json-bool { color: #f9a8d4; }
.json-null { color: #f9a8d4; }
.json-punct { color: #e2e8f0; }

.endpoint-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: monospace;
  font-size: 14px;
  margin-bottom: 12px;
  border: 1px solid #cbd5e1;
}

.method-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.method-get { background: #dcfce7; color: #14532d; }
.method-post { background: #dbeafe; color: #1e3a8a; }
.method-delete { background: #fee2e2; color: #7f1d1d; }
.method-patch { background: #fef3c7; color: #78350f; }

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}

.param-table th {
  text-align: left;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 2px solid #e5e7eb;
  font-size: 12px;
  text-transform: uppercase;
  color: #374151;
}

.param-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #1e293b;
}

.param-table code {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.guide-step-content { flex: 1; min-width: 0; }

.guide-step-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

.guide-step-content p { color: #374151; margin-bottom: 8px; }

.screenshot-placeholder {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin: 10px 0;
}

.zap-example-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.zap-example-list li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #374151;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .docs-layout {
    flex-direction: column;
    gap: 0;
    padding: 24px 16px;
  }

  .docs-nav {
    position: sticky;
    top: 0;
    width: 100%;
    max-height: none;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    padding: 10px 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
    z-index: 10;
  }

  .docs-nav a {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
  }

  .docs-nav a.active {
    border-left-color: transparent;
    border-bottom-color: #2563eb;
  }
}
