/* TaTasque — Colour by on the Map (public/mapcolour/mapcolour.js). Prefix .thc-. App tokens only. Copyright Rapid Surveys Pty Ltd. */
.thmc-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; border:1px solid rgba(27,36,48,.45); box-sizing:border-box; flex:none; }
.thc-panel { position:absolute; left:56px; top:56px; z-index:1100; width:min(300px, calc(100% - 72px)); box-sizing:border-box; padding:12px; background:var(--card, #fff); color:var(--ink, #111);
  border:1px solid var(--line, #d1d5db); border-radius:12px; box-shadow:0 4px 16px rgba(20,28,40,.18); font-size:14px; }
.thc-panel[hidden], .thc-legend[hidden], .thmc-key[hidden] { display:none; }
.thc-h { margin:0 0 8px; font-size:15px; }
.thc-l { display:block; margin:8px 0 4px; font-weight:600; }
.thc-panel select { width:100%; min-height:40px; }
.thc-panel input[type=range] { width:100%; min-height:32px; }
.thc-chk { display:flex; gap:8px; align-items:center; margin:8px 0; min-height:36px; }
.thc-sc { border:0; margin:8px 0 0; padding:0; }
.thc-sc legend { font-weight:600; padding:0; margin-bottom:2px; }
.thc-sc label { display:flex; gap:8px; align-items:center; min-height:34px; }
.thc-msg { margin:6px 0 0; color:var(--err, #d23f3f); }
.thc-act { display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; margin-top:10px; }
.thc-act button { min-height:40px; padding:0 12px; border-radius:8px; border:1px solid var(--line, #d1d5db); background:var(--card, #fff); color:var(--ink, #111); font-weight:600; font-size:14px; cursor:pointer; }
.thc-act .thc-save { background:var(--accent, #2563eb); color:var(--accent-ink, #fff); border-color:var(--accent, #2563eb); }
.thc-act .linkbtn { border:0; text-decoration:underline; padding:0 4px; }
.thc-panel button:focus-visible, .thmc-key:focus-visible, .thc-panel select:focus-visible, .thc-panel input:focus-visible { outline:2px solid var(--accent, #2563eb); outline-offset:2px; }
.thc-legend { position:relative; z-index:1000; max-width:min(260px, calc(100% - 80px)); overflow:auto; box-sizing:border-box; padding:8px 10px; background:var(--card, #fff); color:var(--ink, #111);
  border:1px solid var(--line, #d1d5db); border-radius:10px; box-shadow:0 2px 10px rgba(20,28,40,.16); font-size:13px; }
.thc-lh { margin:0 0 4px; font-weight:700; }
.thc-legend ul { list-style:none; margin:0; padding:0; }
.thc-legend li { display:flex; align-items:center; gap:8px; min-height:24px; }
.thc-sw { width:14px; height:14px; border-radius:3px; border:1px solid rgba(27,36,48,.45); flex:none; box-sizing:border-box; }
.thc-lt { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thc-n { color:var(--muted, #6b7280); font-variant-numeric:tabular-nums; }
.thmc-key { display:none; position:absolute; left:10px; bottom:30px; z-index:1001; min-height:40px; padding:0 14px; border-radius:20px; border:1px solid var(--line, #d1d5db); background:var(--card, #fff); color:var(--ink, #111); font-weight:600; font-size:14px; cursor:pointer; box-shadow:0 2px 10px rgba(20,28,40,.16); }
@media (max-width: 767px) {
  .thc-legend { display:none; }
  .leaflet-container.thc-keyopen .thc-legend { display:block; }
  .thc-panel { left:10px; right:10px; top:56px; width:auto; }
}
/* the app's global label / input / button rules stretch these: pin them (a tick or radio sits left of its words; Key is a small pill) */
.thc-panel label.thc-chk, .thc-panel .thc-sc label { display:flex; flex-direction:row; justify-content:flex-start; align-items:center; gap:8px; text-align:left; width:auto; font-weight:400; color:var(--ink, #111); }
.thc-panel input[type=checkbox], .thc-panel input[type=radio] { flex:none; width:20px; height:20px; min-height:0; margin:0; }
.thc-panel .thc-l { font-weight:600; }
.thc-panel input[type=range] { margin:0; padding:0; height:32px; }
.thmc-key { width:auto; right:auto; }
.thmc-key, .thmc-key[hidden] { display:none !important; }   /* no pill on the Map: a phone opens the legend from the Colour key tool (the Tools row) */
/* a computer: the Colour key tool switches the key on and off (the key shows itself until closed) */
/* Pins: size (one variable on the map scales each pin's picture from its tip; the marker box, the tap target, keeps its size) and Hide pins */
.leaflet-container .task-pin > svg { transform:scale(var(--thc-pin, 1)); transform-origin:50% 100%; }
.leaflet-container.thc-nopins .task-pin { display:none; }
.thc-panel { max-height:calc(100% - 72px); overflow:auto; }
.thc-pins { border:0; margin:8px 0 0; padding:0; }
.thc-pins legend { font-weight:600; padding:0; margin-bottom:2px; }
.thc-size { display:flex; align-items:center; gap:8px; min-height:44px; }
.thc-size .thc-l { margin:0; flex:1 1 auto; }
.thc-size output { min-width:3.2em; text-align:center; font-variant-numeric:tabular-nums; }
.thc-panel .thc-step { width:44px; height:44px; min-height:44px; padding:0; flex:none; border:1px solid var(--line, #d1d5db); border-radius:8px; background:var(--card, #fff); color:var(--ink, #111); font:700 20px/1 system-ui, sans-serif; cursor:pointer; }
.thc-panel .thc-step:disabled { opacity:.4; cursor:default; }
.thmc-note { margin:2px 0 0; color:var(--muted, #6b7280); font-size:13px; }
.thmc-note[hidden] { display:none; }

.thc-legend { order:1; }
.thc-lhd { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 4px; }
.thc-lhd .thc-lh { margin:0; }
.thc-legend { position:relative; }
