/* ===============================================
   God's Elite Boys' Hostel - Print Styles
   Optimized for printing biodata forms
   =============================================== */

@media print {
  /* Reset and Base */
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  body {
    margin: 0;
    padding: 20px;
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  /* Hide unnecessary elements */
  .navbar,
  .navbar-toggle,
  .navbar-menu,
  .floating-btns,
  .whatsapp-btn,
  .scroll-top-btn,
  .footer,
  .form-navigation,
  .btn,
  .progress-container,
  .draft-indicator,
  .loading-overlay,
  .form-alert,
  video,
  audio,
  embed,
  object {
    display: none !important;
  }
  
  /* Show only active form step or all steps for full print */
  .form-step {
    display: block !important;
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  
  /* Page setup */
  @page {
    size: A4;
    margin: 2cm;
  }
  
  /* Typography */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
  }
  
  h1 {
    font-size: 24pt;
    margin-bottom: 10pt;
    text-align: center;
    border-bottom: 2pt solid #000;
    padding-bottom: 10pt;
  }
  
  h2 {
    font-size: 18pt;
    margin-top: 15pt;
    margin-bottom: 10pt;
  }
  
  h3 {
    font-size: 14pt;
    margin-top: 12pt;
    margin-bottom: 8pt;
  }
  
  h4 {
    font-size: 12pt;
    margin-top: 10pt;
    margin-bottom: 6pt;
  }
  
  p, li {
    orphans: 3;
    widows: 3;
  }
  
  /* Links */
  a {
    text-decoration: none;
    color: #000;
  }
  
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 90%;
    font-style: italic;
  }
  
  /* Images */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  .photo-preview img {
    width: 120px !important;
    height: 120px !important;
    border: 2pt solid #000;
    border-radius: 50%;
  }
  
  /* Form Header */
  .form-header {
    text-align: center;
    margin-bottom: 20pt;
    border-bottom: 2pt solid #000;
    padding-bottom: 15pt;
  }
  
  .form-header h1 {
    border: none;
    margin-bottom: 5pt;
  }
  
  .form-header p {
    font-size: 11pt;
    margin: 0;
  }
  
  .tagline {
    font-style: italic;
    font-weight: 600;
  }
  
  /* Form Card */
  .form-card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Form Sections */
  .form-step {
    margin-bottom: 20pt;
  }
  
  .step-title {
    font-size: 16pt;
    margin-bottom: 8pt;
    border-bottom: 1pt solid #000;
    padding-bottom: 5pt;
  }
  
  .step-description {
    font-size: 10pt;
    margin-bottom: 12pt;
    font-style: italic;
  }
  
  /* Form Subsections */
  .form-subsection {
    margin-top: 15pt;
    padding-top: 0;
    border-top: none;
    page-break-inside: avoid;
  }
  
  .subsection-title {
    font-size: 13pt;
    margin-bottom: 10pt;
    font-weight: 700;
  }
  
  .subsection-title::before {
    content: '▪ ';
  }
  
  /* Form Groups */
  .form-group {
    margin-bottom: 12pt;
    page-break-inside: avoid;
  }
  
  .form-row {
    display: table;
    width: 100%;
    margin-bottom: 10pt;
  }
  
  .form-row .form-group {
    display: table-cell;
    padding-right: 10pt;
  }
  
  .form-group label {
    display: block;
    font-weight: 700;
    font-size: 10pt;
    margin-bottom: 3pt;
    color: #000;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    display: block;
    width: 100%;
    padding: 5pt;
    border: 1pt solid #000;
    background: transparent !important;
    color: #000 !important;
    font-size: 10pt;
  }
  
  .form-group input[readonly],
  .form-group textarea[readonly] {
    border-style: solid;
    background: #f5f5f5 !important;
  }
  
  .form-group textarea {
    min-height: 60pt;
  }
  
  /* Photo Upload */
  .photo-upload-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15pt;
    page-break-inside: avoid;
  }
  
  .photo-preview {
    width: 120px;
    height: 120px;
    border: 2pt solid #000;
    display: block;
  }
  
  .photo-placeholder {
    display: none;
  }
  
  .photo-upload-btn {
    display: none;
  }
  
  /* Checkboxes */
  .checkbox-group,
  .radio-group {
    margin-bottom: 10pt;
  }
  
  .checkbox-item,
  .radio-item {
    display: flex;
    align-items: start;
    margin-bottom: 5pt;
    page-break-inside: avoid;
  }
  
  .checkbox-item input[type="checkbox"],
  .radio-item input[type="radio"] {
    width: 12pt;
    height: 12pt;
    margin-right: 5pt;
    border: 1pt solid #000;
    accent-color: #000;
  }
  
  .checkbox-item label,
  .radio-item label {
    font-size: 10pt;
    color: #000;
  }
  
  /* Reference Number */
  .reference-number {
    border: 2pt solid #000;
    padding: 15pt;
    text-align: center;
    margin: 20pt 0;
    page-break-inside: avoid;
  }
  
  .reference-number h3 {
    font-size: 11pt;
    margin-bottom: 5pt;
    text-transform: uppercase;
  }
  
  .reference-code {
    font-size: 18pt;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2pt;
  }
  
  /* Success Page Elements */
  .success-icon {
    display: none !important;
  }
  
  .success-container {
    padding: 0;
  }
  
  .success-actions {
    display: none !important;
  }
  
  /* Print-specific elements */
  .print-only {
    display: block !important;
  }
  
  .no-print {
    display: none !important;
  }
  
  /* Form Header for Print */
  .print-form-header {
    text-align: center;
    margin-bottom: 20pt;
    page-break-after: avoid;
  }
  
  .print-form-header h1 {
    font-size: 20pt;
    margin-bottom: 5pt;
  }
  
  .print-form-header h2 {
    font-size: 14pt;
    margin-bottom: 3pt;
  }
  
  .print-form-header .tagline {
    font-size: 11pt;
    font-style: italic;
  }
  
  /* Signature Lines */
  .signature-section {
    margin-top: 30pt;
    page-break-inside: avoid;
  }
  
  .signature-line {
    margin-top: 40pt;
    border-top: 1pt solid #000;
    padding-top: 5pt;
  }
  
  .signature-line .label {
    font-size: 10pt;
    font-weight: 700;
  }
  
  /* Table for better layout */
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15pt;
  }
  
  .print-table th,
  .print-table td {
    border: 1pt solid #000;
    padding: 5pt;
    text-align: left;
    font-size: 10pt;
  }
  
  .print-table th {
    background: #f0f0f0 !important;
    font-weight: 700;
  }
  
  /* Contact Information */
  .print-contacts {
    margin-top: 20pt;
    padding-top: 15pt;
    border-top: 1pt solid #000;
    text-align: center;
    font-size: 10pt;
  }
  
  /* Footer for Print */
  .print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 9pt;
    padding-top: 10pt;
    border-top: 1pt solid #000;
  }
  
  /* Page breaks */
  .page-break-before {
    page-break-before: always;
  }
  
  .page-break-after {
    page-break-after: always;
  }
  
  .avoid-break {
    page-break-inside: avoid;
  }
  
  /* Field helpers and errors - hide in print */
  .error-message,
  .success-message,
  .field-help,
  .form-alert {
    display: none !important;
  }
  
  /* Empty checkboxes for blank forms */
  input[type="checkbox"]:not(:checked)::before {
    content: '☐';
    font-size: 14pt;
  }
  
  input[type="checkbox"]:checked::before {
    content: '☑';
    font-size: 14pt;
  }
}
