/* theHunter: Call of the Wild maps (assets/js/thehunter-map.js): the Need zones block on the rail, the zone canvas, the
   reserve switcher and the zone card's bits. Everything else is the shared map look (map-app.css, sotf-map.css, map-rail.css).
   Tokens only, so the silver theme follows; the three need colours are data (the game's own green / blue / orange). */

/* the zone canvas: a pixel per 32 m cell, stretched over the reserve, kept square at every zoom */
.th-zone-canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
@supports (image-rendering: pixelated) { .th-zone-canvas { image-rendering: pixelated; } }

/* a need's colour as a square: the rail's toggles, the day strip's key, the zone card's icon */
.th-swatch { display: inline-block; flex: 0 0 auto; width: var(--s, 16px); height: var(--s, 16px); box-sizing: border-box;
  background: color-mix(in srgb, var(--c) 70%, transparent); border: 1.5px solid var(--c); border-radius: 2px; vertical-align: middle; }
.oly-card-icon .th-swatch { border-width: 2px; }

/* the reserve switcher, under the rail's title */
.th-reserve { margin-top: 0.5rem; }
.th-reserve-pick { width: 100%; box-sizing: border-box; background: var(--bg-card); border: 1px solid var(--blue-border); border-radius: 8px;
  color: var(--text); font: 700 0.84rem 'Urbanist', sans-serif; padding: 0.42rem 0.45rem; cursor: pointer; }
.th-reserve-pick:focus { outline: none; border-color: var(--map-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--map-accent) 20%, transparent); }

/* ── the Need zones block ── */
.th-zones-block { display: flex; flex-direction: column; gap: 0.5rem; }
.th-zones-block > .sotf-label { margin-bottom: 0; }
.th-tip { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; margin-left: 0.25em; border: 1px solid var(--blue-border); border-radius: 50%;
  font: 700 0.62rem/1 'Manrope', sans-serif; font-style: normal; color: var(--blue); cursor: help; vertical-align: 1px; }
.th-species { width: 100%; box-sizing: border-box; background: var(--bg-card); border: 1px solid var(--blue-border); border-radius: 8px;
  color: var(--text); font: 700 0.86rem 'Urbanist', sans-serif; padding: 0.45rem 0.45rem; cursor: pointer; }
.th-species:focus { outline: none; border-color: var(--map-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--map-accent) 20%, transparent); }
/* "Same need zones as …": species that share their need zones in the game */
.th-same { margin: 0; overflow-wrap: anywhere; }
.th-same:empty { display: none; }
.th-needs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; }
.th-need { position: relative; display: flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 0; min-height: 28px; box-sizing: border-box;
  padding: 0.15rem 0.3rem; cursor: pointer; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px;
  font: 600 0.75rem/1.2 'Urbanist', sans-serif; color: var(--text-muted); }
.th-need span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-need input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.th-need:has(input:checked) { border-color: var(--orange-border); background: var(--orange-dim); color: var(--text); }
.th-need:not(:has(input:checked)) .th-swatch { opacity: 0.35; }
.th-need:focus-within { outline: 2px solid var(--orange-ink); outline-offset: 1px; }
.th-need.is-none { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }

/* the species' day: an hour a cell, coloured by what it does then; a click picks that hour, a second click all day */
.th-day { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 1px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface); }
.th-hr { height: 16px; min-width: 0; padding: 0; margin: 0; border: 0; border-radius: 1px; cursor: pointer; background: color-mix(in srgb, var(--c) 75%, transparent); }
.th-hr.is-off { background: color-mix(in srgb, var(--c) 22%, transparent); }
.th-hr:hover { outline: 1px solid var(--text); outline-offset: 0; }
.th-hr.is-on { outline: 2px solid var(--text); outline-offset: 0; position: relative; z-index: 1; }
.th-hour { display: flex; align-items: center; gap: 0.5rem; font: 500 0.78rem/1.3 'Urbanist', sans-serif; color: var(--text-muted); }
.th-hour-t { flex: 0 0 6.6em; white-space: nowrap; }
.th-hour b { color: var(--text); font-variant-numeric: tabular-nums; }
.th-hour input { flex: 1 1 auto; min-width: 0; accent-color: var(--map-accent); margin: 0; }

/* your save */
.th-save { display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.45rem; border-top: 1px solid var(--border); }
.th-save-btn { align-self: stretch; background: var(--orange-dim); border: 1px solid var(--orange-border); border-radius: 8px; color: var(--text);
  font: 700 0.8rem 'Manrope', sans-serif; padding: 0.45rem 0.6rem; cursor: pointer; }
.th-save-btn:hover { border-color: var(--map-accent); color: var(--map-accent); }
.th-save-acts { display: flex; gap: 0.35rem; }
.th-save-acts .th-save-btn { flex: 1 1 0; min-width: 0; font-size: 0.74rem; padding: 0.35rem 0.4rem; background: var(--bg-card); border-color: var(--blue-border); }
.th-save-on { margin: 0; font: 500 0.8rem/1.35 'Urbanist', sans-serif; color: var(--text-muted); }
.th-save-on b { color: var(--text); }
.th-save-msg { margin: 0; overflow-wrap: anywhere; }
.th-save-msg:empty { display: none; }
.th-save-msg code { font-size: 0.92em; }

/* the zone card: a zone that shares the cell */
.th-also { display: flex; align-items: center; gap: 0.4rem; width: 100%; margin-top: 0.35rem; padding: 0.3rem 0.45rem; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(59, 227, 255, 0.35); border-radius: 0; color: #e6edf3; font: 600 0.78rem 'Urbanist', sans-serif; }
.th-also:hover { border-color: #3be3ff; color: #3be3ff; }

/* ── the game's own names (thehunter-map.js § THE GAME'S OWN NAMES): a find row with a second line, the card's local line.
   A long name wraps inside its row or card (a German compound, a Russian outpost): never wider than the box ── */
.sotf-hit.th-hit-l { align-items: flex-start; }
.sotf-hit.th-hit-l > i, .sotf-hit.th-hit-l > .th-swatch { margin-top: 0.2rem; flex: 0 0 auto; }
.sotf-hit .th-hit-n { margin-left: 0; padding-left: 0; flex: 1 1 60%; min-width: 0; font-size: inherit; color: inherit; white-space: normal; overflow-wrap: anywhere; }
.sotf-hit .th-hit-n small { display: block; margin-top: 0.08rem; font: 500 0.76rem/1.3 'Urbanist', sans-serif; color: var(--text-muted); overflow-wrap: anywhere; }
.sotf-hit.th-hit-l .th-hit-s { flex: 0 1 40%; min-width: 0; white-space: normal; text-align: right; overflow-wrap: anywhere; }
.oly-card-sub.th-card-ln { color: #dbe4ee; font-weight: 600; overflow-wrap: anywhere; }
