/* apm_table_html — the table card's own rules.
 *
 * The form root is the .px-grid-card div itself, with one private class,
 * .apm-table-card, for its own sizing: the root rule is BARE, because the root is its subject
 * and because --px-grid-cols must land on the element theme/assets/theme.css
 * reads it from. min-height: 0 is not repeated here; theme.css already
 * declares it on .px-grid-card.
 *
 * Every other rule is scoped :where(.apm-table-card), which adds no specificity
 * and so cannot change which rule wins. The two input rules keep their type
 * selector, so .apm-td-priority input[type="number"] stays (0,1,1) and still
 * beats the dependency's .px-input { width: 100% } at (0,1,0) on specificity
 * rather than on document order.
 *
 * The Last Attempted / Last Completed rule is written doubled,
 * .px-grid-td.apm-td-attempted / .px-grid-td.apm-td-completed, at (0,2,0). Rows
 * are rendered as <div class="px-grid-td apm-td-*">, and theme.css declares
 * font-family, font-size and color on .px-grid-td at (0,1,0) -- the same three
 * properties this rule sets. Undoubled it would tie and be decided by head-link
 * order, which the estate records as unverified. No other
 * rule here collides: theme.css declares nothing else on .px-grid-td that this
 * file also sets (min-width at :561, padding and word-break at :565, and the
 * .px-grid-card--stack ::before block, which has a different subject).
 *
 * No .themed-scrollbar rule and no .px-grid-* rule of this
 * form's own: those names are the dependency's and this app's theme.css.
 *
 * No designer gate: the one hiding rule here targets .px-grid-row, and rows are
 * rendered from server data at runtime, so the designer canvas has none.
 */

.apm-table-card {
  flex: 1;
  --px-grid-cols: minmax(0, 2fr) 140px 150px 150px 90px 90px;
}

:where(.apm-table-card) .apm-td-name { font-weight: 500; }

:where(.apm-table-card) .px-grid-td.apm-td-attempted,
:where(.apm-table-card) .px-grid-td.apm-td-completed {
  font-family: var(--px-mono);
  font-size: 12px;
  color: var(--px-text-muted);
}

:where(.apm-table-card) .apm-td-pmr { text-align: center; }

:where(.apm-table-card) .apm-td-pmr input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

:where(.apm-table-card) .apm-td-priority { text-align: center; }

:where(.apm-table-card) .apm-td-priority input[type="number"] {
  width: 60px;
  text-align: center;
}

:where(.apm-table-card) .apm-td-date input[type="date"] { width: 130px; }

:where(.apm-table-card) .px-grid-row[data-pmr="false"] .apm-td-priority input { display: none; }

@media (max-width: 768px) {
  :where(.apm-table-card) .apm-td-pmr { text-align: left; }
  :where(.apm-table-card) .apm-td-priority { text-align: left; }
  :where(.apm-table-card) .apm-td-date input[type="date"] { width: 100%; }
  :where(.apm-table-card) .apm-td-priority input[type="number"] { width: 80px; }
}
