/* Docs global styles (served from /public/css/docs-global.css) */

:root {
  --docs-header-height: 6.75rem;
  --docs-link-color: #a78bfa;
  --docs-link-hover: #c4b5fd;
}

.docs-layout-container {
  width: 100%;
  max-width: none;
}

/* Page shell */
.docs-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #05070f;
  color: #fff;
}

/* Sticky docs header (occupies flow + pins on scroll — no extra padding gap) */
.docs-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

/*
 * Side panels: stick under header while the center column scrolls.
 * On desktop only — mobile stays in normal document flow.
 */
@media (min-width: 1024px) {
  .docs-sticky-panel {
    position: sticky;
    top: var(--docs-header-height);
    max-height: calc(100vh - var(--docs-header-height) - 3rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.docs-sticky-panel {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4));
  backdrop-filter: blur(8px);
  padding: 1.25rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.35) transparent;
}

.docs-sticky-panel--toc {
  background: rgba(15, 23, 42, 0.7);
}

.docs-sticky-panel::-webkit-scrollbar {
  width: 6px;
}

.docs-sticky-panel::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.35);
  border-radius: 999px;
}

.docs-sticky-panel::-webkit-scrollbar-track {
  background: transparent;
}

/* Text links */
.docs-text-link,
#docs-content a {
  color: var(--docs-link-color);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.docs-text-link:hover,
#docs-content a:hover {
  color: var(--docs-link-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#docs-content a.docs-internal-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

#docs-content a.docs-internal-link:hover {
  color: var(--docs-link-hover);
}

/* Table of contents links */
.docs-toc-link {
  display: block;
  color: #9ca3af;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.docs-toc-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.docs-toc-link-nested {
  padding-left: 0.75rem;
  font-size: 0.875rem;
}

#docs-content {
  color: #d1d5db;
  line-height: 1.75;
  font-size: 1.05rem;
}

#docs-content h2,
#docs-content h3 {
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  scroll-margin-top: calc(var(--docs-header-height) + 1.5rem);
}

#docs-content h2 {
  font-size: 1.75rem;
  margin-top: 1.75rem;
  margin-bottom: 0.8rem;
  padding-top: 0.25rem;
}

#docs-content h2:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

#docs-content h3 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

#docs-content p {
  margin: 0.55rem 0;
}

#docs-content ul,
#docs-content ol {
  margin: 0.7rem 0 0.9rem;
  padding-left: 1.3rem;
}

#docs-content ul {
  list-style: outside;
}

#docs-content ol {
  list-style: decimal;
}

#docs-content li {
  margin: 0.2rem 0;
}

#docs-content hr {
  margin: 1.2rem 0;
  border-color: rgba(255, 255, 255, 0.1);
}

#docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

#docs-content th,
#docs-content td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.55rem 0.65rem;
  vertical-align: top;
}

#docs-content th {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.docs-flow-diagram {
  margin: 1.25rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
  max-width: 28rem;
}

.docs-flow-step {
  text-align: center;
}

.docs-flow-step-title {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
}

.docs-flow-step-subtitle {
  color: #9ca3af;
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.docs-flow-arrow {
  color: #a78bfa;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.35rem 0;
  text-align: center;
}

.docs-tree-diagram {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.45);
  color: #d1d5db;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.docs-search-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 60;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  max-height: 22rem;
  overflow-y: auto;
}

.docs-search-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
}

.docs-search-hit {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.docs-search-hit:hover,
.docs-search-hit:focus {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.docs-search-hit-title {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

.docs-search-hit-meta {
  display: block;
  color: #9ca3af;
  font-size: 0.75rem;
  margin-top: 0.1rem;
  text-transform: capitalize;
}

.docs-search-empty {
  padding: 0.75rem 1rem;
  color: #9ca3af;
  font-size: 0.85rem;
}
