/* Discharge-planner choice list (#/planner) — screen styles + print layout.
   The .pvsheet block is designed to print as the 42 CFR 482.43 documentation
   artifact: header, provider tables, disclosure line, signature block. */

.plannerview {
  max-width: 1060px;
  margin: 0 auto;
  padding: 34px 22px 60px;
}

/* ------------------------------------------------------------- page head */
.pvhead { max-width: 760px; }
.pvkick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.6px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-d);
  background: var(--teal-l);
  border-radius: 100px;
  padding: 5px 12px;
}
.pvhead h1 {
  font-size: 42px;
  line-height: 1.08;
  margin-top: 14px;
  color: var(--navy);
}
.pvhead h1 em { font-style: italic; color: var(--teal-d); }
.pvlede {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
.pvlede a { color: var(--teal-d); }

/* ----------------------------------------------------------------- form */
.pvform {
  margin-top: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 20px 14px;
}
.pvrow {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
}
.pvrow + .pvrow { margin-top: 14px; }
.pvfield {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13.4px;
  font-weight: 600;
  color: var(--ink);
  flex: 1 1 190px;
  min-width: 0;
  border: 0;
}
.pvfield span em,
.pvfield legend em { font-style: normal; font-weight: 500; color: var(--dim); }
.pvfield input,
.pvfield select {
  border: 1px solid var(--line2);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 15px;
  background: #fff;
  width: 100%;
}
.pvzip { flex: 0 1 120px; }
.pvtypes { flex: 2 1 320px; }
.pvtypes legend { margin-bottom: 5px; }
.pvtypes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 14.4px;
  margin: 6px 16px 4px 0;
}
.pvtypes input { width: auto; accent-color: var(--teal-d); }
.pvgo {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: 100px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 15.5px;
}
.pvgo:hover { background: var(--navy2); }
.pvpriv {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
}

/* -------------------------------------------------------------- results */
.pvout { margin-top: 30px; }
.pvloading {
  padding: 26px 4px;
  color: var(--muted);
  font-size: 15.5px;
}
.pvactions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 14px;
  font-size: 13.8px;
  color: var(--muted);
}
.pvactions button {
  border: 0;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--teal-d);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
}
.pvactions button:hover { background: var(--navy); }

/* ---------------------------------------------------------------- sheet */
.pvsheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-h);
  padding: 34px 38px 30px;
  font-size: 13.4px;
  line-height: 1.45;
  color: #24303a;
}
.pvdochead {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 2px solid #24303a;
  padding-bottom: 14px;
}
.pvdoctitle h2 {
  font-size: 23px;
  color: #1d2830;
  line-height: 1.15;
}
.pvdoctitle p {
  margin-top: 6px;
  max-width: 56ch;
  color: #45525c;
}
.pvdocmeta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}
.pvdocmeta div { display: flex; gap: 8px; }
.pvdocmeta dt {
  font-weight: 700;
  width: 88px;
  flex: none;
  color: #45525c;
}
.pvdocmeta dd { margin: 0; }
.pvrights {
  margin: 14px 0 4px;
  padding: 10px 12px;
  background: #f4f6f5;
  border: 1px solid #e2e6e4;
  border-radius: 6px;
  max-width: none;
}

/* sections */
.pvsec { margin-top: 20px; break-inside: auto; }
.pvsec h3 {
  font-size: 16.5px;
  color: #1d2830;
  font-family: 'Figtree', system-ui, sans-serif;
  font-weight: 700;
}
.pvcount { color: #6a7681; font-weight: 500; }
.pvbasis { color: #6a7681; margin: 2px 0 8px; font-size: 12.4px; max-width: none; }
.pvtable {
  width: 100%;
  border-collapse: collapse;
}
.pvtable th {
  text-align: left;
  font-size: 11.2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6a7681;
  border-bottom: 1.5px solid #adb6bd;
  padding: 4px 8px 5px;
}
.pvtable td {
  border-bottom: 1px solid #dde2e6;
  padding: 7px 8px;
  vertical-align: top;
}
.pvtable tr { break-inside: avoid; }
.pvn { color: #6a7681; width: 26px; }
.tnum { font-variant-numeric: tabular-nums; }
.pvprov b { font-size: 13.8px; color: #1d2830; }
.pvaddr { color: #45525c; font-size: 12.4px; }
.pvq { width: 34%; font-size: 12.4px; color: #33404a; }
.pvm b { font-variant-numeric: tabular-nums; }
.pvm.muted { color: #6a7681; }
.pvflag {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--bad-l);
  color: var(--bad);
  font-weight: 600;
  font-size: 11.6px;
}
.pvqr { width: 76px; text-align: center; }
.pvqrbox { display: block; width: 58px; height: 58px; margin: 0 auto 3px; }
.pvqrbox svg { width: 58px; height: 58px; }
.pvccn { color: #6a7681; font-size: 10.6px; white-space: nowrap; }
.pvempty { color: #6a7681; padding: 14px 8px; }

/* doc footer: neutrality, disclosure, signatures */
.pvdocfoot { margin-top: 22px; break-inside: avoid; }
.pvneutral {
  font-size: 11.8px;
  color: #45525c;
  border-top: 2px solid #24303a;
  padding-top: 10px;
  max-width: none;
}
.pvdisclose {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 14px;
  font-size: 12.4px;
  color: #33404a;
}
.pvline {
  display: inline-block;
  flex: 1 1 auto;
  min-width: 120px;
  border-bottom: 1px solid #33404a;
  height: 1.3em;
}
.pvline.pvshort { flex: 0 0 110px; min-width: 110px; }
.pvsign {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.pvsign > div { flex: 1 1 300px; }
.pvsign p { font-size: 12px; color: #33404a; max-width: none; }
.pvsigrow { display: flex; gap: 18px; margin-top: 26px; }
.pvsiglbl {
  display: flex;
  gap: 18px;
  font-size: 10.8px;
  color: #6a7681;
  margin-top: 3px;
}
.pvsiglbl span:first-child { flex: 1 1 auto; }
.pvsiglbl span:last-child { flex: 0 0 110px; }
.pvfine {
  margin-top: 16px;
  font-size: 10.8px;
  color: #6a7681;
  max-width: none;
}

@media (max-width: 640px) {
  .pvhead h1 { font-size: 32px; }
  .pvsheet { padding: 22px 16px; }
  .pvq { width: auto; }
  .pvqr { display: none; }
  .pvtable th:last-child { display: none; }
}

/* ------------------------------------------------------------------ print
   Printing from #/planner produces only the sheet: site chrome, form and
   controls disappear, colors flatten to black-on-white. */
@media print {
  /* style.css already prints the facility profile (.lbwrap) alone; these rules
     take over only while the planner is up and no profile is open on top */
  body.planner-on:has(#lbwrap[hidden]) > *:not(#plannerview) { display: none !important; }
  body.planner-on:has(#lbwrap[hidden]) > #plannerview { display: block !important; }
  body.planner-on { background: #fff; }
  body.planner-on .plannerview { max-width: none; padding: 0; }
  body.planner-on .pvhead,
  body.planner-on .pvform,
  body.planner-on .pvactions,
  body.planner-on .noprint { display: none !important; }
  body.planner-on .pvsheet {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    font-size: 12px;
  }
  body.planner-on .pvqr { display: table-cell; }
  body.planner-on .pvtable th:last-child { display: table-cell; }
  body.planner-on .pvflag { border: 1px solid #999; background: #fff; color: #000; }
  body.planner-on .pvrights { background: #fff; border: 1px solid #999; }
  body.planner-on a { color: inherit; text-decoration: none; }
}
