/* API Docs — styles matching guides/landing */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #0078C8; text-decoration: none; }
a:hover { color: #005fa3; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.apidocs-nav {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.apidocs-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.apidocs-nav-logo img { height: 28px; }
.apidocs-nav-links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.875rem; }
.apidocs-nav-links a { color: #555; font-weight: 500; }
.apidocs-nav-links a:hover, .apidocs-nav-links a.active { color: #0078C8; }
.apidocs-nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  gap: 0.375rem;
}
.btn-primary { background: #13B5EA; color: #fff; }
.btn-primary:hover { background: #0ea5d9; color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid #e2e8f0; color: #1a1a2e; }
.btn-outline:hover { border-color: #0078C8; color: #0078C8; }
.btn-ghost { background: transparent; color: #1a1a2e; }
.btn-ghost:hover { background: rgba(0,0,0,0.05); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.apidocs-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f172a 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  color: #fff;
}
.apidocs-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.apidocs-hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.apidocs-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.badge-openapi {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  padding: 0.4rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
}
.btn-download {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-download:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ── Intro Cards ──────────────────────────────────────────────────────── */
.apidocs-intro {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.intro-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
}
.intro-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.intro-card h3 i { color: #0078C8; font-size: 1rem; }
.intro-card p, .intro-card code {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}
.intro-card code {
  display: block;
  background: #1a1a2e;
  color: #e2e8f0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow-x: auto;
}

/* ── Layout: Sidebar + Content ────────────────────────────────────────── */
.apidocs-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.apidocs-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.sidebar-group { margin-bottom: 0.375rem; }
.sidebar-group-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 0.5rem 0.75rem 0.25rem;
}
.sidebar-endpoint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}
.sidebar-endpoint:hover {
  color: #1a1a2e;
  background: #f8fafc;
}
.sidebar-endpoint.active {
  color: #0078C8;
  background: #f0f7ff;
  font-weight: 600;
  border-left-color: #0078C8;
}
.sidebar-endpoint .method-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Endpoint Sections ────────────────────────────────────────────────── */
.endpoint-group {
  margin-bottom: 3rem;
}
.endpoint-group-heading {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: #1a1a2e;
  scroll-margin-top: 90px;
}
.endpoint-group-desc {
  font-size: 0.9375rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.endpoint-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
}
.endpoint-header:hover { background: #f1f5f9; }
.endpoint-path {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a2e;
}
.endpoint-summary {
  font-size: 0.8125rem;
  color: #64748b;
  margin-left: auto;
}
.endpoint-chevron {
  color: #94a3b8;
  transition: transform 0.2s ease;
  font-size: 0.875rem;
}
.endpoint-card.open .endpoint-chevron {
  transform: rotate(180deg);
}
.endpoint-body {
  display: none;
  padding: 1.25rem;
}
.endpoint-card.open .endpoint-body {
  display: block;
}

/* ── Method Badges ────────────────────────────────────────────────────── */
.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.method-get    { background: #dcfce7; color: #166534; }
.method-post   { background: #dbeafe; color: #1e40af; }
.method-put    { background: #fef3c7; color: #92400e; }
.method-delete { background: #fee2e2; color: #991b1b; }

/* Method dot colors */
.dot-get    { background: #22c55e; }
.dot-post   { background: #3b82f6; }
.dot-put    { background: #f59e0b; }
.dot-delete { background: #ef4444; }

/* ── Parameter Table ──────────────────────────────────────────────────── */
.param-section { margin-bottom: 1.25rem; }
.param-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.param-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.param-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  color: #475569;
  vertical-align: top;
}
.param-table tr:nth-child(even) td { background: #fafbfc; }
.param-name {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-weight: 600;
  color: #1a1a2e;
  font-size: 0.8125rem;
}
.param-required {
  color: #ef4444;
  font-size: 0.6875rem;
  font-weight: 600;
  margin-left: 0.25rem;
}
.param-type {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: #0078C8;
  font-size: 0.75rem;
}

/* ── Code Blocks ──────────────────────────────────────────────────────── */
.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}
.code-block .key { color: #93c5fd; }
.code-block .str { color: #86efac; }
.code-block .num { color: #fbbf24; }
.code-block .bool { color: #c084fc; }

/* ── Security Badge ──────────────────────────────────────────────────── */
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
}
.no-auth-badge {
  background: #dcfce7;
  color: #166534;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { background: #0f172a; padding: 4rem 2rem 2rem; color: rgba(255,255,255,0.7); }
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4,1fr); gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { margin-top: 1rem; font-size: 0.9375rem; line-height: 1.6; }
.footer-brand img { height: 28px; filter: brightness(0) invert(1); }
.footer h6 { color: #fff; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul li a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.9375rem; transition: color 0.2s ease; }
.footer ul li a:hover { color: #fff; }
.footer-bottom { padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.875rem; }

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .apidocs-intro { grid-template-columns: repeat(2, 1fr); }
  .apidocs-layout { grid-template-columns: 1fr; }
  .apidocs-sidebar {
    position: static;
    max-height: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .sidebar-group { width: 100%; }
}

@media (max-width: 768px) {
  .apidocs-nav-links { display: none; }
  .apidocs-hero h1 { font-size: 1.75rem; }
  .apidocs-hero p { font-size: 1rem; }
  .apidocs-intro { grid-template-columns: 1fr; }
  .apidocs-layout { padding: 1.5rem 1rem 3rem; gap: 1.5rem; }
  .endpoint-header { flex-wrap: wrap; }
  .endpoint-summary { margin-left: 0; width: 100%; margin-top: 0.375rem; }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
  .footer-brand { grid-column: 1 / -1; text-align: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .apidocs-layout { padding: 1rem; }
}
