/* Change requests. Colours come from the variables in styles.css, so dark mode follows. */
.pill.cr-Draft { color: var(--muted); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.pill.cr-In-Review { color: var(--work); background: var(--work-bg); }
.pill.cr-Approved { color: var(--accent); background: var(--accent-soft); }
.pill.cr-Implemented { color: var(--released); background: var(--released-bg); }
.pill.cr-Rejected { color: var(--danger-text); background: var(--obsolete-bg); }
.pill.cr-Cancelled { color: var(--obsolete); background: var(--obsolete-bg); text-decoration: line-through; }

.cr-row { cursor: pointer !important; }
.cr-row a { color: inherit; text-decoration: none; }
.cr-title { white-space: normal !important; }
.cr-step, .cr-when, .cr-hint { color: var(--muted); font-size: 12px; }
.cr-h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-h1 .cr-num { color: var(--muted); font-weight: 600; }
.cr-desc { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); white-space: pre-wrap; }
.cr-desc.none { color: var(--muted); }
.cr-note { color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* affected files */
.tablewrap.cr-flat { border: 0; border-radius: 0; box-shadow: none; }
.cr-action { width: auto; padding: 2px 8px; }
.cr-problem td { color: var(--warn); font-size: 12px; white-space: normal; padding-top: 0; }
.grid tbody tr.cr-problem:hover { background: none; }
.cr-pick { display: grid; gap: 2px; max-height: 240px; overflow: auto; }
.cr-pickrow { padding: 8px 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.cr-pickrow:hover { background: var(--row-hover); }
.cr-pickrow.sel { background: var(--row-sel); }
.cr-implist { margin: 0; padding-left: 20px; }

/* route */
.cr-stepblock { padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.cr-stepblock:last-child { margin-bottom: 0; }
.cr-stepblock:last-child { border-bottom: 0; }
.cr-stephd { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.cr-now { color: var(--work); background: var(--work-bg); border-radius: 2px; padding: 0 8px; }
.cr-appr { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 4px 0; }
.cr-dec { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.cr-dec.ok { color: var(--released); background: var(--released-bg); }
.cr-dec.no { color: var(--danger-text); background: var(--obsolete-bg); }
.cr-dec.wait { color: var(--muted); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.cr-routerows { display: grid; gap: 8px; }
.cr-routerow { display: grid; grid-template-columns: auto 64px 1fr auto; gap: 8px; align-items: center; }
.cr-stepnum { border: 1px solid var(--line); background: var(--panel); border-radius: 4px; padding: 8px 8px; width: 100%; }

/* comments */
.cr-comments { display: grid; gap: 12px; margin-bottom: 12px; }
.cr-comment { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.cr-text { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.cr-reply { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

/* item page card */
.cr-itemlist { display: grid; gap: 8px; }
.cr-itemrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; }

/* top-bar task count */
#changes-btn { position: relative; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.cr-badge { background: var(--danger); color: var(--on-strong); border-radius: 9px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.cr-badge[hidden] { display: none; }

@media (max-width: 760px) {
  .cr-routerow { grid-template-columns: 56px 1fr auto; }
  .cr-routerow > .cr-hint { display: none; }
}

/* Abstain, informed list, change-required note */
.cr-dec.abst { color: var(--muted); background: var(--panel-2); }
.cr-required td { color: var(--muted); font-size: 12px; white-space: normal; padding-top: 0; }
.grid tbody tr.cr-required:hover { background: none; }
.cr-informed { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-person { padding: 1px 8px; border-radius: 2px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.cr-checks { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.cr-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.cr-froze { margin-left: 8px; font-size: 11px; padding: 1px 8px; border-radius: 2px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.cr-hist { display: grid; gap: 4px; }
.cr-histtop { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cr-histdec { padding-left: 12px; font-size: 12px; }
.cr-rules { margin: 0; padding-left: 20px; color: var(--muted); }
.cr-problem .ic, .cr-note .ic { vertical-align: -3px; }
.cr-dec .ic { line-height: 0; }
