/* ============================================================
   StrongHearts Home Health Agency — PRINT stylesheet (v2)
   "Lumière & Confiance" • print fallback for form pages
   File: v2-full/css/print-v2.css
   Theme copy: wp-theme/stronghearts-v2/print-v2.css
   ------------------------------------------------------------
   HOW TO USE (coordinator): add this link to <head> of any
   form page (careers, contact, free-care-assessment, quiz,
   book-consultation, candidate-portal, client-portal):
     <link rel="stylesheet" href="css/print-v2.css">
   And a print button near each form:
     <button type="button" class="btn btn-gold print-btn"
             onclick="window.print()">🖨️ Enprime fòm lan</button>
   (screen version: style .print-btn as you like in style-v2.css;
    the .print-header block below is OPTIONAL — if the page
    already contains <div class="print-header">…</div> it will
    be used; otherwise a CSS-content fallback header prints.)
   ------------------------------------------------------------
   Screen behaviour: this file does NOTHING on screen —
   every rule is inside @media print.
   ============================================================ */

@media print {

  /* ---------- Page setup ---------- */
  @page {
    size: A4;
    margin: 17mm 15mm 20mm;
  }

  /* Ink-friendly: everything black on white, no shadows/gradients */
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  * {
    color: #000 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
    -webkit-print-color-adjust: exact;
  }

  /* Reveal-on-scroll animations must not hide content on paper */
  .reveal, .fade, .slide {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* ---------- Screen chrome: NEVER print ---------- */
  header.site,
  nav.main,
  footer.site,
  .nav-toggle,
  .mobile-call-bar,
  .to-top,
  .newsletter-bar,
  .newsletter-form,
  .cta-band,
  .chat-widget, .chat-bubble, .chat-launcher,
  .sticky-call-bar, .sticky-bar,
  .modal, .popup, .overlay, .backdrop,
  .cookie-banner, .cookie-notice,
  .announcement-bar, .announce,
  .page-hero,
  .video-wrap, video, iframe,
  .print-btn,                     /* the print button itself */
  button[type="submit"],
  input[type="submit"],
  .form-msg,
  [hidden],
  script, noscript, style, template {
    display: none !important;
  }

  /* Hide general call-to-action links/buttons on the paper form
     (.slot-chip handled separately below as printable boxes) */
  a.btn, a.btn-navy, a.btn-gold, .btn, .btn-ghost,
  .print-btn {
    display: none !important;
  }

  /* ---------- Printable header ----------
     If the page includes a .print-header block (hidden on
     screen), use it. Otherwise print the CSS-content fallback. */
  .print-header {
    display: block !important;
    border-bottom: 3px double #000;
    padding-bottom: 8pt;
    margin-bottom: 14pt;
    text-align: left;
  }
  .print-header h1, .print-header .agency-name {
    font-size: 17pt;
    font-weight: 700;
    margin: 0 0 2pt;
    line-height: 1.15;
  }
  .print-header p {
    font-size: 9.5pt;
    margin: 0 0 1pt;
    line-height: 1.35;
  }

  /* Fallback header when no .print-header element exists */
  body:not(:has(.print-header))::before {
    content: "StrongHearts Home Health Agency\A 1-(855)-775-7070  •  (561) 961-4809  •  (954) 990-4786\A 1650 South Dixie Hwy Ste 206-207, Boca Raton FL 33432  •  2800 W Oakland Park Blvd Ste 106BC, Oakland Park FL 33311";
    display: block;
    white-space: pre-wrap;
    font-size: 10pt;
    line-height: 1.4;
    font-weight: 700;
    border-bottom: 3px double #000;
    padding-bottom: 8pt;
    margin-bottom: 14pt;
  }

  /* ---------- Printable footer note (every page) ---------- */
  body:not(:has(.print-footer))::after {
    content: "Ranpli ak plim epi pote fòm lan nan biwo nou an — Fill out with a pen and bring this form to our office:\A 1650 South Dixie Hwy Ste 206-207, Boca Raton FL 33432  •  2800 W Oakland Park Blvd Ste 106BC, Oakland Park FL 33311  •  1-(855)-775-7070";
    display: block;
    white-space: pre-wrap;
    font-size: 8.5pt;
    line-height: 1.45;
    border-top: 1.5pt solid #000;
    padding-top: 7pt;
    margin-top: 18pt;
  }
  .print-footer {
    display: block !important;
    font-size: 8.5pt;
    line-height: 1.45;
    border-top: 1.5pt solid #000;
    padding-top: 7pt;
    margin-top: 18pt;
  }

  /* ---------- Single-column layout ---------- */
  .wrap, .container, .content, main, article {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }
  .block, .section, section, .card, .form-card,
  .office-grid, .office-card, .grid, .row, .cols,
  .form-grid {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 0 12pt !important;
    border: 0 !important;
  }
  .form-grid, .quiz-opts {
    display: block !important;
  }

  /* Keep form sections visually grouped, start big forms on fresh page */
  form.callback-form, form.newsletter-form,
  form[class*="form"], form.quiz-form,
  .form-card {
    page-break-before: auto;
  }
  form + form, .form-card + .form-card {
    page-break-before: always;
  }

  /* ---------- Typography for paper ---------- */
  body {
    font-size: 11pt;
    line-height: 1.5;
    font-family: Georgia, "Times New Roman", serif;
  }
  h1 { font-size: 19pt; margin: 0 0 10pt; }
  h2 { font-size: 15pt; margin: 14pt 0 8pt; }
  h3 { font-size: 12.5pt; margin: 12pt 0 6pt; }
  h4, h5, h6 { font-size: 11pt; margin: 10pt 0 5pt; }
  p, li { font-size: 10.5pt; margin: 0 0 6pt; }
  a { text-decoration: none; }
  a[href^="tel:"]::after { content: none; }

  /* No orphaned headings, fields never split across pages */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  .field, fieldset, .quiz-field, .quiz-opt, .check-row,
  .portal-note, .result-card, .quiz-result-card {
    page-break-inside: avoid;
  }

  /* ---------- Form fields → handwriting lines ---------- */
  .field {
    display: block !important;
    width: 100% !important;
    margin: 0 0 13pt !important;
    padding: 0 !important;
  }
  .field.full { width: 100% !important; }

  .field label,
  .field > .field-label,
  span.field-label {
    display: block;
    font-size: 10.5pt;
    font-weight: 700;
    margin: 0 0 3pt;
  }

  /* Text-like inputs become long handwriting lines */
  input[type="text"], input[type="tel"], input[type="email"],
  input[type="number"], input[type="date"], input[type="time"],
  input[type="url"], input[type="password"], input:not([type]) {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    min-height: 26pt;
    border: 0 !important;
    border-bottom: 1.5pt solid #000 !important;
    border-radius: 0 !important;
    padding: 2pt 1pt !important;
    margin: 0 !important;
    font-size: 11pt;
    color: #000 !important;
  }

  /* Selects become a write-in line (dropdown is useless on paper) */
  select {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    min-height: 26pt;
    border: 0 !important;
    border-bottom: 1.5pt solid #000 !important;
    border-radius: 0 !important;
    padding: 2pt 1pt !important;
    font-size: 11pt;
    color: #000 !important;
    background-image: none !important;
  }
  select option { display: none !important; }

  /* Textareas: lined box for longer handwriting */
  textarea {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    min-height: 80pt;
    border: 1.5pt solid #000 !important;
    border-radius: 0 !important;
    padding: 4pt !important;
    font-size: 11pt;
    line-height: 1.9;
    background-image: repeating-linear-gradient(
      to bottom, transparent, transparent 21pt, #999 21pt, #999 22pt
    ) !important;
    resize: none !important;
    overflow: visible;
  }

  input[type="file"] {
    display: block;
    min-height: 26pt;
    border: 1.5pt dashed #000 !important;
    padding: 4pt !important;
    font-size: 9.5pt;
    width: 100%;
  }
  input[type="file"]::after {
    content: "  — attach or bring in person / tache oswa pote an pèsòn";
    font-size: 9pt;
  }
  input[type="hidden"] { display: none !important; }

  /* ---------- Checkboxes & radios → printable boxes ---------- */
  input[type="checkbox"], input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    width: 13pt;
    height: 13pt;
    min-width: 13pt;
    margin: 0 6pt 0 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    border: 1.5pt solid #000 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }
  input[type="radio"] {
    border-radius: 50% !important;
  }
  input[type="checkbox"]:checked,
  input[type="radio"]:checked {
    background: #fff !important;   /* blank box: applicant marks with pen */
  }

  .check-row {
    display: block !important;
    margin: 0 0 10pt !important;
  }
  .check-row label {
    display: inline;
    font-size: 10pt;
    font-weight: 400;
    line-height: 1.5;
  }

  /* JS "slot chip" buttons → printable choice boxes */
  .slot-chips {
    display: block !important;
  }
  .slot-chip {
    display: inline-block !important;
    border: 1.5pt solid #000 !important;
    border-radius: 0 !important;
    padding: 4pt 10pt !important;
    margin: 0 8pt 6pt 0 !important;
    font-size: 10.5pt;
    font-weight: 400;
    background: #fff !important;
    cursor: default;
  }
  .slot-chip::before {
    content: "☐ ";
    font-size: 11pt;
  }

  /* Quiz option buttons → printable choice lines */
  .quiz-opts, .quiz-opt {
    display: block !important;
  }
  .quiz-opt {
    border: 1.5pt solid #000 !important;
    border-radius: 0 !important;
    padding: 5pt 8pt !important;
    margin: 0 0 7pt !important;
    font-size: 10.5pt;
    background: #fff !important;
    page-break-inside: avoid;
  }
  .quiz-opt::before {
    content: "☐ ";
    font-size: 11pt;
  }
  .quiz-result-card { display: none !important; }  /* JS result: not printable */

  /* ---------- Signature lines (paper fallback for e-signature) ----------
     Any element with class .signature-line prints as:
     Signature: ______________  Date: ______________             */
  .signature-line, .sig-line, .signature-block {
    display: block !important;
    margin: 22pt 0 6pt !important;
    page-break-inside: avoid;
    font-size: 11pt;
  }
  .signature-line::before,
  .sig-line::before {
    content: "Signature: ";
    font-weight: 700;
  }
  .signature-line::after,
  .sig-line::after {
    content: "________________________________________        Date: ____________________";
    white-space: pre;
  }

  /* Decorative icons/cards imagery: skip to save ink */
  .icon, .card-icon, .decorative, [aria-hidden="true"].icon {
    display: none !important;
  }
  img { max-width: 100% !important; }
  .logo img, .site-logo img { max-height: 28pt; }

  /* Slim tables for paper (e.g., trackers in portals) */
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
  }
  th, td {
    border: 1pt solid #000;
    padding: 4pt 6pt;
    text-align: left;
    vertical-align: top;
  }
  thead { display: table-header-group; }
  tr { page-break-inside: avoid; }
}
