/* ────────────────────────────────────────────────────────────────────────
   Print Forms CSS (pf- prefix)
   ──────────────────────────────────────────────────────────────────────── */

.pf-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease;
}

.pf-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.pf-category-group {
  margin-bottom: 32px;
}

.pf-category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.pf-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.pf-card-subtitle {
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
}

.pf-card-ref {
  font-size: 11px;
  color: #999;
  line-height: 1.4;
  margin-bottom: 12px;
  font-style: italic;
}

.pf-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pf-btn:hover {
  background: #3f6b2f;
}

.pf-btn:active {
  opacity: 0.9;
}

.pf-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg2, #ece6db);
  border: 1px solid var(--border, #cfc8ba);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #231e14);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin: 8px 0;
}

.pf-inline-btn:hover {
  background: var(--accent, #4a7c35);
  color: #fff;
  border-color: var(--accent, #4a7c35);
}

/* Print window styles */
@media print {
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #000;
    background: #fff;
  }

  .pf-print-page {
    page-break-after: always;
    break-after: page;
    margin: 0;
    padding: 20px;
    font-size: 11px;
    line-height: 1.4;
    background: #fff;
    color: #000;
  }

  .pf-print-page:last-child {
    page-break-after: avoid;
    break-after: avoid;
  }

  .pf-print-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #000;
  }

  .pf-print-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 4px 0;
  }

  .pf-print-ref {
    font-size: 9px;
    color: #333;
    margin: 4px 0;
    font-style: italic;
  }

  .pf-print-patient-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
    margin-bottom: 16px;
    font-size: 10px;
  }

  .pf-print-patient-field {
    display: flex;
    align-items: baseline;
  }

  .pf-print-patient-label {
    font-weight: bold;
    min-width: 60px;
  }

  .pf-print-patient-line {
    flex: 1;
    border-bottom: 1px solid #000;
    margin-left: 4px;
  }

  .pf-print-items {
    margin-bottom: 16px;
  }

  .pf-print-item {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 8px 12px;
    margin-bottom: 10px;
    align-items: center;
  }

  .pf-print-item-num {
    font-weight: bold;
    font-size: 10px;
  }

  .pf-print-item-text {
    font-size: 10px;
    line-height: 1.3;
  }

  .pf-print-item-boxes {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  .pf-print-box {
    width: 18px;
    height: 18px;
    border: 1px solid #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
  }

  .pf-print-circle {
    width: 16px;
    height: 16px;
    border: 1px solid #000;
    border-radius: 50%;
    display: inline-block;
  }

  .pf-print-score-line {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #000;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: bold;
  }

  .pf-print-interpretation {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #000;
    font-size: 9px;
    line-height: 1.3;
  }

  .pf-print-interpretation-title {
    font-weight: bold;
    margin-bottom: 4px;
  }

  .pf-print-footer {
    margin-top: 20px;
    padding-top: 8px;
    border-top: 1px solid #ccc;
    font-size: 8px;
    color: #666;
    text-align: center;
  }

  .pf-print-clinician-sig {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    font-size: 9px;
  }

  .pf-print-sig-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .pf-print-sig-line {
    border-top: 1px solid #000;
    width: 100%;
    margin-bottom: 4px;
  }

  /* Hide screen UI in print */
  button, .pf-no-print {
    display: none !important;
  }
}

/* Desktop/laptop layout for on-screen preview */
.pf-print-page {
  background: #fff;
  color: #000;
  margin: 0 auto 24px;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  max-width: 8.5in;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
