/* ─── «Ansicht anpassen»: план заходу з карти й фільтри показу ───
   docs/15-design.md, розділ «Ansicht anpassen». Мале вікно — звичайна
   панель (.propanel); тут лише те, чого в ній немає. */
.propanel .glist .lrow .ico.lead { width: 22px; height: 22px; color: var(--action); flex: none; }
.propanel .glist .lrow .s { white-space: normal; line-height: 1.4; }
.lrow.off { color: var(--dim); cursor: default; }
.lrow.off .ico.lead, .lrow.off .s { color: var(--dim); }
.lrow.off .chev { visibility: hidden; }
.lrow.off:hover { background: none; }
.propanel .btn.wide { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--gap-lg); }
.propanel .btn.wide .ico { width: 18px; height: 18px; }

/* Перемикач-сегмент (шаблони, товщина): --fill, вибране --seg-on. */
.wizard-seg { display: flex; gap: 3px; padding: 3px; border-radius: var(--r); background: var(--fill); }
.wizard-seg button { flex: 1; min-height: 34px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none;
  color: var(--muted); font: 500 13.5px var(--sans); cursor: pointer; white-space: nowrap; }
.wizard-seg button.on { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-shadow); font-weight: 600; }
.wizard-sliders { margin: var(--gap-lg) 0 var(--gap); }
.wizard-sliders input[type=range] { width: 100%; margin: 0; accent-color: var(--action); }
.wizard-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.wizard-check input { width: 18px; height: 18px; accent-color: var(--action); }

/* Вікно карти: поверх застосунку, не на весь екран. */
.mapwin-scrim { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 70%, transparent); opacity: 0; transition: opacity .2s ease; }
.mapwin-scrim.in { opacity: 1; }
.mapwin { display: flex; flex-direction: column; width: calc(100vw - max(32px, 8vw)); height: calc(100vh - max(32px, 8vh));
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.mapwin > header { display: flex; align-items: center; gap: var(--gap-sm); padding: 10px var(--gap) 10px var(--gap-lg);
  border-bottom: 1px solid var(--line); }
.mapwin > header h3 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; }
.mapwin-map { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--card); }
.mapwin-foot { display: flex; align-items: center; gap: var(--gap-sm); padding: var(--gap-sm) var(--gap-lg);
  border-top: 1px solid var(--line); min-height: 60px; }
.mapwin-hint { flex: 1; min-width: 0; }
.mapwin-sum { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mapwin-sum.over { color: var(--warn); }

/* Рамка стоїть у вікні; карта під нею тягнеться крізь неї. Поза рамкою — притемнено. */
.mapwin-frame { position: absolute; z-index: 450; left: 0; top: 0; pointer-events: none;
  box-shadow: 0 0 0 2px var(--action), 0 0 0 100vmax color-mix(in srgb, var(--bg) 55%, transparent); }
.mapwin-frame > i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 3px; pointer-events: auto;
  background: var(--raised); box-shadow: 0 0 0 2px var(--action), var(--shadow-sm); touch-action: none; }
.mapwin-frame .h-nw { left: 0; top: 0; cursor: nwse-resize; }
.mapwin-frame .h-n { left: 50%; top: 0; cursor: ns-resize; }
.mapwin-frame .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.mapwin-frame .h-e { left: 100%; top: 50%; cursor: ew-resize; }
.mapwin-frame .h-se { left: 100%; top: 100%; cursor: nwse-resize; }
.mapwin-frame .h-s { left: 50%; top: 100%; cursor: ns-resize; }
.mapwin-frame .h-sw { left: 0; top: 100%; cursor: nesw-resize; }
.mapwin-frame .h-w { left: 0; top: 50%; cursor: ew-resize; }

.wizard-map { position: absolute; inset: 0; background: var(--card); font: inherit; }
/* Векторний вид (MapLibre) — під прозорим Leaflet; знімок для плану — поза екраном. */
.wizard-map.gl { background: transparent; }
.mapwin-map > .wizard-gl { position: absolute; inset: 0; background: var(--card); }   /* сильніше за .maplibregl-map { position: relative } */
body > .wizard-glshot { position: fixed; left: -100000px; top: 0; pointer-events: none; }
.wizard-map .leaflet-bar { border: 0; border-radius: var(--r); overflow: hidden; box-shadow: var(--float, var(--shadow-sm)); }
.wizard-map .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; background: var(--raised); color: var(--ink); border-color: var(--line); }
.wizard-map .leaflet-bar a:hover { background: var(--fill); }

