/* ============================================================
   VixenWorks Documentation Stylesheet
   Supplements style.css — uses the same CSS custom properties.
   ============================================================ */

/* ---- Layout ------------------------------------------------ */

.doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

/* ---- Doc Nav (left sidebar) -------------------------------- */

.doc-nav {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 48px 24px 48px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 109, 250, 0.3) transparent;
}

.doc-nav::-webkit-scrollbar {
  width: 4px;
}

.doc-nav::-webkit-scrollbar-thumb {
  background: rgba(124, 109, 250, 0.3);
  border-radius: 2px;
}

.doc-nav-group {
  margin-bottom: 32px;
}

.doc-nav-group-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 0;
}

.doc-nav a {
  display: block;
  padding: 5px 10px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  margin-bottom: 2px;
}

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

.doc-nav a.active {
  color: var(--accent-light);
  background: rgba(124, 109, 250, 0.1);
  font-weight: 500;
}

/* ---- Doc Content (right column) ---------------------------- */

.doc-content {
  padding: 48px 0 96px 48px;
  min-width: 0;
}

/* ---- Breadcrumb -------------------------------------------- */

.doc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.doc-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.doc-breadcrumb a:hover {
  color: var(--accent-light);
}

.doc-breadcrumb-sep {
  opacity: 0.4;
}

/* ---- Content typography ------------------------------------ */

.doc-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.doc-content .doc-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 40px;
  max-width: 640px;
}

.doc-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 40px 0;
}

.doc-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 40px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  letter-spacing: -0.01em;
}

.doc-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 28px 0 8px;
}

.doc-content p {
  font-size: 0.9375rem;
  color: rgba(238, 240, 248, 0.82);
  line-height: 1.75;
  margin: 0 0 16px;
}

.doc-content ul,
.doc-content ol {
  margin: 0 0 16px 0;
  padding-left: 20px;
}

.doc-content li {
  font-size: 0.9375rem;
  color: rgba(238, 240, 248, 0.82);
  line-height: 1.75;
  margin-bottom: 6px;
}

.doc-content strong {
  color: var(--text);
  font-weight: 600;
}

.doc-content a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 158, 255, 0.3);
  transition: border-color 0.15s, color 0.15s;
}

.doc-content a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

/* ---- Inline code ------------------------------------------- */

.doc-content code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco, Consolas, monospace;
  font-size: 0.825rem;
  background: rgba(124, 109, 250, 0.12);
  color: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(124, 109, 250, 0.2);
}

/* ---- Code blocks ------------------------------------------- */

.doc-content pre {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 0 0 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 109, 250, 0.3) transparent;
}

.doc-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: rgba(238, 240, 248, 0.88);
  line-height: 1.7;
}

/* ---- Tables ----------------------------------------------- */

.doc-table-wrap {
  overflow-x: auto;
  margin: 0 0 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.doc-table thead th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.doc-table tbody td {
  padding: 12px 16px;
  color: rgba(238, 240, 248, 0.82);
  line-height: 1.6;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.doc-table td code,
.doc-table th code {
  font-size: 0.8rem;
}

/* ---- Ordered/step lists ------------------------------------ */

.doc-content ol {
  counter-reset: doc-step;
  list-style: none;
  padding-left: 0;
}

.doc-content ol li {
  counter-increment: doc-step;
  padding-left: 36px;
  position: relative;
}

.doc-content ol li::before {
  content: counter(doc-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: rgba(124, 109, 250, 0.15);
  border: 1px solid rgba(124, 109, 250, 0.35);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Nested lists reset the counter styling */
.doc-content ol ol,
.doc-content ol ul {
  margin-top: 8px;
}

.doc-content ol ol li,
.doc-content ul li {
  padding-left: 0;
}

.doc-content ol ol li::before {
  content: none;
}

.doc-content ul li {
  list-style: disc;
  padding-left: 4px;
}

.doc-content ul li::before {
  display: none;
}

/* ---- Responsive -------------------------------------------- */

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .doc-nav {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 32px 0 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0 24px;
  }

  .doc-content {
    padding: 0 0 64px;
  }
}

@media (max-width: 600px) {
  .doc-nav {
    grid-template-columns: 1fr 1fr;
  }

  .doc-content h1 {
    font-size: 1.6rem;
  }
}
