/* HGIS Artland - viewer (binnen de iframe). Alles plat in de plugin-root. */
html, body { margin: 0; height: 100%; overflow: hidden; background: #f4f1ea; }
#hgis-maps, #hgis-scan { position: absolute; inset: 0; }
#hgis-maps { display: flex; }
.hgis-mapbox { position: relative; flex: 1 1 0; min-width: 0; height: 100%; }
#mapRight { border-left: 3px solid #fff; box-shadow: -1px 0 3px rgba(0,0,0,.35); }
.is-off { visibility: hidden; pointer-events: none; }
[hidden] { display: none !important; }

/* Statusmelding (onderaan, boven de schaalbalk) */
#hgis-status { position: absolute; z-index: 4; left: 10px; bottom: 34px; max-width: calc(100% - 20px); padding: 6px 10px; border-radius: 6px; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(0,0,0,.3); font: 13px/1.4 system-ui, sans-serif; color: #222; }
#hgis-status.is-error { color: #8a1f11; }
#hgis-status.is-note { color: #1d4d7a; }

/* Zwevend paneel: tandwiel linksboven, klapt open */
.hgis-ui { position: absolute; z-index: 5; top: 10px; left: 10px; font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1c1c1c; }
.hgis-gear { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.88); color: #333; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; transition: background .15s, box-shadow .15s; }
.hgis-gear:hover, .hgis-gear[aria-expanded="true"] { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.hgis-gear:focus-visible, .hgis-ui button:focus-visible, .hgis-ui select:focus-visible, .hgis-ui input:focus-visible { outline: 2px solid #1d6fd1; outline-offset: 2px; }

.hgis-panel { box-sizing: border-box; width: 260px; max-width: calc(100vw - 20px); max-height: calc(100vh - 64px); overflow: auto; margin-top: 8px; padding: 10px 12px 12px; border-radius: 10px; background: rgba(255,255,255,.93); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.hgis-panel label { display: block; margin: 10px 0 3px; font-size: 12px; color: #444; }
.hgis-panel .hgis-check { display: flex; align-items: center; gap: 6px; margin: 9px 0 0; font-size: 13px; color: #1c1c1c; cursor: pointer; }
.hgis-panel select { width: 100%; padding: 5px 6px; font-size: 13px; border: 1px solid #bbb; border-radius: 5px; background: #fff; }
.hgis-panel input[type="range"] { width: 100%; height: 26px; margin: 0; accent-color: #1d6fd1; }
.hgis-panel output { float: right; font-variant-numeric: tabular-nums; color: #111; }
.hgis-panel a { display: inline-block; margin-top: 10px; font-size: 12px; color: #1d4d7a; }
.hgis-row { display: flex; align-items: center; gap: 8px; }
.hgis-row label { margin: 0; flex: 1; }
.hgis-row input[type="color"] { width: 38px; height: 26px; padding: 0; border: 1px solid #bbb; border-radius: 4px; background: #fff; }
.hgis-ink-opts { margin-top: 4px; padding-left: 4px; border-left: 3px solid #d8d2c2; }

/* [m] / [i] schakelaar */
.hgis-seg { display: flex; border: 1px solid #b9b3a3; border-radius: 7px; overflow: hidden; }
.hgis-seg button { flex: 1; padding: 6px 4px; border: 0; background: #fff; font: inherit; cursor: pointer; }
.hgis-seg button + button { border-left: 1px solid #b9b3a3; }
.hgis-seg button[aria-pressed="true"] { background: #2b2b2b; color: #fff; }
.hgis-seg button:disabled { opacity: .45; cursor: not-allowed; }
kbd { padding: 0 4px; border-radius: 3px; background: rgba(0,0,0,.08); font: 600 11px/1.4 ui-monospace, monospace; }
.hgis-seg button[aria-pressed="true"] kbd { background: rgba(255,255,255,.22); }

.hgis-foot { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e3ddcc; }
.hgis-btn { padding: 4px 9px; border: 1px solid #b9b3a3; border-radius: 5px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.hgis-btn:hover { background: #f1eee6; }

/* Scanweergave */
#hgis-scan { background: #2a2a2a; }
#hgis-scan-view { position: absolute; inset: 0; }
#hgis-scan-zoom { position: absolute; z-index: 3; top: 10px; right: 10px; display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 2px rgba(0,0,0,.12); }
#hgis-scan-zoom button { width: 29px; height: 29px; padding: 0; border: 0; background: #fff; font: 18px/1 system-ui, sans-serif; cursor: pointer; }
#hgis-scan-zoom button + button { border-top: 1px solid #ddd; }
#hgis-scan-zoom button:hover { background: #eee; }
.hgis-mask { pointer-events: none; }
.hgis-mask polygon { fill: rgba(255, 60, 60, .08); stroke: #ff3c3c; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.hgis-gcp { box-sizing: border-box; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; background: #e0261b; box-shadow: 0 0 0 1px rgba(0,0,0,.55); color: #fff; font: 700 9px/14px system-ui, sans-serif; text-align: center; pointer-events: none; }
.hide-mask .hgis-mask { visibility: hidden !important; }
.hide-gcp  .hgis-gcp  { visibility: hidden !important; }

/* Selectiepopup met Scan-knop */
.hgis-popup .maplibregl-popup-content { padding: 10px 12px 10px; border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,.3); font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1c1c1c; }
.hgis-popup .maplibregl-popup-close-button { padding: 2px 7px; font-size: 18px; color: #555; }
.hgis-pop__title { margin: 0 18px 4px 0; font-weight: 600; word-break: break-word; }
.hgis-pop__hint { margin-bottom: 4px; font-size: 11.5px; color: #666; }
.hgis-pop__actions { display: flex; gap: 6px; margin-top: 6px; }
.hgis-btn--primary { border-color: #d81b7a; background: #ff2d95; color: #fff; font-weight: 600; }
.hgis-btn--primary:hover { background: #e6207f; }
.hgis-btn--primary kbd { background: rgba(255,255,255,.25); }

/* Terug naar de kaart vanuit de scanweergave */
.hgis-btn--float { position: absolute; z-index: 3; top: 10px; left: 50%; transform: translateX(-50%); padding: 6px 12px; box-shadow: 0 1px 5px rgba(0,0,0,.4); font-size: 13px; }

/* Gear + info naast elkaar, panelen eronder */
.hgis-bar { display: flex; gap: 8px; }

/* Kleine labels, notities en bronvermelding */
.hgis-label { margin: 10px 0 3px; font-size: 12px; color: #444; }
.hgis-note { margin-top: 4px; font-size: 11.5px; color: #777; }
.hgis-info { width: 300px; }
.hgis-info__item + .hgis-info__item { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e3ddcc; }
.hgis-info__item .hgis-label { margin-top: 0; text-transform: uppercase; letter-spacing: .03em; font-size: 11px; }
.hgis-info__title { font-weight: 600; }
.hgis-info__meta { margin-top: 2px; font-size: 12px; color: #555; }
.hgis-info a { margin-top: 6px; }

/* Laagkiezer met snappende tijdlijn */
.hgis-picker label { margin-top: 10px; }
.hgis-timeline { margin: 6px 0 2px; }
.hgis-timeline input[type="range"] { width: 100%; }
.hgis-timeline input.is-idle { opacity: .55; }
.hgis-ticks { display: flex; justify-content: space-between; margin-top: -2px; font-size: 10.5px; color: #666; font-variant-numeric: tabular-nums; }
.hgis-timeline output { display: block; float: none; margin-top: 2px; font-size: 12px; color: #222; }

/* Split-screen: eigen bediening per venster */
.hgis-win { position: absolute; z-index: 4; top: 52px; width: min(240px, 44%); padding: 6px 8px 8px; border-radius: 9px; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 1px 6px rgba(0,0,0,.3); font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1c1c1c; }
.hgis-win--left { left: 25%; transform: translateX(-50%); }
.hgis-win--right { left: 75%; transform: translateX(-50%); }
.hgis-win select { width: 100%; padding: 4px 6px; font-size: 13px; border: 1px solid #bbb; border-radius: 5px; background: #fff; }
.hgis-win .hgis-picker label { display: none; }
@media (max-width: 560px) { .hgis-win { top: 52px; width: 46%; } .hgis-win--left { left: 24%; } .hgis-win--right { left: 76%; } }

/* Hofstellen & Orte (CPT "erf"): legenda in het paneel en popup */
.hgis-legend { margin: 6px 0 2px; padding: 0; list-style: none; font-size: 12px; color: #333; }
.hgis-legend li { display: flex; align-items: center; gap: 7px; margin: 3px 0; }
.hgis-dot { display: inline-block; box-sizing: border-box; flex: none; width: 12px; height: 12px; margin-right: 1px; vertical-align: -1px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.45); }
.hgis-pop--erf { max-height: 240px; overflow: auto; }
.hgis-pop__item + .hgis-pop__item { margin-top: 9px; padding-top: 9px; border-top: 1px solid #e2ddd0; }
.hgis-pop__row .hgis-dot { margin: 0 5px 0 2px; }
.hgis-pop__row { margin: 1px 0; font-size: 12.5px; color: #333; }
.hgis-pop__key { color: #777; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.hgis-pop__link { display: inline-block; text-decoration: none; color: #fff; }
.hgis-pop__link:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) { .hgis-gear { transition: none; } }
.hgis-pop__info { margin: 2px 0 4px; max-height: 120px; overflow: auto; white-space: pre-line; }
.hgis-pop__link--alt { color: #1c1c1c; }
.hgis-pop__link--alt:hover { color: #000; }
.hgis-pop__actions { flex-wrap: wrap; }
