/* Phase 8: Repeat and Prepare in the task popup, Prepare markers on Dates and Horizons, the
   Playbooks sheet, Apply playbook, and the Roadmap's Playbooks / Print buttons. Loaded after
   final.css. Print itself is print.css (media print); here .print-only stays off screen. */

.print-only { display: none; }

/* ---- the task popup: Repeat · Prepare, a fourth line under Status · Priority ---- */
.pm-prop[data-prop="repeat"], .pm-prop[data-prop="prepare"] { grid-column: span 2; }
@media (min-width: 761px) and (max-width: 1100px) {
  #pm-panel .pm-prop:is([data-prop="repeat"], [data-prop="prepare"]) { grid-column: auto; }
}
@media (max-width: 760px) {
  .pm-prop[data-prop="repeat"], .pm-prop[data-prop="prepare"] { grid-column: auto; } /* short answers: two to a line */
}

/* ---- Prepare markers: cool, dashed like draft items ---- */
.pmv-dt-chip[data-k="prep"] { background: transparent; color: var(--sky); box-shadow: none; outline: 1.5px dashed var(--pc); outline-offset: -1.5px; }
.pmv-dt-cd[data-k="prep"], .pmv-dt-ag[data-k="prep"] { border-style: dashed; }
.pmv-dt-cd[data-k="prep"] .pmv-dt-n { color: var(--sky); }
.pmv-hz-item.prep .pmv-hz-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.pmv-hz-item.prep .pmv-hz-item-title { color: var(--sky); }

/* ---- the Roadmap's header: Playbooks and Print sit by Add project, quiet ---- */
.pm-pb-btn, .pm-print-btn { padding: 0 14px; }

/* ---- the Playbooks sheet ---- */
.panel.pm-pb { width: min(760px, calc(100vw - 32px)); }
.pm-pb-body { display: flex; flex-direction: column; gap: 14px; }
.pm-pb-intro { margin: 0; font-size: 14px; line-height: 20px; }
.pm-pb-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pm-pb-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pm-pb-row-text { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.pm-pb-row-text b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.pm-pb-row-text small { color: var(--muted); font-size: 13px; }
.pm-pb-empty { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pm-pb-btns { display: flex; justify-content: flex-end; gap: 10px; }
.pm-pb-form { display: flex; flex-direction: column; gap: 14px; }
.pm-pb-steps-label { margin-top: 4px; }
.pm-pb-steps { display: flex; flex-direction: column; gap: 10px; }
.pm-pb-step { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--r-md, 14px); }
.pm-pb-step-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.pm-pb-step-top b { color: var(--muted); font-size: var(--fs-cap, 11px); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.pm-pb-f { gap: 6px; min-width: 0; margin: 0; }
.pm-pb-f label { color: var(--muted); font-size: 13px; font-weight: 500; }
.pm-pb-f input, .pm-pb-f select { width: 100%; min-width: 0; height: 40px; font-size: 14px; }
.pm-pb-w1 { grid-column: span 1; }
.pm-pb-w2 { grid-column: span 2; }
.pm-pb-w3 { grid-column: span 3; }
.pm-pb-w4 { grid-column: span 4; }
#pm-pb-add-step { align-self: flex-start; }
@media (max-width: 760px) {
  .pm-pb-step { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .pm-pb-w3, .pm-pb-w4 { grid-column: 1 / -1; }
  .pm-pb-w1, .pm-pb-w2 { grid-column: span 1; }
  .pm-pb-f input, .pm-pb-f select { height: 44px; font-size: 16px; }
  .pm-pb-row .btn { min-height: 40px; }
  /* the action row sits at the bottom of the sheet, above the home bar */
  .pm-pb-btns { position: sticky; bottom: 0; z-index: 4; margin: 8px -16px calc(-24px - env(safe-area-inset-bottom, 0px)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
  .pm-pb-btns .btn { flex: 1; height: 48px; }
}

/* ---- Apply playbook… (the project popup's Tasks head, and the small dialog) ---- */
.pmv-rm-tasks-head .pm-pb-apply-btn { margin-left: auto; }
.panel.pm-pb-apply { width: min(520px, calc(100vw - 32px)); }
.pm-pb-apply-body { display: flex; flex-direction: column; gap: 14px; }
.pm-pb-apply-form { display: flex; flex-direction: column; gap: 14px; }
.pm-pb-apply-sub { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.pm-pb-apply-form select, .pm-pb-apply-form input { width: 100%; min-width: 0; }
.pm-pb-preview { max-height: 240px; margin: 0; padding: 0 0 0 20px; overflow-y: auto; font-size: 13px; line-height: 20px; }
.pm-pb-preview li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.pm-pb-preview li span { min-width: 0; overflow-wrap: anywhere; }
.pm-pb-preview li small { flex: none; color: var(--muted); font-size: 12px; }

/* light theme */
:where(html[data-theme="light"]) .pmv-dt-chip[data-k="prep"] { color: var(--sky); }
