/* Checklists and the tasks on a ticket. Uses the variables and components of style.css. */

/* ---- the Checklists tab */
.hdc-about { margin: 0; }
.hdc-template .panel-head .grow { flex: 1; min-width: 0; }
.hdc-template .panel-head .sub { display: block; font-size: 12.5px; color: var(--muted); }
.hdc-steps { list-style: none; margin: 0; padding: 0; }
.hdc-step { display: flex; align-items: flex-start; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.hdc-step:last-child { border-bottom: 0; }
.hdc-step .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.hdc-step b { font-weight: 600; overflow-wrap: anywhere; }
.hdc-step .sub { font-size: 13px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.hdc-num { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--raised); color: var(--muted); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hdc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.hdc-tags .pill { gap: 5px; font-weight: 500; white-space: normal; }
.hdc-tags .pill .icon { width: 13px; height: 13px; }
.hdc-rowtools { flex: none; gap: 2px; }
.hdc-words code { padding: 1px 5px; border-radius: 5px; background: var(--raised); font-size: 12px; white-space: nowrap; }
.hdc-due { display: grid; grid-template-columns: auto 84px minmax(0, 1fr); align-items: center; gap: 10px; }
.hdc-duelabel { font-weight: 600; font-size: 13px; }
.hdc-due input, .hdc-due select { width: 100%; }

/* ---- on a ticket: the checklist, above the conversation */
.hdc-card { flex: 0 1 auto; max-height: 48%; min-height: 50px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.hdc-card[hidden] { display: none; }
.hdc-head { position: sticky; top: 0; z-index: 1; flex-wrap: wrap; gap: 8px 10px; padding: 10px 14px 10px 18px; background: var(--panel); border-radius: var(--radius) var(--radius) 0 0; }
.hdc-card > .hdc-head:last-child { border-bottom: 0; border-radius: var(--radius); }
.hdc-head h2 { font-size: 14px; }
.hdc-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hdc-count.ok { color: var(--ok); font-weight: 600; }
.hdc-bar { flex: 0 1 140px; min-width: 60px; height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.hdc-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ok); transition: width .25s; }
.hdc-head button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); }
.hdc-say { margin: 0; padding: 8px 18px 0; }
.hdc-list { list-style: none; margin: 0; padding: 4px 0; }
.hdc-task { display: flex; align-items: flex-start; gap: 12px; padding: 9px 14px 9px 18px; border-bottom: 1px solid var(--line); }
.hdc-task:last-child { border-bottom: 0; }
.hdc-what { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hdc-title { font-weight: 600; overflow-wrap: anywhere; }
.hdc-task.done .hdc-title, .hdc-task.skipped .hdc-title { font-weight: 500; color: var(--muted); }
.hdc-task.skipped .hdc-title { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.hdc-what .sub { font-size: 12.5px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.hdc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.hdc-meta .pill { font-size: 11.5px; padding: 1px 8px; }
.hdc-late { color: var(--warn); font-weight: 600; }
.hdc-note { font-style: italic; overflow-wrap: anywhere; }
.hdc-staff { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; vertical-align: 1px; }
.hdc-staff .icon { width: 12px; height: 12px; }
.hdc-tick { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; padding: 0; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--panel); color: var(--muted); }
button.hdc-tick:hover:not(:disabled) { border-color: var(--ok); background: var(--ok-soft); }
.hdc-tick.done { border-color: var(--ok); background: var(--ok); color: var(--panel); }
button.hdc-tick.done:hover:not(:disabled) { background: var(--ok); filter: brightness(1.1); }
.hdc-tick.skipped { border-color: var(--line-strong); background: var(--raised); }
.hdc-tick .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.hdc-tools { flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 46%; }
.hdc-go { white-space: nowrap; }
a.hdc-go { padding: 3px 9px; font-size: 12.5px; }
.hdc-go .icon { color: var(--accent); }
.hdc-devs { justify-content: flex-end; }
.hdc-skip { margin-top: 5px; }
.hdc-skip input { flex: 1 1 220px; min-width: 0; }
.hdc-add { display: grid; gap: 8px; padding: 12px 18px 14px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 var(--radius) var(--radius); }
.hdc-add input:not([type]) { flex: 1 1 240px; min-width: 0; }
.hdc-start { display: grid; gap: 10px; padding: 14px 18px 16px; }
.hdc-start p { margin: 0; }
.hdc-start input:not([type]) { flex: 1 1 200px; min-width: 0; }
.hdc-empty { padding: 14px 18px; }

/* ---- on a ticket: what was asked, beside the conversation */
.hdc-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.hdc-devline { display: block; }

@media (max-width: 1100px) {
  .hdc-card { max-height: none; overflow: visible; }
  .hdc-head { position: static; }
}
@media (max-width: 860px) {
  .hdc-task { flex-wrap: wrap; }
  .hdc-tools { max-width: none; flex: 1 1 100%; justify-content: flex-start; padding-left: 36px; }
  .hdc-step { flex-wrap: wrap; }
  .hdc-rowtools { flex: 1 1 100%; justify-content: flex-end; }
}
