/* Buddo API Documentation — style.css */

:root {
  --sidebar-bg: #1a1a2e;
  --sidebar-text: #a0a0c0;
  --sidebar-active: #ffffff;
  --sidebar-hover: #e0e0ff;
  --sidebar-width: 260px;
  --content-bg: #ffffff;
  --content-text: #2d2d3a;
  --content-secondary: #6b6b80;
  --heading-color: #1a1a2e;
  --link-color: #4a6cf7;
  --link-hover: #3451c7;
  --code-bg: #f4f5f7;
  --code-border: #e1e3e8;
  --code-text: #d63384;
  --block-code-bg: #1e1e30;
  --block-code-text: #e0e0f0;
  --border-color: #e5e7eb;
  --badge-get: #10b981;
  --badge-post: #3b82f6;
  --badge-put: #f59e0b;
  --badge-patch: #8b5cf6;
  --badge-delete: #ef4444;
  --max-content: 800px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

/* ── Reset ── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--content-text);
  background: var(--content-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Site header (landing page) ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--sidebar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 56px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  width: 100%;
}

.header-inner .logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.header-tag {
  font-size: 0.8rem;
  color: rgba(160, 160, 192, 0.7);
  letter-spacing: 0.04em;
}

/* ── Layout ── */

.page-wrapper,
.layout {
  display: flex;
  min-height: 100vh;
}

/* Landing page: layout sits below site-header */
.layout {
  min-height: calc(100vh - 56px);
}

/* ── Landing page nav styles ── */

.nav-group {
  margin-bottom: 0.5rem;
}

.nav-heading {
  padding: 0.75rem 1.5rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(160, 160, 192, 0.5);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list a {
  display: block;
  padding: 0.4rem 1.5rem;
  font-size: 0.875rem;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-list a:hover {
  color: var(--sidebar-hover);
  background: rgba(255, 255, 255, 0.04);
}

.nav-list a.active {
  color: var(--sidebar-active);
  background: rgba(74, 108, 247, 0.12);
  border-right: 2px solid var(--link-color);
}

/* ── Landing page hero + cards ── */

.hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.hero h1 {
  font-size: 2.25rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--content-secondary);
  margin-bottom: 1rem;
}

.hero-description {
  max-width: 680px;
  color: var(--content-secondary);
  line-height: 1.7;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  border-color: #c7d0fd;
}

.card h2 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--heading-color);
}

.card p {
  font-size: 0.9rem;
  color: var(--content-secondary);
  margin-bottom: 1rem;
}

.card-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
}

.card-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ── Sidebar ── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  overflow-y: auto;
  padding: 2rem 0;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sidebar-active);
  letter-spacing: -0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.sidebar-logo span {
  color: var(--link-color);
}

.sidebar-section {
  padding: 0.75rem 1.5rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(160, 160, 192, 0.5);
}

.sidebar nav a {
  display: block;
  padding: 0.4rem 1.5rem;
  font-size: 0.875rem;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.sidebar nav a:hover {
  color: var(--sidebar-hover);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar nav a.active {
  color: var(--sidebar-active);
  background: rgba(74, 108, 247, 0.12);
  border-right: 2px solid var(--link-color);
}

/* ── Content ── */

.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 3rem 3rem 5rem;
  max-width: calc(var(--max-content) + 6rem);
}

/* ── Typography ── */

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.3rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ── Inline code ── */

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--code-border);
}

/* ── Code blocks ── */

pre {
  background: var(--block-code-bg);
  color: var(--block-code-text);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  line-height: 1.5;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 0.85rem;
}

/* ── Tables ── */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  color: var(--heading-color);
  background: var(--code-bg);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:hover td {
  background: rgba(74, 108, 247, 0.03);
}

/* ── HTTP method badges ── */

.method-badge {
  display: inline-block;
  padding: 0.15em 0.5em;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  border-radius: 3px;
  color: #fff;
  letter-spacing: 0.03em;
  min-width: 3.5em;
  text-align: center;
}

.method-badge.get    { background: var(--badge-get); }
.method-badge.post   { background: var(--badge-post); }
.method-badge.put    { background: var(--badge-put); }
.method-badge.patch  { background: var(--badge-patch); }
.method-badge.delete { background: var(--badge-delete); }

/* ── Endpoint cards ── */

.endpoint {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  transition: box-shadow 0.15s;
}

.endpoint:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--content-text);
}

.endpoint-summary {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: var(--content-secondary);
}

/* ── Callouts / notices ── */

.callout {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  border-left: 3px solid;
}

.callout.info {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

.callout.warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.callout.danger {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.callout.success {
  background: #f0fdf4;
  border-color: #10b981;
  color: #065f46;
}

/* ── Parameter lists ── */

.param-list {
  list-style: none;
  margin: 0.5rem 0 1.5rem;
}

.param-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.param-list li:last-child {
  border-bottom: none;
}

.param-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--content-text);
}

.param-type {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--content-secondary);
  margin-left: 0.5rem;
}

.param-required {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--badge-delete);
  text-transform: uppercase;
  margin-left: 0.5rem;
}

.param-desc {
  display: block;
  margin-top: 0.2rem;
  color: var(--content-secondary);
  font-size: 0.85rem;
}

/* ── Auth scope tags ── */

.scope-tag {
  display: inline-block;
  padding: 0.1em 0.45em;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(74, 108, 247, 0.08);
  color: var(--link-color);
  border-radius: 3px;
  margin-right: 0.3rem;
}

/* ── Breadcrumb ── */

.breadcrumb {
  font-size: 0.8rem;
  color: var(--content-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--content-secondary);
}

.breadcrumb a:hover {
  color: var(--link-color);
}

.breadcrumb .separator {
  margin: 0 0.4rem;
  opacity: 0.5;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .content {
    margin-left: 0;
    padding: 2rem 1.5rem 3rem;
  }

  .page-wrapper,
  .layout {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 15px;
  }

  .content {
    padding: 1.5rem 1rem 2rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  pre {
    padding: 1rem;
    font-size: 0.8rem;
  }

  .endpoint-header {
    flex-wrap: wrap;
  }
}
