/* ── BetaVend Docs — style.css ── */

:root {
  --bg:         #0a0e1a;
  --bg2:        #0f1528;
  --bg3:        #141b30;
  --surface:    #1a2340;
  --surface2:   #1f2a4a;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.12);
  --primary:    #1877F2;
  --primary-d:  #1464d8;
  --primary-l:  rgba(24,119,242,0.12);
  --green:      #22c55e;
  --amber:      #f59e0b;
  --red:        #ef4444;
  --purple:     #a78bfa;
  --text:       #e8edf8;
  --muted:      #6b7fa3;
  --muted2:     #3d4f6e;
  --code-bg:    #0d1220;
  --nav-h:      60px;
  --sidebar-w:  260px;
  --radius:     10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted2); border-radius: 3px; }

/* ── TOP NAV ── */
.docs-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(10,14,26,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand-icon {
  width: 30px; height: 30px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--surface);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-cta {
  flex-shrink: 0;
  background: var(--primary);
  color: white !important;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--primary-d) !important; }

.nav-version {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* ── DOCS LAYOUT (sidebar + content) ── */
.docs-layout {
  display: block;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

/* ── SIDEBAR ── */
.docs-sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  background: var(--bg2);
}

.sidebar-section { margin-bottom: 24px; }

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted2);
  padding: 0 10px;
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.855rem;
  padding: 6px 10px;
  border-radius: 7px;
  transition: all 0.15s;
  margin-bottom: 1px;
}

