/* Public API docs (/docs/api) */
.docs-body {
  background: #f8f8fb;
  font-family: "Public Sans", system-ui, sans-serif;
  scroll-padding-top: 5rem;
}

html {
  scroll-padding-top: 5rem;
  scroll-behavior: smooth;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bs-border-color);
  padding: 0.75rem 0;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bs-heading-color);
  text-decoration: none;
  font-size: 1.05rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 2.5rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.docs-nav {
  position: sticky;
  top: 5rem;
  align-self: start;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.875rem;
}

.docs-nav a {
  color: var(--bs-body-color);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.docs-nav a:hover {
  background: rgba(var(--bs-primary-rgb), 0.06);
}

.docs-nav a.is-active {
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-weight: 600;
}

.docs-nav-group {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--bs-secondary-color);
  margin: 1rem 0 0.3rem 0.6rem;
}

.docs-nav-group:first-child {
  margin-top: 0;
}

.docs-main {
  min-width: 0;
}

.docs-section {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.5rem rgba(47, 43, 61, 0.06);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

.docs-section h2 {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  word-break: break-word;
}

.docs-section h6 {
  margin-top: 1.25rem;
}

.docs-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.docs-kv > div {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.docs-kv span {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.docs-kv code {
  word-break: break-all;
}

.docs-table td,
.docs-table th {
  vertical-align: top;
}

.docs-table td:first-child {
  white-space: nowrap;
}

/* HTTP method chips */
.m {
  display: inline-block;
  min-width: 3.3rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.35rem;
  border-radius: 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.4;
}

h2 .m {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.m-get { background: #e3f6ec; color: #18794e; }
.m-post { background: #e8efff; color: #2453d6; }
.m-patch { background: #fff3dc; color: #a35f00; }
.m-delete { background: #ffe5e5; color: #c62828; }

.docs-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  padding: 0.5rem 0.25rem;
}

@media (max-width: 991.98px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding-top: 1rem;
  }

  .docs-nav {
    display: none;
    position: static;
    max-height: none;
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 0.125rem 0.5rem rgba(47, 43, 61, 0.06);
  }

  .docs-nav.is-open {
    display: flex;
  }

  .docs-section {
    padding: 1.25rem 1rem;
  }
}
