/* Print-friendly styles for ParaPro Study Guides */
@media print {
  /* Hide non-essential elements */
  .header-nav,
  .footer-section,
  .ad-placeholder,
  .social-share,
  .language-switcher,
  .dark-mode-toggle,
  .cta-section,
  .related-resources,
  .navigation-buttons,
  .start-test-button,
  .pagination-controls,
  #adblock-wall {
    display: none !important;
  }

  /* Reset backgrounds and colors for print */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.6;
  }

  /* Ensure content uses full width */
  .container,
  main {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Style headings for print */
  h1, h2, h3, h4, h5, h6 {
    color: black !important;
    page-break-after: avoid;
    margin-top: 1em;
    margin-bottom: 0.5em;
  }

  h1 { font-size: 24pt; }
  h2 { font-size: 18pt; }
  h3 { font-size: 14pt; }
  h4 { font-size: 12pt; }

  /* Keep content together */
  p, ul, ol, blockquote {
    orphans: 3;
    widows: 3;
    page-break-inside: avoid;
  }

  /* Style lists */
  ul, ol {
    margin-left: 1.5em;
  }

  /* Style example boxes and important sections */
  .example-box,
  .key-concept,
  .bg-blue-50,
  .bg-green-50,
  .bg-yellow-50,
  .bg-gray-50 {
    background: white !important;
    border: 1px solid #ccc !important;
    padding: 0.5em !important;
    margin: 1em 0 !important;
    page-break-inside: avoid;
  }

  /* Style tables for print */
  table {
    border-collapse: collapse;
    width: 100%;
    page-break-inside: avoid;
  }

  th, td {
    border: 1px solid #ccc;
    padding: 0.5em;
    text-align: left;
  }

  th {
    background: #f0f0f0 !important;
    font-weight: bold;
  }

  /* Style code blocks */
  pre, code {
    background: #f5f5f5 !important;
    border: 1px solid #ddd;
    padding: 0.25em;
    font-family: monospace;
    font-size: 10pt;
  }

  /* Add URL after links in content */
  article a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  /* But not for internal navigation links */
  nav a[href]:after,
  .breadcrumb a[href]:after,
  .pagination a[href]:after {
    content: none;
  }

  /* Page breaks */
  .page-break {
    page-break-before: always;
  }

  .no-break {
    page-break-inside: avoid;
  }

  /* Add page title to header */
  @page {
    margin: 0.75in;
    @top-center {
      content: "ParaPro Test Study Guide";
      font-size: 10pt;
      color: #666;
    }
  }

  /* Style practice questions */
  .practice-question {
    page-break-inside: avoid;
    margin: 1em 0;
    padding: 0.5em;
    border: 1px solid #ccc;
  }

  .question-number {
    font-weight: bold;
    margin-right: 0.5em;
  }

  /* Hide interactive elements */
  button,
  .interactive-quiz,
  .toggle-answer,
  .show-solution {
    display: none !important;
  }

  /* Show all answers for practice questions */
  .answer-hidden {
    display: block !important;
    margin-top: 0.5em;
    padding-top: 0.5em;
    border-top: 1px dashed #ccc;
  }

  /* Add study guide branding */
  .print-header {
    display: block;
    text-align: center;
    margin-bottom: 2em;
    border-bottom: 2px solid #000;
    padding-bottom: 1em;
  }

  .print-header h1 {
    font-size: 28pt;
    margin: 0;
  }

  .print-header .subtitle {
    font-size: 14pt;
    color: #666;
    margin-top: 0.5em;
  }
}

/* Utility classes for print control */
.print-only {
  display: none;
}

@media print {
  .print-only {
    display: block;
  }
  
  .no-print {
    display: none !important;
  }
}