/* Makrom táblatérkép v2 — a Cesium-jelenet fölötti, visszafogott vezérlőréteg. A credit-sáv (Google-logó) mindig legfelül, nem takarjuk. */
/* A magasságot a befoglaló .terrain-host adja (oldal-elrendezés); önállóan legalább 300 px. */
.terrain-view { position: relative; width: 100%; height: 100%; min-height: 300px; overflow: hidden; isolation: isolate; background: #d7dfda; border: 1px solid #d3ddd5; border-radius: 18px; color: #1f3a2c; }
.terrain-engine, .terrain-engine .cesium-widget, .terrain-fallback-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.terrain-engine .cesium-widget canvas { outline: none; }
/* Beágyazott érintőképernyős mód: a lap görgethető a térkép fölött is (a Cesium a .cesium-widget-re is touch-action: none-t tesz, ami a gyerekre is hat). */
.terrain-view.is-cooperative .terrain-engine .cesium-widget, .terrain-view.is-cooperative .terrain-engine .cesium-widget canvas { touch-action: pan-x pan-y !important; }
.terrain-view.is-cooperative .terrain-engine .cesium-widget canvas { pointer-events: none; }
.terrain-view .cesium-widget-credits { z-index: 6; padding: 3px 8px 4px; font-size: 10px; line-height: 1.35; }
.terrain-view .cesium-credit-lightbox-overlay { z-index: 20; }
.terrain-view button { min-height: 32px; border: 0; font-family: inherit; cursor: pointer; }
.terrain-view button:focus-visible, .terrain-view select:focus-visible, .terrain-view summary:focus-visible { outline: 3px solid #54806a; outline-offset: 2px; }
.terrain-top { position: absolute; z-index: 3; top: 14px; left: 14px; right: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; pointer-events: none; }
.terrain-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; max-width: calc(100% - 120px); }
.terrain-stack > *, .terrain-modes { pointer-events: auto; }
.terrain-badge { padding: 6px 10px; border-radius: 7px; background: #ffffffe6; font-size: 11px; font-weight: 650; letter-spacing: .01em; box-shadow: 0 2px 10px #10251a1f; }
.terrain-row { display: flex; flex-wrap: wrap; gap: 6px; }
.terrain-row select { max-width: 230px; min-height: 32px; padding: 5px 26px 5px 10px; border: 1px solid #ffffffb3; border-radius: 7px; background: #ffffffeb; color: #2e4a39; font: inherit; font-size: 11px; box-shadow: 0 2px 10px #10251a1f; }
.terrain-view .terrain-pill { padding: 6px 11px; border-radius: 7px; background: #ffffffeb; color: #234634; font-size: 11px; font-weight: 650; white-space: nowrap; box-shadow: 0 2px 10px #10251a1f; }
.terrain-view .terrain-pill:hover { background: #fff; }
.terrain-view .terrain-expand[aria-pressed="true"] { background: #1d4a36; color: #fff; }
.terrain-notice { margin: 0; max-width: 420px; padding: 6px 10px; border-radius: 7px; background: #fff6dcf2; color: #5a4512; font-size: 11px; line-height: 1.35; box-shadow: 0 2px 10px #10251a1f; }
.terrain-notice[data-tone="info"] { background: #ffffffeb; color: #33503f; }
.terrain-notice[hidden] { display: none; }
.terrain-modes { display: flex; padding: 3px; gap: 3px; background: #ffffffeb; border-radius: 9px; box-shadow: 0 2px 12px #10251a24; }
.terrain-modes button { min-width: 42px; padding: 5px 12px; border-radius: 6px; color: #557061; background: transparent; font-size: 12px; font-weight: 700; }
.terrain-modes button[aria-pressed="true"] { color: #fff; background: #1d4a36; }
.terrain-controls { position: absolute; z-index: 3; right: 14px; top: 62px; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 9px; background: #ffffffeb; box-shadow: 0 3px 14px #10251a24; }
.terrain-controls button { width: 32px; height: 32px; min-height: 32px; border-radius: 6px; background: transparent; color: #284b37; font-size: 19px; line-height: 1; }
.terrain-controls button:hover { background: #edf3ee; }
.terrain-controls button[hidden] { display: none; }
.terrain-view .terrain-compass { display: grid; place-items: center; gap: 0; font-size: 8px; font-weight: 800; }
.terrain-compass i { display: block; font-size: 15px; font-style: normal; line-height: 1; color: #b0442f; }
.terrain-detail { position: absolute; z-index: 4; left: 14px; bottom: 34px; width: min(360px, calc(100% - 28px)); padding: 12px 38px 12px 14px; border-radius: 11px; background: #fffffff5; box-shadow: 0 6px 28px #10251a33; }
.terrain-detail[hidden] { display: none; }
.terrain-detail strong, .terrain-detail > span { display: block; }
.terrain-detail strong { margin-bottom: 2px; font-size: 13px; color: #1d3a2b; }
.terrain-detail > span { font-size: 11px; color: #4b6152; }
.terrain-detail .terrain-detail-meta { margin-top: 4px; font-size: 10px; color: #6f7d72; }
.terrain-view .terrain-detail-close { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; min-height: 28px; background: transparent; color: #5f7366; font-size: 20px; }
.terrain-view .terrain-fit-button { display: inline-block; margin-top: 8px; padding: 6px 10px; min-height: 30px; background: #edf3ee; border: 1px solid #d6e2d8; border-radius: 6px; color: #284b37; font-size: 11px; font-weight: 650; }
.terrain-legend { position: absolute; z-index: 3; right: 14px; bottom: 34px; max-width: min(46%, 380px); padding: 8px 11px; border-radius: 10px; background: #ffffffe8; box-shadow: 0 3px 14px #10251a24; font-size: 10px; color: #3d5546; }
.terrain-legend summary { cursor: pointer; font-weight: 700; font-size: 11px; color: #284b37; }
.terrain-legend-list { display: flex; flex-wrap: wrap; gap: 3px 11px; margin-top: 6px; }
.terrain-legend-list > span { display: inline-flex; align-items: center; gap: 5px; }
.terrain-legend-list i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1px solid #2a3e3240; }
.terrain-footnote, .terrain-help { margin: 6px 0 0; font-size: 9.5px; color: #627568; }
.terrain-help { margin-top: 2px; }
.terrain-hint { position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 9px 13px; border-radius: 8px; background: #14201ad0; color: #fff; font-size: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.terrain-hint.is-visible { opacity: 1; }
.terrain-fallback-svg { background: #6f7d70; }
.terrain-fallback-svg path { fill-opacity: .66; stroke: #fffbea; stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; }
.terrain-fallback-svg path.is-selected { fill-opacity: .9; stroke: #ffc93c; stroke-width: 3; }
.terrain-view.is-expanded { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
html.terrain-scroll-lock, html.terrain-scroll-lock body { overflow: hidden; }
.terrain-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.terrain-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; background: radial-gradient(ellipse at 50% 40%, #f6f9f3, #e7eee4); }
.terrain-empty-icon { font-size: 56px; line-height: 1; color: #90a68e; margin-bottom: 18px; }
.terrain-empty strong { font-size: 17px; color: #3b5a41; }
.terrain-empty p { max-width: 320px; margin: 10px 0 0; font-size: 12px; color: #758474; }
@media (max-width: 700px) {
  .terrain-view { min-height: 280px; border-radius: 12px; }
  .terrain-badge { display: none; }
  .terrain-top { top: 10px; left: 10px; right: 10px; gap: 6px; }
  .terrain-stack { max-width: calc(100% - 96px); gap: 6px; }
  .terrain-badge { font-size: 10px; padding: 5px 8px; }
  .terrain-row select { max-width: 150px; }
  .terrain-view .terrain-pill { padding: 6px 9px; font-size: 10.5px; }
  .terrain-modes button { min-width: 36px; padding: 5px 9px; }
  .terrain-controls { right: 10px; top: 54px; }
  .terrain-detail { left: 10px; bottom: 40px; width: calc(100% - 20px); }
  .terrain-legend { right: 10px; bottom: 40px; max-width: calc(100% - 20px); }
  .terrain-legend:not([open]) { padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { .terrain-view * { transition: none !important; } }

/* Jelmagyarázat-szűrő (2026-10-08): a tételek gombok; a kiválasztott sötétzöld. */
.terrain-legend-list { gap: 5px; max-height: min(46vh, 300px); overflow-y: auto; overscroll-behavior: contain; }
.terrain-legend-all, .terrain-legend-item { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; margin: 0; padding: 4px 10px 4px 8px; border: 1px solid #2a3e3226; border-radius: 999px; background: #fff; color: #1e3328; font-size: 11px; line-height: 1.2; cursor: pointer; }
.terrain-legend-all { margin: 7px 0 2px; font-weight: 650; }
.terrain-legend-item:hover, .terrain-legend-all:hover { border-color: #2f523b80; }
.terrain-legend-item[aria-pressed="true"], .terrain-legend-all[aria-pressed="true"] { background: #2f523b; border-color: #2f523b; color: #fff; }
.terrain-legend-meta { color: #5d6b62; font-variant-numeric: tabular-nums; white-space: nowrap; }
.terrain-legend-item[aria-pressed="true"] .terrain-legend-meta { color: #dbe8cf; }
.terrain-legend-item i { flex: none; }
.terrain-fallback-svg path.is-hidden { display: none; }
@media (pointer: coarse) { .terrain-legend-all, .terrain-legend-item { min-height: 36px; } }

/* Áttekintés (B kör): címke-tűk (táblánként „Gép · Munkatípus”, állapot-pötty) és állapot-jelmagyarázat. A hely tábla-szintű, nem GPS. */
.terrain-pins { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.terrain-pin { position: absolute; left: 0; top: 0; --stem: 22px; --pin: #8fa79a; }
.terrain-pin[hidden] { display: none; }
.terrain-pin.is-working { --pin: #2f7d3b; } .terrain-pin.is-paused { --pin: #e1a72d; } .terrain-pin.is-late { --pin: #b47824; } .terrain-pin.is-planned { --pin: #a8cc4d; } .terrain-pin.is-stale { --pin: #8f968f; }
.terrain-view .terrain-pin-foot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; min-height: 14px; padding: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--pin), 0 1px 4px #0006; pointer-events: auto; }
.terrain-pin.is-mini .terrain-pin-card, .terrain-pin.is-mini .terrain-pin-stem { display: none; }
.terrain-view .terrain-pin.is-mini .terrain-pin-foot { left: -8px; top: -8px; width: 16px; height: 16px; min-height: 16px; background: var(--pin); box-shadow: 0 0 0 3px #fff, 0 1px 5px #0007; }
.terrain-pin-stem { position: absolute; left: -1px; top: calc(-1 * var(--stem)); width: 2px; height: var(--stem); background: #fff; box-shadow: 0 0 2px #0006; }
.terrain-pin-card { position: absolute; left: 0; bottom: var(--stem); display: grid; gap: 0; min-width: 0; max-width: 240px; padding: 4px 5px 5px; border-radius: 9px; background: #fff; box-shadow: 0 4px 16px #0b1a1238, 0 0 0 1px #0b1a1214; transform: translateX(calc(-50% + var(--dx, 0px))); pointer-events: auto; }
.terrain-view .terrain-pin-line { display: flex; align-items: center; gap: 7px; min-height: 24px; padding: 1px 6px; border-radius: 6px; background: transparent; color: #0b1a12; font-size: 12.5px; font-weight: 700; line-height: 1.2; text-align: left; white-space: nowrap; }
.terrain-view .terrain-pin-line:hover { background: #f1f4ec; }
.terrain-pin-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #8fa79a; }
.terrain-pin-line.is-working .terrain-pin-dot, .terrain-status-dot.is-working { background: #2f7d3b; } .terrain-pin-line.is-paused .terrain-pin-dot, .terrain-status-dot.is-paused { background: #e1a72d; }
.terrain-pin-line.is-late .terrain-pin-dot, .terrain-status-dot.is-late { background: #b47824; } .terrain-pin-line.is-planned .terrain-pin-dot, .terrain-status-dot.is-planned { background: #a8cc4d; }
.terrain-pin-line.is-stale .terrain-pin-dot { background: #8f968f; } .terrain-status-dot.is-done { background: #8fa79a; }
.terrain-pin-text { overflow: hidden; text-overflow: ellipsis; }
.terrain-pin-field, .terrain-pin-more { padding: 0 6px; color: #5f6661; font-size: 11px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terrain-legend.is-status { left: 12px; right: auto; bottom: 12px; max-width: calc(100% - 24px); padding: 6px 10px; }
.terrain-legend.is-status > summary { display: none; }
.terrain-legend.is-status .terrain-legend-list { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 0; }
.terrain-legend.is-status .terrain-footnote { margin: 3px 0 0; }
.terrain-view.is-compact .terrain-stack { gap: 6px; }
.terrain-status-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #2f4538; }
.terrain-status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.terrain-fallback-svg path.is-dim { opacity: .28; }
@media (max-width: 700px) { .terrain-pin-card { min-width: 0; max-width: 190px; } .terrain-view .terrain-pin-line { font-size: 11.5px; min-height: 24px; } .terrain-pin-field { display: none; } }
