/* Network diagram (Network Map page) and placing sites on the sites map.
   Colours come from the theme variables, so it follows light and dark mode. */
.tp-card{padding-bottom:12px}
.tp-card #tpSummary b{color:var(--txt);font-variant-numeric:tabular-nums}
.tp-card #tpSummary b.bad{color:var(--r)}.tp-card #tpSummary b.warn{color:var(--a)}.tp-card #tpSummary b.muted{color:var(--muted)}
.tp-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:4px 0 12px}
.tp-tools input{flex:0 1 240px;min-width:0;padding:8px 11px;border-radius:9px;border:1px solid var(--line);background:var(--surface-2);color:var(--txt);font:inherit;font-size:13px}
.tp-legend{display:flex;gap:12px;flex-wrap:wrap;margin-left:auto;font-size:11px;color:var(--muted)}
.tp-legend span{display:inline-flex;align-items:center;gap:5px}
.tp-legend i{display:inline-block;width:18px;height:3px;border-radius:2px}
.tp-legend i.g{background:var(--g)}.tp-legend i.a{background:var(--a)}.tp-legend i.r{background:var(--r)}.tp-legend i.u{background:var(--muted)}
.tp-legend i.dot{background:repeating-linear-gradient(90deg,var(--muted) 0 3px,transparent 3px 6px)}
.tp-legend i.wl{height:5px;background:repeating-linear-gradient(90deg,var(--muted) 0 8px,transparent 8px 11px)}
.tp-wrap{overflow-x:auto;border-radius:12px;border:1px solid var(--line);background:var(--surface-2)}
.tp-canvas{position:relative;min-width:760px}
.tp-canvas.editing .tp-site{cursor:grab}
.tp-svg{display:block;width:100%;height:auto;user-select:none}
.tp-empty{padding:40px 24px;text-align:center;color:var(--muted);font-size:13px}
.tp-site-box{fill:var(--surface);stroke:var(--line);stroke-width:1}
.tp-site.critical .tp-site-box{stroke:var(--r)}.tp-site.warning .tp-site-box{stroke:var(--a)}
.tp-site.none .tp-site-box{fill:none;stroke-dasharray:5 5}
.tp-site.editable .tp-site-box{stroke:var(--accent);stroke-dasharray:6 4}
.tp-site-name{fill:var(--txt);font-size:13px;font-weight:700}
.tp-site-sub{fill:var(--muted);font-size:11px}
.tp-site.critical .tp-site-sub{fill:var(--r)}
.tp-node{cursor:pointer;outline:none}
.tp-node>rect:first-of-type{fill:var(--surface-2);stroke:var(--line);stroke-width:1}
.tp-node:hover>rect:first-of-type,.tp-node:focus-visible>rect:first-of-type,.tp-node.lit>rect:first-of-type{stroke:var(--accent);stroke-width:1.5}
.tp-bar{fill:var(--muted)}
.tp-node.healthy .tp-bar{fill:var(--g)}.tp-node.warning .tp-bar{fill:var(--a)}.tp-node.critical .tp-bar{fill:var(--r)}
.tp-node.critical>rect:first-of-type{stroke:var(--r)}
.tp-label{fill:var(--txt);font-size:12px;font-weight:650}
.tp-sub{fill:var(--muted);font-size:10.5px}
.tp-node.critical .tp-sub{fill:var(--r)}
.tp-edge{fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;pointer-events:none}
.tp-edge.healthy{stroke:var(--g)}.tp-edge.warning{stroke:var(--a)}.tp-edge.critical{stroke:var(--r)}
.tp-edge.unconfirmed{stroke-dasharray:3 5}
.tp-edge.wireless{stroke-width:3.5;stroke-dasharray:10 4}
.tp-hit{fill:none;stroke:transparent;stroke-width:14;cursor:pointer}
.tp-svg.focusing .tp-edge:not(.lit){opacity:.18}
.tp-svg.focusing .tp-node:not(.lit){opacity:.45}
.tp-edge.lit{stroke-width:3}
.tp-svg .dim{opacity:.22}
/* Sites map: placing a site */
.geo-place{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
.geo-place select{min-width:0;flex:0 1 280px;padding:8px 10px;border-radius:9px;border:1px solid var(--line);background:var(--surface-2);color:var(--txt);font:inherit;font-size:13px}
.geo-place small{color:var(--muted);font-size:12px}
.geo-placing{box-shadow:0 0 0 2px var(--accent)}
.site-geo-map{isolation:isolate;position:relative}
.site-geo-map.geo-placing,.site-geo-map.geo-placing .leaflet-grab{cursor:crosshair}
.geo-banner{position:absolute;left:50%;top:12px;transform:translateX(-50%);z-index:600;padding:8px 12px;border-radius:9px;background:var(--surface);border:1px solid var(--accent);color:var(--txt);font-size:12px;box-shadow:var(--shadow);max-width:calc(100% - 100px)}
@media(max-width:760px){.tp-legend{margin-left:0}.tp-tools input{flex:1 1 100%}}
.geo-banner{display:flex;flex-direction:column;gap:6px;width:min(460px,calc(100% - 80px));max-width:none}
.geo-find{display:flex;gap:6px}
.geo-find input{flex:1;min-width:0;padding:6px 9px;border-radius:8px;border:1px solid var(--line);background:var(--surface-2);color:var(--txt);font:inherit;font-size:12px}
.geo-pin{background:none;border:0}
.geo-pin i{display:block;width:22px;height:22px;border-radius:50% 50% 50% 0;background:var(--accent,#2563eb);border:2px solid #fff;transform:rotate(-45deg);box-shadow:0 2px 6px #0006}
/* Map tiles: overlap them by half a pixel so no seams show at fractional zoom
   or display scaling, and give the dark map a dark background behind them. */
.site-geo-map .leaflet-tile-container img.leaflet-tile,.wl-map .leaflet-tile-container img.leaflet-tile{width:256.5px!important;height:256.5px!important}
html:not([data-theme="light"]) .site-geo-map.leaflet-container,html:not([data-theme="light"]) .wl-map.leaflet-container{background:#1d1f22}
@media(max-width:600px){.geo-banner{left:56px;right:8px;transform:none;width:auto}}
