/* Vow Documentation - Modern Consistent Theme */

/* Import fonts in head.hbs, but set fallbacks here */
:root {
  /* Colors - Dark theme focused with emerald accents */
  --bg-color: #0a0a0f;
  --content-bg: #111117;
  --sidebar-bg: #0a0a0f;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* NEW: Emerald/teal accent colors instead of purple */
  --accent-primary: #10b981; /* emerald-500 */
  --accent-secondary: #14b8a6; /* teal-500 */
  --accent-light: #34d399; /* emerald-400 */
  --accent-dark: #047857; /* emerald-700 */
  
  --code-bg: #1e1e2e;
  --code-border: #313244;
  --border-color: #27272a;
  --hover-bg: #1f1f23;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --danger-bg: #fecaca;
  --danger-text: #b91c1c;
  --info-bg: #dbeafe;
  --info-text: #1d4ed8;
  
  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  
  /* Layout */
  --content-max-width: 780px;
  --sidebar-width: 280px;
}

/* Base styling overrides */
html {
  scroll-behavior: smooth;
  font-size: 16px; /* Ensure base 16px for rem calculations */
}

body {
  font-family: var(--font-body) !important;
  background-color: var(--bg-color) !important;
  color: var(--text-primary) !important;
  line-height: 1.7 !important; /* Improved readability */
  letter-spacing: -0.01em;
  font-size: 16px !important; /* Global minimum 16px body font */
}

/* Content area */
.content {
  max-width: var(--content-max-width) !important;
  background-color: var(--content-bg) !important;
  padding: 3rem 3rem 6rem 3rem !important;
  margin: 0 auto !important;
  min-height: 100vh;
  box-shadow: 0 0 0 1px var(--border-color);
  font-size: 16px !important; /* Ensure content area respects minimum */
}

/* Typography improvements - Clear hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
  letter-spacing: -0.025em;
  color: var(--text-primary) !important;
}

h1 {
  font-size: 2rem !important; /* 32px - clear hierarchy */
  color: var(--accent-primary) !important; /* Single emerald color, no gradient */
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
}

h2 {
  font-size: 1.6rem !important; /* 25.6px */
  color: var(--text-primary) !important;
  border-bottom: 2px solid var(--border-color) !important;
  padding-bottom: 0.5rem !important;
}

h3 {
  font-size: 1.3rem !important; /* 20.8px */
  color: var(--accent-secondary) !important;
}

h4 {
  font-size: 1.1rem !important; /* 17.6px */
  color: var(--text-primary) !important;
}

h5, h6 {
  font-size: 1rem !important; /* 16px minimum */
  color: var(--text-secondary) !important;
}

p {
  margin-bottom: 1.5rem !important;
  color: var(--text-primary) !important;
  font-size: 16px !important; /* Explicit 16px minimum */
}

/* Links */
a {
  color: var(--accent-primary) !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

a:hover {
  color: var(--accent-light) !important;
  text-decoration: underline !important;
}

/* Code blocks */
pre {
  background-color: var(--code-bg) !important;
  border: 1px solid var(--code-border) !important;
  border-left: 4px solid var(--accent-primary) !important; /* Emerald accent */
  border-radius: 8px !important;
  padding: 1.5rem !important;
  margin: 1.5rem 0 !important;
  overflow-x: auto !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2) !important;
  position: relative;
}

code {
  font-family: var(--font-mono) !important;
  font-size: 14px !important; /* Minimum 14px for code blocks */
  background-color: var(--code-bg) !important;
  color: var(--text-primary) !important;
}

/* Inline code */
p code, li code, td code, h1 code, h2 code, h3 code, h4 code {
  background-color: var(--hover-bg) !important;
  border: 1px solid var(--border-color) !important;
  padding: 0.2rem 0.4rem !important;
  border-radius: 4px !important;
  font-size: 14px !important; /* Minimum 14px for inline code */
}

/* Sidebar styling */
.sidebar {
  background-color: var(--sidebar-bg) !important;
  border-right: 1px solid var(--border-color) !important;
  width: var(--sidebar-width) !important;
}

.sidebar ol.chapter {
  padding: 1rem !important;
}

.sidebar ol.chapter li {
  margin: 0.5rem 0 !important;
}

.sidebar ol.chapter li a {
  color: var(--text-secondary) !important;
  padding: 0.75rem 1rem !important;
  border-radius: 6px !important;
  display: block !important;
  transition: all 0.2s ease !important;
  font-size: 14px !important; /* Minimum 14px for sidebar items */
}

.sidebar ol.chapter li a:hover {
  background-color: var(--hover-bg) !important;
  color: var(--accent-primary) !important;
  text-decoration: none !important;
}

.sidebar ol.chapter li.chapter-item.expanded.has-sub-chapter > a.toggle {
  color: var(--accent-primary) !important;
}

/* Active sidebar item */
.sidebar ol.chapter li.chapter-item.current > a {
  background-color: var(--accent-primary) !important;
  color: white !important;
  font-weight: 600 !important;
}

/* Blockquotes as callout boxes */
blockquote {
  margin: 1.5rem 0 !important;
  padding: 1rem 1.5rem !important;
  border-radius: 8px !important;
  border-left: 4px solid var(--accent-primary) !important;
  background-color: var(--hover-bg) !important;
  position: relative !important;
  font-size: 16px !important; /* Ensure readable font size */
}

blockquote p {
  font-size: 16px !important; /* Override any smaller sizes */
}

