/* x402 API page styles — uses theme.css variables */

.x402-page {
  padding-bottom: 80px;
  background: var(--obsidian);
}

.x402-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- Badge row (reuses pages.css .x402-badge classes) ---- */
.x402-badge-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

/* ---- Hero ---- */
.x402-hero {
  text-align: center;
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(245, 166, 35, 0.06) 0%, transparent 70%);
}

.x402-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.x402-hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.x402-page-cta {
  display: inline-flex;
  align-items: center;
  background: var(--amber);
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s;
}

.x402-page-cta:hover {
  background: var(--amber-dim);
}

/* ---- How It Works ---- */
.x402-how {
  padding: 72px 0;
}

.x402-how-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 10px;
  color: var(--text);
}

.x402-how-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 40px;
}

.x402-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.x402-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.x402-step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.x402-step-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 10px;
}

.x402-step-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.x402-step-desc code {
  font-size: 0.8rem;
  color: var(--teal);
  background: var(--surface-raised);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ---- Payment Details ---- */
.x402-details {
  padding: 0 0 72px;
}

.x402-details .x402-how-title {
  margin-bottom: 24px;
}

.x402-details-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.x402-detail-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.x402-detail-row--last {
  border-bottom: none;
}

.x402-detail-label {
  flex-shrink: 0;
  width: 160px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.x402-detail-value {
  color: var(--text);
  font-size: 0.925rem;
  line-height: 1.5;
  word-break: break-all;
}

.x402-detail-value code {
  font-size: 0.85rem;
  color: var(--teal);
  background: var(--surface-raised);
  padding: 2px 6px;
  border-radius: 3px;
}

.x402-no-auth {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-left: 6px;
}

/* ---- Endpoints Placeholder ---- */
.x402-endpoints-placeholder {
  padding: 40px 0 80px;
}

.x402-endpoints-placeholder .x402-how-title {
  margin-bottom: 24px;
}

.x402-placeholder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
}

.x402-placeholder-note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---- Endpoint Reference ---- */
.x402-endpoints {
  padding: 40px 0 80px;
}

.x402-endpoints .x402-how-title {
  margin-bottom: 32px;
}

/* Category blocks */
.x402-endpoint-category {
  margin-bottom: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.x402-cat--content { border-left: 3px solid var(--teal); }
.x402-cat--pain    { border-left: 3px solid var(--amber); }
.x402-cat--outreach { border-left: 3px solid #a78bfa; }
.x402-cat--agent   { border-left: 3px solid #34d399; }

.x402-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}

.x402-cat-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.x402-cat-price {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface-raised);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* Table */
.x402-endpoint-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--obsidian);
}

.x402-endpoint-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}

.x402-endpoint-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text);
  vertical-align: middle;
}

.x402-endpoint-table tr:last-child td {
  border-bottom: none;
}

.x402-endpoint-table tr:hover td {
  background: var(--surface);
}

/* Method badge */
.x402-method-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.x402-method--get {
  color: var(--teal);
  background: rgba(0, 212, 189, 0.08);
  border: 1px solid rgba(0, 212, 189, 0.25);
}

.x402-method--post {
  color: var(--amber);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.25);
}

/* Endpoint path */
.x402-endpoint-path {
  font-family: 'Menlo', 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--teal);
  background: none;
}

/* Price pill */
.x402-price-pill {
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 500;
}

/* cURL Examples */
.x402-curl-section {
  margin-top: 56px;
}

.x402-curl-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}

.x402-curl-block {
  background: #0d0d10;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.x402-curl-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.x402-curl-block pre {
  margin: 0;
  font-family: 'Menlo', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.75;
  white-space: pre;
}

.x402-curl-block code {
  font-family: inherit;
}

.x402-curl-block .comment { color: #f5a623; }
.x402-curl-block .cmd     { color: #e0e0e0; }
.x402-curl-block .string  { color: #a8d8a8; }
.x402-curl-block .flag    { color: #888; }

/* Agent Depot Callout */
.x402-depot-callout {
  margin-top: 48px;
  padding: 24px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.x402-depot-callout a {
  color: var(--amber);
  font-weight: 600;
  text-decoration: none;
}

.x402-depot-callout a:hover {
  text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .x402-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .x402-container {
    padding: 0 20px;
  }

  .x402-hero {
    padding: 56px 0 48px;
  }

  .x402-detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .x402-detail-label {
    width: auto;
  }

  .x402-details-card {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .x402-steps {
    grid-template-columns: 1fr;
  }

  .x402-badge-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .x402-endpoint-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .x402-cat-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .x402-curl-block {
    padding: 16px 20px;
  }

  .x402-depot-callout {
    padding: 20px 24px;
  }
}