.sidebar-link:hover { color: var(--text); background: var(--surface); }
.sidebar-link.active { color: #93c5fd; background: var(--primary-l); }

.sidebar-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.badge-get    { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-post   { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-delete { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-new    { background: rgba(167,139,250,0.15); color: #c4b5fd; }

/* ── CONTENT ── */
.docs-content {
  margin-left: var(--sidebar-w);
  padding: 48px 64px 80px;
  min-width: 0;
  width: 100%;
  max-width: 860px;
}

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .docs-content { margin-left: 0; padding: 32px 20px 60px; }
}

/* ── TYPOGRAPHY ── */
.docs-content h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.docs-content h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.docs-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
}

.docs-content p {
  color: #94a3b8;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.docs-content ul, .docs-content ol {
  color: #94a3b8;
  margin: 0 0 16px 20px;
  font-size: 0.95rem;
}

.docs-content li { margin-bottom: 6px; }

.docs-content a { color: #93c5fd; text-decoration: underline; }

.lead {
  font-size: 1.05rem;
  color: #7d93bb;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ── PAGE HEADER ── */
.page-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #93c5fd;
  background: var(--primary-l);
  border: 1px solid rgba(24,119,242,0.2);
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ── CODE BLOCKS ── */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0 24px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.code-header span {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.code-header .code-lang {
  font-size: 0.7rem;
  color: var(--muted2);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
}

.code-copy {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.code-copy:hover { color: var(--text); border-color: var(--border2); }

.code-block pre {
  padding: 16px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.7;
}

.code-block code {
  font-family: 'JetBrains Mono', monospace;
  color: #e2e8f0;
}

code.inline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: var(--surface);
  color: #93c5fd;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── RESPONSE BLOCK ── */
.response-block {
  background: rgba(34,197,94,0.04);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: var(--radius);
  margin: 0 0 24px;
  overflow: hidden;
}

.response-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(34,197,94,0.1);
  background: rgba(34,197,94,0.04);
}

.response-header span {
  font-size: 0.75rem;
  color: #4ade80;
  font-family: 'JetBrains Mono', monospace;
}

.response-block pre {
  padding: 16px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.7;
}

.response-block code {
  font-family: 'JetBrains Mono', monospace;
  color: #94a3b8;
}

/* ── ENDPOINT CARDS ── */
.endpoint-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.endpoint-card:hover { border-color: var(--border2); }

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
}

.method {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  flex-shrink: 0;
}

.method-get    { background: rgba(34,197,94,0.15); color: #4ade80; }
.method-post   { background: rgba(245,158,11,0.15); color: #fbbf24; }
.method-delete { background: rgba(239,68,68,0.15); color: #f87171; }
.method-put    { background: rgba(167,139,250,0.15); color: #c4b5fd; }

.endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  color: var(--text);
  flex: 1;
}

.endpoint-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

.endpoint-chevron {
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.endpoint-card.open .endpoint-chevron {
  transform: rotate(180deg);
}

.endpoint-body {
  display: none;
  padding: 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}

.endpoint-card.open .endpoint-body { display: block; }

/* ── PARAM TABLE ── */
.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 12px 0 20px;
}

.param-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted2);
  border-bottom: 1px solid var(--border);
}

.param-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: #94a3b8;
  vertical-align: top;
}

.param-table td:first-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #93c5fd;
  white-space: nowrap;
}

.param-table td:nth-child(2) {
  font-size: 0.78rem;
  color: var(--muted);
}

.param-required {
  font-size: 0.65rem;
  color: #f87171;
  background: rgba(239,68,68,0.1);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

.param-optional {
  font-size: 0.65rem;
  color: var(--muted2);
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

/* ── ALERT BOXES ── */
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 0.88rem;
}

.alert-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }
.alert p { margin: 0; }

.alert-info {
  background: rgba(24,119,242,0.08);
  border: 1px solid rgba(24,119,242,0.2);
  color: #93c5fd;
}

.alert-warning {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  color: #fcd34d;
}

.alert-danger {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  color: #86efac;
}

/* ── ERROR TABLE ── */
.error-row {
  display: grid;
  grid-template-columns: 200px 80px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  font-size: 0.875rem;
}

.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #fca5a5;
}

.error-http {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.error-desc { color: #94a3b8; }

/* ── PRICING TABLE ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  transition: border-color 0.2s;
}

.pricing-card:hover { border-color: var(--border2); }
.pricing-card.featured { border-color: rgba(24,119,242,0.4); background: rgba(24,119,242,0.06); }

.pricing-plan {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-price {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
}

.pricing-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.pricing-features { list-style: none; margin: 0; }
.pricing-features li {
  font-size: 0.82rem;
  color: #94a3b8;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ── ON THIS PAGE ── */
.on-this-page {
  position: fixed;
  right: 32px;
  top: calc(var(--nav-h) + 32px);
  width: 180px;
  font-size: 0.78rem;
}

@media (max-width: 1200px) { .on-this-page { display: none; } }

.on-this-page-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted2);
  margin-bottom: 10px;
}

.on-this-page a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  border-left: 2px solid var(--border);
  padding-left: 12px;
  margin-bottom: 2px;
  transition: all 0.15s;
}

.on-this-page a:hover, .on-this-page a.active {
  color: var(--text);
  border-color: var(--primary);
}

/* ── HOMEPAGE SPECIFIC ── */
.hero-section {
  padding: 80px 64px 60px;
  max-width: 900px;
  margin: var(--nav-h) 0 0 var(--sidebar-w);
}

@media (max-width: 900px) {
  .hero-section { margin-left: 0; padding: 40px 20px; }
}

.hero-section h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover { background: var(--primary-d); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 9px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover { border-color: var(--border2); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 64px 80px;
  margin-left: var(--sidebar-w);
  max-width: 900px;
}

@media (max-width: 900px) {
  .feature-grid { margin-left: 0; padding: 0 20px 60px; }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s;
}

.feature-card:hover { border-color: var(--border2); }

.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.endpoint-overview {
  padding: 0 64px 80px;
  margin-left: var(--sidebar-w);
  max-width: 900px;
}

@media (max-width: 900px) {
  .endpoint-overview { margin-left: 0; padding: 0 20px 60px; }
}

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s;
}

.endpoint-row:hover { background: var(--surface); margin: 0 -12px; padding: 10px 12px; border-radius: 8px; }
.endpoint-row-path { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text); flex: 1; }
.endpoint-row-desc { font-size: 0.8rem; color: var(--muted); }

/* ── FOOTER ── */
.docs-footer {
  margin-left: var(--sidebar-w);
  border-top: 1px solid var(--border);
  padding: 24px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) { .docs-footer { margin-left: 0; padding: 24px 20px; } }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.docs-footer p { font-size: 0.8rem; color: var(--muted2); }

/* ── CHANGELOG ── */
.changelog-entry { margin-bottom: 48px; }
.changelog-version {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.changelog-date { font-size: 0.82rem; color: var(--muted); margin-bottom: 16px; }
.changelog-badge {
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
}
.badge-added   { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-fixed   { background: rgba(59,130,246,0.15); color: #93c5fd; }
.badge-changed { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-removed { background: rgba(239,68,68,0.15); color: #f87171; }
