/* u104-dg-map-ui — the DataGrows import "map the names" cards and the Clear test data page (.wdm-* and .wfr-* only). Cobalt Paper tokens. */

.wdm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wdm-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.wdm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; line-height: 1.3; cursor: pointer; }
.wdm-chip b { font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.wdm-chip:hover { border-color: var(--accent); }
.wdm-chip.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.wdm-chip.is-on b { color: #fff; }
.wdm-chip:focus-visible, .wdm-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wdm-q { flex: 0 1 240px; min-width: 160px; }

.wdm-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--accent-soft, rgba(37, 99, 235, 0.07)); position: sticky; top: 0; z-index: 3; }
.wdm-bulk[hidden] { display: none; }
.wdm-bulk b { font-variant-numeric: tabular-nums; }
.wdm-bulk-l { color: var(--ink-2, var(--text)); font-size: 13px; }
.wdm-bulk select { max-width: 280px; }

.wdm-scroll { max-height: 62vh; overflow: auto; }
.wdm-table { width: 100%; }
.wdm-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.wdm-table tr[hidden] { display: none; }
.wdm-table tr.is-ticked > td { background: var(--accent-soft, rgba(37, 99, 235, 0.07)); }
.wdm-c-tick { width: 36px; text-align: center; }
.wdm-c-tick input { width: 16px; height: 16px; cursor: pointer; }
.wdm-c-n { width: 64px; }
.wdm-c-sel { width: 300px; }
.wdm-c-sel select { width: 100%; }
.wdm-name { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.wdm-name .pill { font-weight: 400; margin-left: 4px; }
.wdm-note { margin-top: 2px; }
.wdm-why { font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.wdm-why .ti { font-size: 14px; vertical-align: -2px; color: var(--accent); }
.wdm-why.is-changed, .wdm-why.is-changed .ti { color: var(--amber-ink, var(--amber)); }
.wdm-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

@media (max-width: 760px) {
  .wdm-c-sel { width: 46%; }
  .wdm-c-n { width: 44px; }
  .wdm-q { flex-basis: 100%; }
  .wdm-bulk select { max-width: 100%; flex: 1 1 100%; }
}

/* Clear test data */
.wfr-list { display: grid; gap: 10px; }
.wfr-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.wfr-item.is-on { border-color: var(--accent); }
.wfr-item input[type="checkbox"] { width: 16px; height: 16px; margin-top: 3px; cursor: pointer; }
.wfr-item label { font-weight: 600; cursor: pointer; }
.wfr-item .wfr-n { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.wfr-item .wfr-d { grid-column: 2 / -1; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.wfr-users { width: 100%; }
.wfr-users td, .wfr-users th { vertical-align: middle; }
.wfr-keep { display: grid; gap: 4px; font-size: 13px; color: var(--ink-3); }
.wfr-keep .ti { color: var(--green); vertical-align: -2px; }
.wfr-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wfr-confirm input[type="text"] { width: 220px; text-transform: uppercase; }
.wfr-done { display: grid; gap: 6px; }

/* the set-up page on a phone: the page keeps to the screen and a wide table scrolls inside its own card */
@media (max-width: 900px) {
  #view-work .w3-setup-grid { grid-template-columns: minmax(0, 1fr); }
  #view-work .w3-setup-grid > .w3-main { min-width: 0; }
  #view-work .w3-setup-grid .w3-card-b.is-flush { overflow-x: auto; }
  .wdm-c-tick { width: 30px; }
  .wfr-item { grid-template-columns: 22px 1fr; }
  .wfr-item .wfr-n { grid-column: 2; }
  .wfr-confirm input[type="text"] { width: 100%; }
}

/* the mapping cards on a phone: one name per block, the choice underneath */
@media (max-width: 760px) {
  .wdm-table, .wdm-table tbody { display: block; width: 100%; }
  .wdm-table thead th:not(.wdm-c-tick) { display: none; }
  .wdm-table thead, .wdm-table thead tr { display: block; }
  .wdm-table thead th.wdm-c-tick { display: block; width: auto; text-align: left; padding-left: 14px; }
  .wdm-t-prog thead { display: none; }
  .wdm-table tbody tr { display: grid; grid-template-columns: 30px minmax(0, 1fr); padding: 8px 12px 10px 4px; border-bottom: 1px solid var(--border); }
  .wdm-table tbody tr[hidden] { display: none; }
  .wdm-table tbody td { display: block; border: 0; padding: 2px 0; width: auto; text-align: left; }
  .wdm-t-types tbody td.wdm-c-n { display: none; }
  .wdm-t-types tbody td.wdm-c-sel { grid-column: 2; padding-top: 6px; }
  .wdm-t-prog tbody tr { grid-template-columns: minmax(0, 1fr); padding-left: 14px; }
  .wdm-t-prog tbody td.wdm-c-n { display: none; }
  .wdm-t-prog tbody td.wdm-c-type { color: var(--ink-3); font-size: 13px; }
  .wdm-t-prog tbody td.wdm-c-sel { padding-top: 6px; }
}
