/* VitaraVox Documentation - Custom Styles */

:root {
  --md-primary-fg-color: #3949AB;
  --md-primary-fg-color--light: #5C6BC0;
  --md-primary-fg-color--dark: #283593;
  --md-accent-fg-color: #3949AB;
}

/* Clean typography */
.md-typeset h1 {
  font-weight: 700;
  color: var(--md-primary-fg-color--dark);
}

.md-typeset h2 {
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

.md-typeset h3 {
  font-weight: 600;
  margin-top: 1.5rem;
}

.md-typeset h3 a {
  color: var(--md-primary-fg-color);
}

.md-typeset h3 a:hover {
  color: var(--md-primary-fg-color--dark);
}

/* Better list styling */
.md-typeset ul li {
  margin-bottom: 0.25rem;
}

/* Table styling */
.md-typeset table:not([class]) {
  font-size: 0.85rem;
  border: 1px solid #e0e0e0;
}

.md-typeset table:not([class]) th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
}

/* ============================================
   ASCII DIAGRAM STYLING - CRITICAL FOR DISPLAY
   ============================================ */

/* Code blocks - ensure proper monospace rendering */
.md-typeset pre {
  border-radius: 6px;
  overflow-x: auto;
  max-width: 100%;
}

.md-typeset pre > code {
  font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace !important;
  font-size: 0.75rem !important;
  line-height: 1.4 !important;
  white-space: pre !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  display: block;
  padding: 1rem !important;
  min-width: max-content;
}

/* ASCII diagram containers - horizontal scroll */
.md-typeset .highlight {
  overflow-x: auto;
  max-width: 100%;
}

/* Ensure pre blocks don't wrap */
.md-typeset pre code {
  white-space: pre !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Text code blocks (```text) for ASCII art */
.md-typeset code[class*="language-text"],
.md-typeset pre[class*="language-text"] code {
  font-family: 'Roboto Mono', monospace !important;
  font-size: 0.7rem !important;
  line-height: 1.3 !important;
}

/* Wide content for diagrams */
.md-content__inner {
  max-width: 1000px;
}

/* Inline code */
.md-typeset code {
  background-color: #f5f5f5;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85em;
}

/* Navigation improvements */
.md-nav__link {
  font-size: 0.85rem;
}

.md-tabs__link {
  font-weight: 500;
}

/* Horizontal rule styling */
.md-typeset hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2rem 0;
}

/* Strong text */
.md-typeset strong {
  font-weight: 600;
}

/* Admonition styling */
.md-typeset .admonition {
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ============================================
   UI MOCKUP STYLING
   ============================================ */

.ui-mockup {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-x: auto;
}

.ui-mockup pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #5C6BC0;
  --md-primary-fg-color--light: #7986CB;
  --md-primary-fg-color--dark: #3949AB;
}

[data-md-color-scheme="slate"] .md-typeset h2 {
  border-bottom-color: #424242;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  border-color: #424242;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: #303030;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td,
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  border-color: #424242;
}

[data-md-color-scheme="slate"] .md-typeset code {
  background-color: #303030;
}

[data-md-color-scheme="slate"] .md-typeset hr {
  border-top-color: #424242;
}

[data-md-color-scheme="slate"] .ui-mockup {
  background: #1e1e1e;
  border-color: #424242;
}
