/* Phase 3 · Decisions. A task can be a Decision: a small DECISION kicker over the question and
   its options as buttons (for whoever may decide) on the 40K card, the Board, Horizons and the
   phone; the options in the popup; a Decisions tab in Completed. Same tokens as the rest
   (emerald accent, muted greys); the light theme is covered at the end. */

/* ---- the kicker: small, emerald, spaced caps ---- */
.pm-dk { display: inline-block; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 16px; text-transform: uppercase; }

/* ---- options as buttons (one tap decides) or as plain text ---- */
.pm-dopts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pm-dopt { display: inline-flex; align-items: center; min-height: 28px; max-width: 100%; padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; line-height: 18px; text-align: left; overflow-wrap: anywhere; }
button.pm-dopt { cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
@media (hover: hover) { button.pm-dopt:hover { border-color: var(--accent); color: var(--accent); } }
button.pm-dopt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.pm-dopt:active { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.pm-dopt.ro { color: var(--muted); font-weight: 500; }
.pm-dopt.ro.muted { border-style: dashed; }

/* ---- decided: the chosen option and who decided ---- */
.pm-decided { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; min-width: 0; }
.pm-decided b { color: var(--accent); font-size: 13px; font-weight: 700; line-height: 18px; overflow-wrap: anywhere; }
.pm-decided small { color: var(--muted); font-size: 12px; line-height: 16px; }

/* ---- the 40K card ---- */
.pm-card.decision .pm-dk { margin: 2px 0 -2px; }
.pm-card.decision h4 { margin-top: 4px; }
.pm-card.decision .pm-dopts { margin-top: 10px; }

/* ---- the Board (daily slate): a block above the fields ---- */
.pmv-bd-dec { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.pmv-bd-dec .pm-dopts, .pmv-bd-dec .pm-decided { margin-top: 6px; }

/* ---- Horizons: the question opens it; the options sit under it ---- */
.pmv-hz-dec { flex-direction: row; }
.pmv-hz-dec .pmv-hz-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pmv-hz-dec-open { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pmv-hz-dec-open small { color: var(--muted); font-size: 12px; line-height: 16px; }
.pmv-hz-dec-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .pmv-hz-dec-open:hover .pmv-hz-item-title { color: var(--accent); } }
.pmv-hz-dec .pm-dopts { margin-top: 6px; }

/* ---- the popup: the options box at the top of Details ---- */
.pm-dbox { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pm-dbox .pm-flabel label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pm-dopt-rows { display: flex; flex-direction: column; gap: 6px; }
.pm-dopt-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pm-dopt-row input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-sm, 10px); background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.pm-dopt-row input::placeholder { color: var(--muted); }
@media (hover: hover) { .pm-dopt-row input:not(:disabled):hover { background: rgba(255, 255, 255, .05); border-color: var(--line); } }
.pm-dopt-row input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .04); }
.pm-dopt-row input:disabled { opacity: .85; }
.pm-dopt-row .pm-x { flex: none; }
.pm-dopt-go { flex: none; }
.pm-dec-add { align-self: flex-start; }
.pm-dec-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 16px; }
.pm-dec-result { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(52, 211, 153, .06); }
.pm-dec-result b { color: var(--accent); font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.pm-dec-result p { margin: 0; color: var(--text); font-size: 14px; line-height: 20px; }
.pm-dec-result small { color: var(--muted); font-size: 12px; line-height: 16px; }
.pm-dec-reopen { align-self: flex-start; }

/* ---- New task: Task | Decision, and the options under the note ---- */
.pm-kind { display: inline-flex; gap: 2px; margin-top: 12px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.pm-kind-btn { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.pm-kind-btn[aria-checked="true"] { background: var(--raised); color: var(--text); }
.pm-kind-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pm-add-options { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pm-add-options .pm-dopt-row input { height: 40px; border-color: var(--line); background: var(--bg); }
.pm-add-options .btn.small { align-self: flex-start; }

/* ---- Completed › Decisions ---- */
.pmv-dc-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-md, 14px); background: var(--surface); overflow: hidden; }
.pmv-dc-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.pmv-dc-row:first-child { border-top: 0; }
.pmv-dc-txt { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.pmv-dc-q { display: flex; flex-direction: column; gap: 1px; }
.pmv-dc-q b { font-size: 15px; line-height: 21px; overflow-wrap: anywhere; }
.pmv-dc-pick { color: var(--accent); font-size: 14px; font-weight: 700; line-height: 20px; overflow-wrap: anywhere; }
.pmv-dc-note { margin: 0; color: var(--text); font-size: 14px; line-height: 20px; }
.pmv-dc-txt small { color: var(--muted); font-size: 12px; line-height: 16px; }
.pmv-dc-row .btn { flex: none; }

/* ---- phone: 40px tap targets, options stacked full width ---- */
@media (max-width: 760px) {
  .pm-card.decision .pm-dopts, .pmv-bd-dec .pm-dopts, .pmv-hz-dec .pm-dopts { flex-direction: column; gap: 8px; }
  .pm-card.decision .pm-dopt, .pmv-bd-dec .pm-dopt, .pmv-hz-dec .pm-dopt { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .pm-kind-btn { height: 36px; padding: 0 18px; font-size: 14px; }
  .pm-dopt-row input { height: 44px; }
  .pm-dopt-go { min-height: 40px; }
  .pmv-dc-row { flex-wrap: wrap; }
  .pmv-dc-row .btn { height: 40px; }
}

/* ---- light theme ---- */
:where(html[data-theme="light"]) .pm-dopt { background: rgba(15, 23, 42, .03); }
:where(html[data-theme="light"]) .pmv-bd-dec { background: rgba(15, 23, 42, .02); }
:where(html[data-theme="light"]) .pm-dopt-row input:not(:disabled):hover, :where(html[data-theme="light"]) .pm-dopt-row input:focus { background: rgba(15, 23, 42, .04); }
:where(html[data-theme="light"]) .pm-dec-result { background: rgba(15, 159, 110, .06); }

/* ---- New task › More › Assignees: the same quiet look as the popup's fields (it had the
   browser's default button look on desktop; a Decision opens More, so it shows more often) ---- */
#pm-add-panel .pm-assignees { display: flex; align-items: center; gap: 8px; width: calc(100% + 8px); min-height: 36px; margin-left: -8px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-sm, 10px); background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
@media (hover: hover) { #pm-add-panel .pm-assignees:not(:disabled):hover { background: rgba(255, 255, 255, .05); } }
#pm-add-panel .pm-assignees:focus-visible, #pm-add-panel .pm-assign.open .pm-assignees { border-color: var(--accent); outline: none; }
#pm-add-panel .pm-assignees:disabled { opacity: .7; cursor: default; }
#pm-add-panel .pm-assign-empty { color: var(--muted); font-size: 0; } /* "+ Assign", as on the popup's tile */
#pm-add-panel .pm-assign-empty::before { content: "+ Assign"; font-size: 14px; }
:where(html[data-theme="light"]) #pm-add-panel .pm-assignees:not(:disabled):hover { background: rgba(15, 23, 42, .04); }
