/* Update 92: the Template map at the top of the WhatsApp page (wa-template-map.js). Colours come from the theme tokens, so it follows light and dark mode. */
.wtm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; }
.wtm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wtm-head h3 { margin: 0; }
.wtm-lead { margin: 6px 0 4px; }
#wtm-checked { margin: 4px 0 8px; }
.wtm-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.wtm-chip { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.wtm-ok { background: color-mix(in srgb, var(--metric-green, #2f8a4c) 14%, transparent); border-color: color-mix(in srgb, var(--metric-green, #2f8a4c) 40%, transparent); color: var(--metric-green, #2f8a4c); }
.wtm-bad { background: color-mix(in srgb, var(--metric-danger, #c62828) 12%, transparent); border-color: color-mix(in srgb, var(--metric-danger, #c62828) 45%, transparent); color: var(--metric-danger, #c62828); }
.wtm-off { color: var(--muted); }
.wtm-red { color: var(--metric-danger, #c62828); }
.wtm-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wtm-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.wtm-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wtm-table td { text-align: left; vertical-align: top; padding: 9px 8px; border-bottom: 1px solid var(--line); color: var(--ink); }
.wtm-table tr.wtm-problem > td:first-child { box-shadow: inset 3px 0 0 var(--metric-danger, #c62828); }
.wtm-name { font-size: .82rem; overflow-wrap: anywhere; }   /* breaks after an underscore first (<wbr> in the name) */
.wtm-about { color: var(--muted); font-size: .8rem; margin: 2px 0 6px; max-width: 34ch; }
.wtm-notes { margin: 6px 0 0; padding-left: 16px; font-size: .8rem; color: var(--muted); max-width: 46ch; }
.wtm-problem .wtm-notes li:first-child { color: var(--metric-danger, #c62828); }
.wtm-words-btn { margin-top: 2px; }
.wtm-words > td { background: var(--surface-2); }
.wtm-bubble { max-width: 620px; margin-bottom: 6px; }
.wtm-words .wa-actions { max-width: 320px; margin-top: 8px; }
.wtm-fold { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.wtm-fold > summary { cursor: pointer; font-weight: 600; font-size: .88rem; padding: 4px 0; }
.wtm-fold[open] > summary { margin-bottom: 6px; }
/* Phone: each template becomes a small card, with the column name in front of each line */
@media (max-width: 760px) {
  .wtm-card { padding: 14px 12px; }
  .wtm-table thead { display: none; }
  .wtm-table, .wtm-table tbody, .wtm-table tr, .wtm-table td { display: block; width: 100%; }
  .wtm-table tr.wtm-row { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .wtm-table tr.wtm-row > td { border: 0; padding: 3px 2px; }
  .wtm-table tr.wtm-row > td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; font-size: .76rem; }
  .wtm-table tr.wtm-problem > td:first-child { box-shadow: none; }
  .wtm-table tr.wtm-problem { box-shadow: inset 3px 0 0 var(--metric-danger, #c62828); padding-left: 8px; }
  .wtm-table tr.wtm-words > td { border: 0; padding: 8px; border-radius: 10px; }
  .wtm-about, .wtm-notes { max-width: none; }
}
