/* Shared print styles for the official passport-application form.
   Linked by: index.html (applicant), staff-dashboard.html, verify.html.
   Screen styles are irrelevant here — #printArea is always display:none on
   screen and only appears via @media print in each page's own stylesheet. */

@media print {
  body { background: #fff !important; padding: 0 !important; margin: 0; }

  #printArea {
    display: block !important;
    font-family: 'Tajawal', sans-serif;
    color: #000;
    padding: 7mm 10mm;
    direction: rtl;
  }

  .po-header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-bottom: 3px double #6e1f1f;
    padding-bottom: 4px;
    margin-bottom: 4px;
    gap: 10px;
  }
  .po-emblem {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    font-size: 7px; text-align: center; color: #6e1f1f; flex-shrink: 0;
  }
  .po-titles { text-align: center; flex: 1; }
  .po-titles h1 { font-size: 14.5px; margin: 0; color: #6e1f1f; }
  .po-titles p { font-size: 9.5px; margin: 1px 0 0; color: #333; }
  .po-barcode1d { display: block; height: 20px; margin: 2px auto 0; }
  .po-form-number { font-size: 11px; font-weight: 900; display: block; margin-top: 1px; }
  .po-meta {
    text-align: left; font-size: 9px; min-width: 100px; line-height: 1.5;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end;
  }
  .po-meta .po-tracking-line { display: block; direction: ltr; text-align: left; font-size: 8.5px; color: #333; }
  .po-meta .po-qr { margin-top: 3px; }
  .po-meta .po-qr img, .po-meta .po-qr canvas { width: 50px; height: 50px; }

  .po-title-bar {
    text-align: center; font-size: 11.5px; font-weight: 700; margin: 4px 0 5px;
    border: 1px solid #000; padding: 3px; border-radius: 3px;
  }

  .po-photo-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 4px; }
  .po-photo-box {
    width: 62px; height: 78px; border: 1.2px solid #000; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 8px; overflow: hidden;
  }
  .po-photo-box img { width: 100%; height: 100%; object-fit: cover; }

  .po-section { border: 1px solid #000; border-radius: 2px; padding: 4px 9px 6px; margin-bottom: 4px; }
  .po-section-title { font-weight: 700; font-size: 10.5px; color: #6e1f1f; margin-bottom: 3px; border-bottom: 1px solid #ccc; padding-bottom: 2px; }

  .po-row { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-bottom: 2px; }
  .po-cell { flex: 1; min-width: 110px; font-size: 9.5px; }
  .po-cell .po-label { color: #555; font-size: 8px; display: block; }
  .po-cell .po-value { font-weight: 700; }
  .po-cell .po-value.po-value-red { color: #b3261e; }

  .po-checks { display: flex; gap: 10px; flex-wrap: wrap; font-size: 9.5px; align-items: center; }
  .po-check { white-space: nowrap; }

  .po-sig-row { display: flex; justify-content: space-between; font-size: 9.5px; margin-top: 3px; }

  .po-admin-section { background: #fdeda0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .po-admin-section .po-section-title { color: #7a5b00; }
  .po-admin-line { font-size: 9.5px; margin-bottom: 3px; }
  .po-admin-block { font-size: 9.5px; margin-bottom: 5px; line-height: 1.5; }
  .po-admin-block b { display: block; }
  .po-admin-cols { display: flex; justify-content: space-between; margin-top: 3px; font-size: 9px; }

  .po-oath { font-size: 9.5px; font-weight: 700; margin: 4px 0; display: flex; justify-content: space-between; }

  .po-page-break { page-break-after: always; }
  .po-page-break:last-child { page-break-after: auto; }
}
