/* Print Styles for Book Format */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: 8.5in 11in;
    margin: 1in 0.75in 1in 1in;
  }

  body {
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  /* Hide non-print elements */
  .view-toggle,
  .print-header,
  .print-controls {
    display: none !important;
  }

  /* Show print content */
  .print-content {
    display: block !important;
  }
}

/* Print Book Specific Styles */
.print-book {
  max-width: none;
  margin: 0;
  padding: 0;
  font-family: 'Times New Roman', serif;
  line-height: 1.6;
  color: #000;
}

/* Title Page */
.print-title-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  page-break-after: always;
}

.print-title-content {
  max-width: 600px;
}

.print-book-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.print-book-subtitle {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.print-book-subtitle-2 {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  color: #666;
}

.print-author {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  font-weight: 500;
}

.print-publication-info {
  font-size: 1rem;
  color: #666;
}

/* Print Table of Contents */
.print-table-of-contents {
  page-break-before: always;
  page-break-after: always;
  padding: 2rem 0;
}

.print-table-of-contents h1 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.print-toc-content {
  max-width: 600px;
  margin: 0 auto;
}

.print-toc-item {
  display: flex;
  align-items: baseline;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.print-chapter-number {
  font-weight: bold;
  margin-right: 1rem;
  min-width: 100px;
}

.print-chapter-title {
  flex: 1;
}

.print-page-dots {
  flex: 1;
  border-bottom: 1px dotted #ccc;
  margin: 0 1rem;
  height: 0;
}

.print-page-number {
  font-weight: bold;
  min-width: 40px;
  text-align: right;
}

/* Chapter Styling */
.print-chapter {
  page-break-before: always;
  padding: 2rem 0;
}

.print-chapter-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #333;
}

.print-chapter-header .chapter-number {
  font-size: 1.2rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.print-chapter-header .chapter-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-top: 0.5rem;
}

.print-chapter-content {
  max-width: none;
}

/* Print typography overrides */
@media print {
  .print-book h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    page-break-after: avoid;
  }

  .print-book h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    page-break-after: avoid;
  }

  .print-book h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    page-break-after: avoid;
  }

  .print-book h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    page-break-after: avoid;
  }

  .print-book p {
    margin-bottom: 0.75rem;
    orphans: 2;
    widows: 2;
  }

  .print-book ul, 
  .print-book ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    page-break-inside: avoid;
  }

  .print-book li {
    margin-bottom: 0.25rem;
    page-break-inside: avoid;
  }

  .print-book .card,
  .print-book .alert,
  .print-book .note {
    border: 1px solid #ddd;
    border-radius: 0;
    margin-bottom: 1.5rem;
    page-break-inside: avoid;
    padding: 1rem;
  }

  .print-book .card-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    font-weight: bold;
  }

  .print-book .badge {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: normal;
  }

  /* Hide interactive elements in print */
  .print-book button,
  .print-book .tabs-list,
  .print-book .progress {
    display: none !important;
  }

  /* Show all tab content in print */
  .print-book .tabs-content {
    display: block !important;
  }
}

/* About Author Print */
.print-about-author {
  page-break-before: always;
  padding: 2rem 0;
}

.print-about-author h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.print-author-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
  font-size: 1.1rem;
}

/* Copyright Page */
.print-copyright-page {
  page-break-before: always;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.print-copyright-content h2 {
  margin-bottom: 0.5rem;
}

.print-copyright-text p {
  margin-bottom: 1rem;
  text-align: justify;
}

.print-contact-info {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
}

.print-contact-info p {
  margin-bottom: 0.5rem;
}