/**
 * ========================================================
 * استايل الطباعة الملونة لنسخة طبق الأصل - استمارة تسجيل جامعة أوروك
 * Uruk University Registration Form - Pixel-Perfect Color Print CSS
 * ========================================================
 */

@media print {
  /* إجبار محرك المتصفح على طباعة الألوان والخلفيات والحدود */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* إخفاء عناصر الموقع التفاعلية وأزرار التحكم بالكامل */
  header,
  nav,
  footer,
  .no-print,
  button,
  .action-buttons,
  .stats-banner,
  .alert-box {
    display: none !important;
  }

  /* إعدادات صفحة الطباعة بحجم A4 العمودي */
  @page {
    size: A4 portrait;
    margin: 5mm 6mm 5mm 6mm;
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: 'Amiri', 'Cairo', 'Times New Roman', serif !important;
    direction: rtl !important;
    font-size: 11px !important;
  }

  /* إظهار حاوية الاستمارة الورقية فقط */
  .uruk-print-replica {
    display: block !important;
    width: 100% !important;
    max-width: 198mm !important;
    margin: 0 auto !important;
    padding: 2mm 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* شريط التنبيه العلوي مع الحفاظ على الألوان الأصلية */
  .uruk-warning-banner {
    background-color: #fef3c7 !important;
    color: #991b1b !important;
    border: 1.5px solid #d97706 !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 3px 6px !important;
    margin-bottom: 3px !important;
    border-radius: 4px !important;
  }

  /* عناوين جداول الخيارات الملونة */
  .replica-header-row th {
    background-color: #e0f2fe !important;
    color: #0f172a !important;
  }

  .replica-affiliated-box {
    background-color: #f8fafc !important;
  }

  .replica-account-header {
    background-color: #e2e8f0 !important;
  }

  /* تنسيق الجداول والحدود لتكون سوداء حادة مثل الورقة الأصلية */
  .uruk-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1.5px solid #000000 !important;
    font-size: 10.5px !important;
    line-height: 1.25 !important;
  }

  .uruk-table th,
  .uruk-table td {
    border: 1px solid #000000 !important;
    padding: 2.5px 4.5px !important;
    text-align: right !important;
    vertical-align: middle !important;
  }

  /* المربعات الخاصة باختيار نعم/كلا والجنس والدور والأقسام */
  .print-checkbox-box {
    display: inline-block !important;
    width: 11px !important;
    height: 11px !important;
    border: 1.5px solid #000000 !important;
    vertical-align: middle !important;
    margin: 0 2px !important;
    text-align: center !important;
    line-height: 10px !important;
    font-size: 9.5px !important;
    font-weight: bold !important;
    background-color: #ffffff;
  }

  .print-checkbox-box.checked {
    background-color: #eff6ff !important;
    border-color: #1e3a8a !important;
  }

  .print-checkbox-box.checked::after {
    content: "✓" !important;
    font-weight: 900 !important;
    color: #1e3a8a !important;
  }

  /* خطوط الملاحظات المنقطة */
  .dotted-note-line {
    border-bottom: 1px dotted #000000 !important;
    height: 14px !important;
    width: 100% !important;
    margin-top: 2px !important;
  }
}

/* في وضع الشاشة العادية (المعاينة الحية) */
.uruk-print-replica {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  background: #ffffff;
  color: #000000;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1.5px solid #cbd5e1;
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 11.5px;
}

.uruk-warning-banner {
  background-color: #fef3c7;
  color: #991b1b;
  border: 1.5px solid #d97706;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  padding: 4px 8px;
  margin-bottom: 6px;
  border-radius: 4px;
}

.replica-header-row th {
  background-color: #e0f2fe;
  color: #0f172a;
}

.replica-affiliated-box {
  background-color: #f8fafc;
}

.replica-account-header {
  background-color: #e2e8f0;
}

.uruk-table {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #000;
}

.uruk-table th,
.uruk-table td {
  border: 1px solid #000;
  padding: 3.5px 5px;
  vertical-align: middle;
}

.print-checkbox-box {
  display: inline-block;
  width: 12.5px;
  height: 12.5px;
  border: 1.5px solid #000;
  vertical-align: middle;
  margin: 0 3px;
  text-align: center;
  line-height: 11px;
  font-size: 10px;
  font-weight: bold;
}

.print-checkbox-box.checked {
  background-color: #eff6ff;
  border-color: #1e3a8a;
}

.print-checkbox-box.checked::after {
  content: "✓";
  font-weight: 900;
  color: #1e3a8a;
}