/* Пошук — плаває зліва згори, лише за Enter. */
.wizard-search { position: absolute; z-index: 500; top: 12px; left: 12px; width: min(340px, calc(100% - 24px));
  padding: 4px; border-radius: 12px; background: var(--raised); box-shadow: var(--float, var(--shadow)); }
.wizard-search .searchbox { background: var(--fill); }
.wizard-results { display: flex; flex-direction: column; }
.wizard-results:not(:empty) { padding: 4px 0 2px; }
.wizard-results .note { padding: 6px 10px; }
.wizard-result { padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink);
  font: 13.5px/1.35 var(--sans); text-align: left; cursor: pointer; }
.wizard-result:hover { background: var(--action-soft); }

/* Інструменти малювання — плаваюча група згори праворуч від пошуку. */
.wizard-tools { position: absolute; z-index: 500; top: 12px; right: 12px;
  display: flex; align-items: center; gap: 6px; padding: 6px; width: max-content; max-width: calc(100% - 380px);
  flex-wrap: wrap; justify-content: flex-end; border-radius: 12px; background: var(--raised); box-shadow: var(--float, var(--shadow)); }
.wizard-tools .grp { display: flex; align-items: center; gap: 2px; }
.wizard-tools .grp + .grp, .wizard-tools .wizard-seg + .grp, .wizard-tools .grp + .wizard-seg { padding-left: 6px; border-left: 1px solid var(--line); }
.wizard-tool { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink); cursor: pointer; }
.wizard-tool .ico { width: 19px; height: 19px; }
.wizard-tool:hover { background: var(--fill); }
.wizard-tool.on { background: var(--action-soft); color: var(--action); }
.wizard-tool[disabled] { color: var(--dim); cursor: default; background: none; }
.wizard-swatch { width: 22px; height: 22px; margin: 0 2px; border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); }
.wizard-swatch.on { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px var(--raised), 0 0 0 4px var(--action); }
.wizard-width { display: flex; align-items: center; gap: 4px; height: 36px; padding: 0 8px 0 4px; border-radius: var(--r-sm);
  background: var(--fill); font-size: 13px; color: var(--muted); cursor: ns-resize; }
.wizard-width input { width: 44px; height: 30px; padding: 0 4px; border: 0; border-radius: 6px; background: none; color: var(--ink);
  font: 600 14px var(--sans); font-variant-numeric: tabular-nums; text-align: right; cursor: ns-resize; }
.wizard-width input:focus { outline: 2px solid var(--action); }
.wizard-tools .wizard-width + .grp { padding-left: 6px; border-left: 1px solid var(--line); }
.mapwin-looks { position: absolute; z-index: 500; left: 12px; bottom: 12px; max-width: calc(100% - 300px); flex-wrap: wrap; background: var(--raised);
  box-shadow: var(--float, var(--shadow)); }
.wizard-map.panning, .wizard-map.panning .leaflet-interactive { cursor: grabbing; }
.wizard-map.drawing { cursor: crosshair; touch-action: none; }
.wizard-map.drawing .leaflet-interactive { cursor: crosshair; }
.wizard-shape.sel { stroke-dasharray: 10 6; }
.wizard-labelicon { background: none; border: 0; }
.wizard-label { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; line-height: 1.15; white-space: nowrap; pointer-events: auto; }
.wizard-label.sel { outline: 2px dashed var(--action); outline-offset: 4px; border-radius: 4px; }
.wizard-textin { position: absolute; z-index: 600; min-width: 60px; min-height: 30px; padding: 6px 8px; resize: both; overflow: auto;
  border: 0; border-radius: 4px; background: color-mix(in srgb, var(--raised) 85%, transparent); color: var(--ink);
  font: 600 15px/1.25 var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--action), var(--shadow-sm); }
.wizard-textin:focus { outline: none; }

@media (max-width: 1100px) {
  .wizard-tools { top: 68px; left: 12px; right: auto; max-width: calc(100% - 24px); justify-content: flex-start; }
}
