/* Copyright (c) 2026 Patrick Robichaud (operating as OCTEKA). All rights reserved. */
/* Alexandria Documentation Platform Stylesheet */

:root {
  --color-brand-bg: #060b13;
  --color-brand-surface: #0b1325;
  --color-brand-card: #0d172c;
  --color-brand-card-hover: #121e38;
  --color-brand-border: #1a2744;
  --color-brand-border-hover: #2a3e6b;
  --color-brand-blue: #0066ff;
  --color-brand-cyan: #00d2ff;
  --color-brand-purple: #7928ca;
  --color-brand-text: #f8fafc;
  --color-brand-muted: #94a3b8;
  --color-brand-subtle: #64748b;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Base Body Styles */
body {
  font-family: var(--font-sans);
  background-color: var(--color-brand-bg);
  color: var(--color-brand-text);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Glass Panels */
.glass-nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 39, 68, 0.7);
}

.text-gradient-blue {
  background: linear-gradient(135deg, #00d2ff 0%, #0066ff 60%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* MSDN Layout Components */
.toc-tree-container {
  overflow-y: auto;
  max-height: calc(100vh - 130px);
  padding: 8px 12px;
}

.toc-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.885rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  margin-bottom: 2px;
}

.toc-item:hover {
  background-color: rgba(0, 102, 255, 0.08);
}

.toc-item.active {
  background-color: rgba(0, 102, 255, 0.15);
  color: #00d2ff !important;
  font-weight: 600;
  border-left: 3px solid #00d2ff;
}

/* On-Page Mini TOC (Right Rail) */
.mini-toc-container {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 16px;
}

.mini-toc-link {
  display: block;
  font-size: 0.825rem;
  padding: 4px 0 4px 12px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.35;
}

.mini-toc-link.level-3 {
  padding-left: 22px;
}

.mini-toc-link:hover {
  border-left-color: rgba(0, 102, 255, 0.5);
  color: #00d2ff;
}

.mini-toc-link.active {
  border-left-color: #00d2ff;
  color: #00d2ff !important;
  font-weight: 600;
}

/* Documentation Content Typography */
.markdown-article {
  font-size: 1rem;
  line-height: 1.7;
}

.markdown-article h1 {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-top: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.markdown-article h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.35rem;
}

.markdown-article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
}

.markdown-article p {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

.markdown-article a {
  color: #00d2ff;
  text-decoration: none;
  transition: opacity 0.15s;
}

.markdown-article a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.markdown-article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  background-color: rgba(0, 102, 255, 0.12);
  color: #00d2ff;
}

.markdown-article pre {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background-color: #091020 !important;
  border: 1px solid #1a2744;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  position: relative;
}

.markdown-article pre code {
  background: transparent;
  padding: 0;
  color: #f1f5f9;
}

.markdown-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.925rem;
}

.markdown-article th,
.markdown-article td {
  border: 1px solid #1a2744;
  padding: 8px 14px;
  text-align: left;
}

.markdown-article th {
  background-color: #0b1325;
  font-weight: 600;
}

.markdown-article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #1a2744;
  margin: 1.25rem 0;
}

/* GFM Callout Alert Styling */
.alx-callout {
  border-left: 4px solid;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 1.25rem 0;
  background: rgba(13, 23, 44, 0.5);
}

.alx-callout .callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.alx-callout.callout-note {
  border-left-color: #00d2ff;
  background: rgba(0, 210, 255, 0.06);
}
.alx-callout.callout-note .callout-header {
  color: #00d2ff;
}

.alx-callout.callout-tip {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}
.alx-callout.callout-tip .callout-header {
  color: #10b981;
}

.alx-callout.callout-important {
  border-left-color: #a855f7;
  background: rgba(168, 85, 247, 0.06);
}
.alx-callout.callout-important .callout-header {
  color: #a855f7;
}

.alx-callout.callout-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}
.alx-callout.callout-warning .callout-header {
  color: #f59e0b;
}

.alx-callout.callout-caution {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}
.alx-callout.callout-caution .callout-header {
  color: #ef4444;
}

.alx-callout .callout-body p {
  margin: 0;
  font-size: 0.925rem;
}

/* Light Theme Overrides */
.v-theme--light {
  --color-brand-bg: #f8fafc;
  --color-brand-surface: #ffffff;
  --color-brand-card: #f1f5f9;
  --color-brand-border: #e2e8f0;
  --color-brand-text: #0f172a;
  --color-brand-muted: #64748b;
}

.v-theme--light .markdown-article h1,
.v-theme--light .markdown-article h2 {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.v-theme--light .markdown-article pre {
  background-color: #f8fafc !important;
  border-color: #e2e8f0;
}

.v-theme--light .markdown-article pre code {
  color: #0f172a;
}

.v-theme--light .markdown-article th {
  background-color: #f1f5f9;
}

.v-theme--light .markdown-article th,
.v-theme--light .markdown-article td {
  border-color: #e2e8f0;
}

.v-theme--light .toc-item.active {
  background-color: rgba(0, 102, 255, 0.1);
  color: #0066ff !important;
  border-left-color: #0066ff;
}

/* Search Highlights */
.search-highlight {
  background-color: rgba(0, 210, 255, 0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}