/* Callout types based on emoji prefixes */
blockquote p:first-child:before {
  font-size: 1.2em;
  margin-right: 0.5rem;
}

blockquote:has(p:first-child:contains("💡")),
blockquote:has(p:first-child:contains("💡")) {
  background-color: rgba(16, 185, 129, 0.1) !important; /* Emerald tint */
  border-left-color: var(--accent-primary) !important;
}

blockquote:has(p:first-child:contains("⚠️")) {
  background-color: rgba(245, 158, 11, 0.1) !important;
  border-left-color: #f59e0b !important;
}

blockquote:has(p:first-child:contains("🚨")) {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border-left-color: #ef4444 !important;
}

/* Tables - proper styling */
table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 1.5rem 0 !important;
  background-color: var(--content-bg) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  font-size: 15px !important; /* Readable table text */
}

table th, table td {
  padding: 1rem !important;
  text-align: left !important;
  border-bottom: 1px solid var(--border-color) !important;
  font-size: 15px !important; /* Minimum readable size */
}

table th {
  background-color: var(--hover-bg) !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

/* Alternating table rows */
table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

table tbody tr:hover {
  background-color: var(--hover-bg) !important;
}

/* Lists - proper spacing */
ul, ol {
  margin-bottom: 1.5rem !important;
  padding-left: 1.5rem !important;
}

li {
  margin-bottom: 0.5rem !important;
  color: var(--text-primary) !important;
  font-size: 16px !important; /* Ensure list items are readable */
  line-height: 1.6 !important;
}

/* Nested lists */
li ul, li ol {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

li li {
  font-size: 15px !important; /* Slightly smaller for nested items but still readable */
}

/* Images - responsive */
img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 6px !important;
  margin: 1rem 0 !important;
}

/* COHESIVE STYLING - Remove page-specific styling that creates inconsistency */
/* Instead of special hero styling, make intro page consistent with others */

/* Simple consistent styling for the intro page elements */
.hero-section {
  text-align: center;
  margin: 2rem 0 3rem 0;
  padding: 2rem;
  background-color: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.hero-title {
  font-size: 2.5rem !important; /* Slightly larger than normal h1 but not overpowering */
  font-weight: 800 !important;
  color: var(--accent-primary) !important; /* Single emerald color, consistent with theme */
  margin-bottom: 1rem !important;
  line-height: 1.1 !important;
  margin-top: 0 !important;
}

.hero-tagline {
  font-size: 1.2rem !important; /* Readable but not too large */
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background-color: var(--hover-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.feature-card h3 {
  color: var(--accent-primary) !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
  font-size: 1.1rem !important; /* Consistent with h4 sizing */
}

.feature-card p {
  font-size: 15px !important; /* Minimum 15px as required */
  color: var(--text-secondary) !important;
  margin-bottom: 0 !important;
}

.install-section {
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.install-section h3 {
  margin-top: 0 !important;
  color: var(--text-primary) !important;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-primary) !important; /* Single emerald color */
  color: white !important;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.2s ease;
  font-size: 16px !important;
}

.cta-button:hover {
  background-color: var(--accent-dark) !important;
  transform: translateY(-1px);
  color: white !important;
}

/* Navigation improvements */
.nav-wrapper {
  background-color: var(--sidebar-bg) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

/* Search box styling */
.search-bar {
  border: 1px solid var(--border-color) !important;
  background-color: var(--hover-bg) !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
}

.search-bar:focus {
  border-color: var(--accent-primary) !important;
  outline: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  html {
    font-size: 14px; /* Slightly smaller base on mobile but still readable */
  }
  
  body {
    font-size: 14px !important; /* Adjust body font for mobile */
  }
  
  .content {
    padding: 2rem 1.5rem !important;
    font-size: 14px !important;
  }
  
  .hero-title {
    font-size: 2rem !important;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Ensure nothing goes below 13px on mobile */
  .sidebar ol.chapter li a {
    font-size: 13px !important;
  }
  
  p code, li code, td code {
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  /* On very small screens, allow minimum 13px but no smaller */
  html {
    font-size: 13px;
  }
  
  body {
    font-size: 13px !important;
  }
  
  .content {
    padding: 1.5rem 1rem !important;
    font-size: 13px !important;
  }
}

/* Loading animation for better perceived performance */
.content {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Print styles */
@media print {
  .sidebar {
    display: none !important;
  }
  
  .content {
    max-width: none !important;
    margin: 0 !important;
    padding: 1rem !important;
    box-shadow: none !important;
  }
}

/* Dark theme consistency - ensure ALL pages look good */
.page-wrapper {
  background-color: var(--bg-color) !important;
}

.chapter {
  background-color: var(--content-bg) !important;
  color: var(--text-primary) !important;
}

/* Ensure consistent styling across all content */
.chapter h1, .chapter h2, .chapter h3, .chapter h4, .chapter h5, .chapter h6 {
  color: inherit !important; /* Use the colors defined above */
}

.chapter p, .chapter li {
  color: var(--text-primary) !important;
  font-size: inherit !important;
}

/* Accessibility improvements */
*:focus {
  outline: 2px solid var(--accent-primary) !important;
  outline-offset: 2px !important;
}

/* High contrast for better readability */
strong, b {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}

em, i {
  color: var(--text-secondary) !important;
  font-style: italic !important;
}
/* Header bar - vertical center align */
.menu-bar {
    display: flex !important;
    align-items: center !important;
}
.menu-bar .left-buttons,
.menu-bar .right-buttons,
.menu-bar .menu-title {
    display: flex !important;
    align-items: center !important;
}
