/* Print and PDF Export Styles */

@media print {
  /* Force light mode colors */
  body {
    background: white !important;
    color: #000 !important;
  }

  /* Remove dark mode styles */
  body.dark,
  body.pdf-export-mode {
    background: white !important;
    color: #000 !important;
  }

  /* Ensure proper text colors */
  * {
    color: #000 !important;
    background: transparent !important;
  }

  /* Make headers visible */
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
    page-break-after: avoid;
  }

  /* Links should be visible */
  a {
    color: #0066cc !important;
    text-decoration: underline;
  }

  /* Hide elements not needed in print */
  .no-print {
    display: none !important;
  }

  /* Ensure images are visible and properly sized */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Profile image specific styling */
  .about-profile-image,
  .profile-img,
  img[src*="ik.jpg"],
  img[src*="profile"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 200px !important;
    height: auto !important;
    border-radius: 50%;
    margin: 0 auto 20px;
  }

  /* Ensure mark tags are visible */
  mark {
    background-color: #fff3cd !important;
    color: #000 !important;
    padding: 2px 4px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

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

  section, .container {
    page-break-inside: avoid;
  }

  /* Ensure full content is visible */
  body {
    width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  /* Header styling */
  .header-container {
    page-break-inside: avoid;
    margin-bottom: 30px;
  }

  /* Content containers */
  .wrapper {
    width: 100% !important;
    max-width: none !important;
  }

  /* Lists and items */
  ul, ol {
    page-break-inside: avoid;
  }

  li {
    page-break-inside: avoid;
  }

  /* Ensure all content sections are visible */
  .list-container,
  .text-container {
    display: block !important;
    visibility: visible !important;
    page-break-inside: avoid;
  }

  /* Remove box shadows and borders that might not print well */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Ensure buttons/links in content are visible */
  .button {
    display: none !important;
  }

  /* Footer */
  footer {
    page-break-before: avoid;
    margin-top: 30px;
  }

  /* Force color printing for important elements */
  .header-left h1,
  .header-left h2,
  h3 {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Ensure tables are visible if any */
  table {
    page-break-inside: avoid;
    width: 100%;
  }

  /* Code blocks */
  code, pre {
    page-break-inside: avoid;
    border: 1px solid #ddd;
    background: #f5f5f5 !important;
    padding: 5px;
  }

  /* Quotes */
  blockquote {
    page-break-inside: avoid;
    border-left: 3px solid #ccc;
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
  }
}

/* Additional styling when in PDF export mode (before print dialog) */
body.pdf-export-mode {
  background: white !important;
  color: #000 !important;
}

body.pdf-export-mode * {
  color: #000 !important;
}

body.pdf-export-mode .no-print {
  display: none !important;
}

body.pdf-export-mode img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
