/**
 * print-layout.css
 * 
 * Print styles for chapter Q&A pages
 * Provides clean, print-friendly formatting when users print via browser (File → Print)
 */

/* Print styles for browser native print (File → Print) */
@media print {
  /* Hide everything except main content */
  nav, aside, .sticky-tabs, .nav-pills, button, 
  .btn, footer, .breadcrumb, .recent-panel,
  .card-header, .navbar, .no-print {
    display: none !important;
  }
  
  /* Show only the Q&A content */
  body {
    background: white !important;
    font-size: 12pt;
  }
  
  main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  
  .edu-layout {
    display: block !important;
  }
  
  #content-col {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .tab-content {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  
  .tab-pane {
    display: none !important;
  }
  
  /* Only show the active tab content when printing */
  .tab-pane.active {
    display: block !important;
  }
  
  /* Print header and footer */
  .print-only-header,
  .print-only-footer {
    display: block !important;
    text-align: center;
    color: #666;
    font-size: 10pt;
    font-family: Arial, sans-serif;
  }
  
  .print-only-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3b82f6;
  }
  
  .print-only-header h1 {
    color: #3b82f6;
    font-size: 20pt;
    margin-bottom: 10px;
  }
  
  .print-only-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #3b82f6;
  }
  
  /* Style the Q&A content for print */
  a {
    color: inherit;
    text-decoration: none;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: #1e40af;
  }
  
  p {
    text-align: justify;
    line-height: 1.6;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  table {
    page-break-inside: avoid;
  }
  
  /* Page margins and header/footer positioning */
  @page {
    margin: 2cm;
    @top-center {
      content: "-- Dohrao.com --";
    }
    @bottom-center {
      content: "-- Dohrao.com --";
    }
  }
}

/* Hide print header/footer on screen */
.print-only-header,
.print-only-footer {
  display: none;
}
