/* ================================================================
   LinkedIn Audit Tool — Print Styles
   ================================================================ */

@media print {

  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: #ffffff !important;
    color: #0D1B2E !important;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 11pt;
    line-height: 1.5;
    direction: rtl;
  }

  /* Hide non-print elements */
  .sidebar,
  .topbar-actions,
  .export-row,
  .score-controls,
  .notes-input,
  .criteria-grid,
  .btn-row,
  .loading-overlay,
  .report-tabs,
  .sidebar-btn,
  .icon-btn,
  .charts-section { display: none !important; }

  /* Show report panels */
  .report-panel { display: block !important; }

  .app-wrapper { display: block; }
  .main-content { padding: 0; width: 100%; }

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

  /* Colors for print */
  .score-chip.green { background: #d1fae5 !important; color: #065f46 !important; }
  .score-chip.amber { background: #fef3c7 !important; color: #92400e !important; }
  .score-chip.red   { background: #fee2e2 !important; color: #991b1b !important; }

  /* Print header */
  .print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #0A66C2;
    padding-bottom: 16px;
    margin-bottom: 24px;
  }

  .detail-table tbody td,
  .detail-table thead th {
    border: 1px solid #e2e8f0 !important;
    padding: 8px 10px !important;
  }

  .rec-card, .stat-card, .xyz-card {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    break-inside: avoid;
  }

  h1,h2,h3 { page-break-after: avoid; }

  @page {
    size: A4 portrait;
    margin: 18mm 15mm;
  }
}

/* ── Print Preview Page (print.php) ──────────────────────────── */
.print-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  padding: 18mm 15mm;
  color: #0D1B2E;
  font-family: 'Cairo', Arial, sans-serif;
  direction: rtl;
}

.print-cover {
  text-align: center;
  padding: 40mm 0;
  border-bottom: 4px solid #0A66C2;
  margin-bottom: 30px;
}
.print-cover h1 { font-size: 2.5rem; font-weight: 900; color: #0A66C2; margin-bottom: 8px; }
.print-cover .print-score { font-size: 5rem; font-weight: 900; color: #0A66C2; line-height: 1; }
.print-cover p  { color: #4A6080; font-size: .95rem; }

.print-section { margin-bottom: 28px; }
.print-section h2 {
  font-size: 1.2rem; font-weight: 800;
  color: #0A66C2; border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px; margin-bottom: 14px;
}

.print-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.print-table th {
  background: #0A66C2; color: #fff; padding: 8px 12px; text-align: right;
}
.print-table td { padding: 8px 12px; border: 1px solid #e2e8f0; }
.print-table tr:nth-child(even) td { background: #f8fafc; }
