/* Phase 29.2.4 — Shared CFP Inspection Schedule print renderer               */
/* Used by: /schedule/ and /dashboard/#page=rfi-workflow                       */
/* Version: 29.2.4                                                             */

/* ── Hidden on screen; shown only during rfi-print-mode ─────────────────── */
#rfi-print-root { display: none; }

/* ── Disc-tag colours: self-contained light palette ─────────────────────── */
#rfi-print-root .disc-tag {
  display: inline-block; padding: 2px 7px; border-radius: 10px;
  font-size: 9px; font-weight: 600; letter-spacing: .1px; white-space: nowrap;
}
#rfi-print-root .disc-EL { background:#FAEEDA; color:#854F0B; }
#rfi-print-root .disc-IN { background:#EEEDFE; color:#3C3489; }
#rfi-print-root .disc-TE { background:#E8F4FA; color:#0B4F6B; }
#rfi-print-root .disc-MH,
#rfi-print-root .disc-ME { background:#E1F5EE; color:#0F6E56; }
#rfi-print-root .disc-MS { background:#E6F1FB; color:#185FA5; }
#rfi-print-root .disc-MR { background:#DDE8F8; color:#1250A0; }
#rfi-print-root .disc-MP { background:#F0EAFE; color:#442A8A; }
#rfi-print-root .disc-MF { background:#FDECEA; color:#911F1F; }
#rfi-print-root .disc-PI { background:#E6F1FB; color:#0C447C; }
#rfi-print-root .disc-PF { background:#EBF5EB; color:#246024; }
#rfi-print-root .disc-IC { background:#E8F5E9; color:#2E7D32; }
#rfi-print-root .disc-CI,
#rfi-print-root .disc-CB,
#rfi-print-root .disc-CM { background:#F1EFE8; color:#444441; }
#rfi-print-root .disc-CS { background:#F0EDE4; color:#5C4A2A; }
#rfi-print-root .disc-CV,
#rfi-print-root .disc-ST,
#rfi-print-root .disc-SS { background:#FBEAF0; color:#72243E; }
#rfi-print-root .disc-CO { background:#E0F4F7; color:#0A5460; }
#rfi-print-root .disc-HS { background:#FFF0E6; color:#7A3010; }
#rfi-print-root .disc-FP { background:#FEF0E6; color:#7C3210; }
#rfi-print-root .disc-PC,
#rfi-print-root .disc-PE,
#rfi-print-root .disc-PM { background:#F2F2F2; color:#424242; }
#rfi-print-root .disc-EM,
#rfi-print-root .disc-FE { background:#EEF0FD; color:#303F9F; }
#rfi-print-root .disc-PP,
#rfi-print-root .disc-PT { background:#FFF3E0; color:#7A4000; }
#rfi-print-root .disc-CC,
#rfi-print-root .disc-IT { background:#E0F4FF; color:#014F86; }
#rfi-print-root .disc-QA { background:#FEFAE0; color:#826A00; }
#rfi-print-root .disc-PA { background:#F0EAF8; color:#4E2573; }
#rfi-print-root .disc-IS { background:#F4F0E8; color:#5A4A00; }

@media print {
  /* ── Isolation: hide all direct body children except #rfi-print-root ──── */
  body.rfi-print-mode > *:not(#rfi-print-root) { display: none !important; }
  #rfi-print-root { display: block !important; }

  /* ── Wrapper ── */
  .rfi-p-wrap {
    font-family: 'Inter Tight', -apple-system, Arial, sans-serif;
    font-size: 9.5px;
    color: #1A1D24;
    padding: 0;
    margin: 0;
  }

  /* ── Page header ── */
  .rfi-p-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 5px 0;
    border-bottom: 1.5px solid #D0D5DD;
    margin-bottom: 4px;
  }
  .rfi-p-title {
    font-size: 11px;
    font-weight: 600;
    color: #1A1D24;
  }
  .rfi-p-date-badge {
    font-size: 10px;
    font-weight: 500;
    background: #185FA5;
    color: #fff;
    padding: 2px 9px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
  }

  /* ── Filter bar ── */
  .rfi-p-filter-bar {
    font-size: 9px;
    color: #444;
    line-height: 1.7;
    padding: 5px 0 7px 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 4px;
  }
  .rfi-p-filter-bar strong { color: #000; }

  /* ── Table ── */
  .rfi-p-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5px;
    table-layout: fixed;
  }
  .rfi-p-table th {
    padding: 4px 6px;
    text-align: left;
    font-weight: 500;
    color: #5A6573;
    font-size: 8.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    border-bottom: 1px solid #D0D5DD;
    background: #F1F3F6;
    white-space: nowrap;
    overflow: hidden;
  }
  .rfi-p-table td {
    padding: 4px 6px;
    border-bottom: 0.5px solid #E4E7EC;
    vertical-align: top;
    overflow: hidden;
  }
  .rfi-p-table tr.alt td { background: rgba(241,243,246,.4); }
  .rfi-p-table td.rfi-p-desc { overflow: visible; white-space: normal; word-break: break-word; max-width: none; }
  .rfi-p-table a { text-decoration: none; color: #000; }

  /* ── Cell helpers ── */
  .rfi-p-rfi-no { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 500; color: #185FA5; white-space: nowrap; }
  .rfi-p-date   { color: #5A6573; white-space: nowrap; font-family: 'JetBrains Mono', monospace; }
  .rfi-p-time   { color: #5A6573; white-space: nowrap; font-size: 9px; }
  .rfi-p-tag    { color: #5A6573; white-space: nowrap; font-size: 9px; font-family: 'JetBrains Mono', monospace; }
  .rfi-p-loc    { color: #5A6573; white-space: nowrap; font-size: 9px; }
  .rfi-p-insp   { white-space: nowrap; font-size: 9px; }
}
