/* ============================================================================
   BIZANALYZER GUIDE PAGES - Shared Stylesheet
   ============================================================================

   Shared styles for BizAnalyzer guide pages in info/ directory:
   - bizanalyzer-quickstart-guide.qmd (Quick Start Guide)
   - bizanalyzer-guide.qmd (Complete Guide)
   - bizanalyzer-pro-guide.qmd (Pro Guide)
   - _bizanalyzer-prompting-guide.qmd (Prompting Guide - draft)

   Migrated from apps/js/bizanalyzer/guide-styles.css (Feb 27, 2026)
   Uses CSS variables from theme-variables.css (compiled via _quarto.yml)

   @version 1.1.0
   @author Second Difference Solutions, LLC
   @date 2026-02-27
   ============================================================================ */


/* ============================================================================
   1. BASE DOCUMENT STYLES
   ============================================================================ */

/* Guide container - constrains width for readability */
.guide-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  line-height: 1.7;
}

/* Override Quarto default title block if needed */
.quarto-title-block .quarto-title-meta {
  display: none;
}


/* ============================================================================
   2. TYPOGRAPHY
   ============================================================================ */

/* Main heading */
.guide-container h1,
#title-block-header h1 {
  color: var(--sds-navy);
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* Section headings */
.guide-container h2 {
  color: var(--sds-navy);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sds-gold);
}

/* Sub-section headings */
.guide-container h3 {
  color: var(--gray-800);
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

/* Minor headings */
.guide-container h4 {
  color: var(--gray-700);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Paragraphs */
.guide-container p {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

/* Lead paragraph (intro text) */
.guide-lead {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}


/* ============================================================================
   3. LISTS
   ============================================================================ */

.guide-container ul,
.guide-container ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.guide-container li {
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.guide-container li strong {
  color: var(--sds-navy);
}

/* Nested lists */
.guide-container ul ul,
.guide-container ol ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}


/* ============================================================================
   4. TABLES
   ============================================================================ */

.guide-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.guide-container thead {
  background: var(--sds-navy);
  color: white;
}

.guide-container th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.guide-container td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}

.guide-container tbody tr:hover {
  background: var(--gray-50);
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
}


/* ============================================================================
   5. STEP-BY-STEP INSTRUCTIONS
   ============================================================================ */

/* Step container */
.guide-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  border-left: 4px solid var(--sds-navy);
}

/* Step number badge */
.guide-step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--sds-navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Step content */
.guide-step-content {
  flex: 1;
}

.guide-step-content h4 {
  margin: 0 0 0.5rem 0;
  color: var(--sds-navy);
  font-size: 1rem;
}

.guide-step-content p {
  margin: 0;
  color: var(--gray-600);
}


/* ============================================================================
   6. CALLOUT BOXES
   ============================================================================ */

/* Base callout */
.guide-callout {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.guide-callout-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}

.guide-callout-content {
  flex: 1;
}

.guide-callout-content p {
  margin: 0;
}

.guide-callout-content p + p {
  margin-top: 0.5rem;
}

/* Tip callout (blue) */
.guide-callout-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.guide-callout-tip .guide-callout-icon {
  color: var(--color-info);
}

/* Warning callout (yellow) */
.guide-callout-warning {
  background: #fef9e7;
  border: 1px solid #fcd34d;
}

.guide-callout-warning .guide-callout-icon {
  color: var(--color-warning);
}

/* Note callout (gray) */
.guide-callout-note {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
}

.guide-callout-note .guide-callout-icon {
  color: var(--gray-500);
}

/* Important callout (red) */
.guide-callout-important {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.guide-callout-important .guide-callout-icon {
  color: var(--color-error);
}


/* ============================================================================
   7. FEATURE CARDS
   ============================================================================ */

/* Feature card grid */
.guide-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

/* Individual feature card */
.guide-feature {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 1.25rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.guide-feature:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--sds-navy);
}

.guide-feature h4 {
  margin: 0 0 0.5rem 0;
  color: var(--sds-navy);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-feature p {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.5;
}


/* ============================================================================
   8. KEYBOARD SHORTCUTS & UI ELEMENTS
   ============================================================================ */

/* Keyboard key styling */
kbd {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* UI element references (buttons, tabs, etc.) */
.guide-ui-ref {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: linear-gradient(135deg, var(--sds-navy) 0%, #003d7a 100%);
  color: white;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Clickable path (e.g., Settings > Account) */
.guide-path {
  color: var(--sds-navy);
  font-weight: 500;
}

.guide-path span {
  color: var(--gray-400);
  margin: 0 0.25rem;
}


/* ============================================================================
   9. SCREENSHOTS & IMAGES
   ============================================================================ */

/* Image container */
.guide-image {
  margin: 1.5rem 0;
  text-align: center;
}

.guide-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Image caption */
.guide-image-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  font-style: italic;
}


/* ============================================================================
   10. LINKS & BUTTONS
   ============================================================================ */

.guide-container a {
  color: var(--sds-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-container a:hover {
  color: var(--sds-gold);
}

/* Button link */
.guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--sds-navy) 0%, #003d7a 100%);
  color: white !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.guide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 40, 85, 0.3);
  color: white !important;
}

/* Secondary button */
.guide-btn-secondary {
  background: var(--gray-100);
  color: var(--sds-navy) !important;
  border: 1px solid var(--gray-300);
}

.guide-btn-secondary:hover {
  background: var(--gray-200);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: var(--sds-navy) !important;
}


/* ============================================================================
   11. NAVIGATION BETWEEN GUIDES
   ============================================================================ */

.guide-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.guide-nav-link {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  text-decoration: none !important;
  transition: border-color 0.2s, background 0.2s;
  max-width: 45%;
}

.guide-nav-link:hover {
  border-color: var(--sds-navy);
  background: var(--gray-100);
}

.guide-nav-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-nav-title {
  font-weight: 600;
  color: var(--sds-navy);
}


/* ============================================================================
   12. FOOTER / DISCLAIMER
   ============================================================================ */

.guide-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.guide-footer p {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.guide-disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--gray-500);
  text-align: center;
}


/* ============================================================================
   13. TABLE OF CONTENTS ENHANCEMENTS
   ============================================================================ */

/* Quarto TOC styling override */
#TOC {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

#TOC .toc-title {
  font-weight: 600;
  color: var(--sds-navy);
  margin-bottom: 0.75rem;
}

#TOC ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#TOC li {
  margin-bottom: 0.25rem;
}

