/* print.css - Print styles for pedigree pages */
@media print {
  /* Hide non-essential elements */
  #sidebar,
  nav,
  .button-link,
  input[type="file"],
  label[for="dosageFileInput"],
  label[for="fileInput"],
  .filter-btn,
  .info-btn,
  .custom-dropdown,
  #hoverNotes,
  #nickAnalysisBtn,
  #advancedAnalysisBtn,
  .modal,
  .back-btn-simple,
  .enhanced-close,
  #loadStatus,
  #filterCount,
  .hotkey-tip,
  #footer,
  footer,
  .save-pdf-btn,
  [style*="Filter by Discipline"],
  .pickerRow > div:first-child {
    display: none !important;
  }

  /* Hide filter row */
  div[style*="Filter by Discipline"] {
    display: none !important;
  }

  /* Reset body */
  body {
    background: white !important;
    padding: 10px !important;
    margin: 0 !important;
    font-size: 12px !important;
  }

  /* Card styling for print */
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    margin: 10px 0 !important;
    padding: 15px !important;
    page-break-inside: avoid;
  }

  /* Hide first card (picker row) */
  .card:first-of-type {
    display: none !important;
  }

  /* Page title */
  h1 {
    font-size: 18px !important;
    margin-bottom: 10px !important;
    color: #333 !important;
  }

  /* Selected horse name */
  #who {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #000 !important;
  }

  /* Pedigree grid */
  .ped {
    margin-top: 10px !important;
  }

  .box {
    border: 1px solid #999 !important;
    padding: 2px !important;
    font-size: 9px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .name {
    font-size: 10px !important;
  }

  /* Preserve colors */
  .male {
    background-color: #dceafe !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .female {
    background-color: #ffe6f0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Duplicate/linebreeding highlighting */
  .duplicate-box {
    background-color: #FFF9C4 !important;
    border: 2px solid #F9A825 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Thoroughbred text */
  .xx-text {
    color: #D2691E !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Dosage display */
  #dosageDisplay {
    margin-top: 15px !important;
    padding: 10px !important;
    border: 1px solid #7c3aed !important;
    background: #f5f3ff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Linebreeding legend */
  #linebreedingLegend {
    margin-top: 15px !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    background: #f9f9f9 !important;
  }

  /* Notes */
  #notesBox,
  .notes {
    margin-top: 10px !important;
    font-size: 11px !important;
    white-space: pre-wrap !important;
  }

  /* ================================================
     PEDIGREE MATCH (pedigreematchnew.html) STYLES
     ================================================ */
  
  /* Hide main app container when modal is open */
  #app {
    display: none !important;
  }
  
  /* Show analysis modal content for printing */
  #analysisModal {
    display: block !important;
    position: static !important;
    background: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  #analysisModal .modal-content {
    margin: 0 !important;
    padding: 15px !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
  }
  
  /* Hide other modals */
  #relativesModal,
  #descendantsModal,
  #infoModal {
    display: none !important;
  }
  
  /* Hide close button and action buttons in modal */
  #analysisModal .close-btn,
  #analysisModal .btn {
    display: none !important;
  }
  
  /* Pedigree table cells - preserve colors */
  .pedigree-cell,
  .pedigree-cell-stallion,
  .pedigree-cell-mare,
  .pedigree-cell-foal {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  .pedigree-cell-stallion {
    background-color: #bfdbfe !important;
  }
  
  .pedigree-cell-mare {
    background-color: #fbcfe8 !important;
  }
  
  .pedigree-cell-foal {
    background-color: #fde68a !important;
  }
  
  /* Linebreeding highlight colors */
  [style*="background:"][style*="border-radius:4px"] {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Info boxes in analysis */
  [style*="background:#fff9c4"],
  [style*="background:#e0f2fe"],
  [style*="background:#dbeafe"],
  [style*="background:#ecfdf5"] {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Page setup */
  @page {
    margin: 0.5in;
    size: landscape;
  }
}