#TOC a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.15s;
}

#TOC a:hover {
  color: var(--sds-navy);
}

#TOC ul ul {
  padding-left: 1rem;
  border-left: 2px solid var(--gray-200);
  margin-left: 0.5rem;
}


/* ============================================================================
   14. MOBILE RESPONSIVE STYLES
   ============================================================================ */

@media (max-width: 768px) {
  
  /* Container padding */
  .guide-container {
    padding: 1.5rem 1rem;
  }
  
  /* Typography scaling */
  .guide-container h1,
  #title-block-header h1 {
    font-size: 1.75rem;
  }
  
  .guide-container h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
  }
  
  .guide-container h3 {
    font-size: 1.1rem;
  }
  
  /* Tables - horizontal scroll */
  .guide-container table {
    font-size: 0.85rem;
  }
  
  .guide-container th,
  .guide-container td {
    padding: 0.5rem 0.75rem;
  }
  
  /* Steps - stack vertically on very small screens */
  .guide-step {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .guide-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  /* Feature cards - single column */
  .guide-features {
    grid-template-columns: 1fr;
  }
  
  /* Callouts - tighter padding */
  .guide-callout {
    padding: 0.875rem 1rem;
  }
  
  /* Navigation links - stack */
  .guide-nav {
    flex-direction: column;
  }
  
  .guide-nav-link {
    max-width: 100%;
  }
  
  /* TOC - full width */
  #TOC {
    padding: 0.875rem 1rem;
  }
  
  /* Buttons - full width */
  .guide-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  
  .guide-container h1 {
    font-size: 1.5rem;
  }
  
  .guide-container h2 {
    font-size: 1.2rem;
  }
  
  .guide-lead {
    font-size: 1rem;
  }
  
  /* Even tighter table cells */
  .guide-container th,
  .guide-container td {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
}


/* ============================================================================
   15. PRINT STYLES
   ============================================================================ */

@media print {
  
  .guide-container {
    max-width: 100%;
    padding: 0;
  }
  
  .guide-callout,
  .guide-step {
    break-inside: avoid;
  }
  
  .guide-nav,
  #TOC {
    display: none;
  }
  
  .guide-btn {
    display: none;
  }
  
  a {
    color: inherit !important;
    text-decoration: none !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}


/* ============================================================================
   END OF GUIDE STYLES
   ============================================================================ */
