/* add-on: Wiring, a mode of the Home plan (js/plus/power.js). The drawing fades back so the points read; one kind of mark per circuit, colour and shape together.
   The frame is Airflow's: one white pill at the bottom with the line, and the sample label under it. No filter or backdrop-filter anywhere. */
.u-plan { --pd-d: 118px; --pd-lights: #b4780a; --pd-power: #2563a8; --pd-heavy: #bd3a64; --pd-data: #1f8a74; }
.pd-layer, .pd-dock { display: none; }
/* a home with no layout has no Wiring button: the mode bar's own button style sets display, which would beat [hidden] */
.u-plan .pm-seg [data-pm="power"][hidden] { display: none !important; }
.u-plan[data-pm="power"] .pd-layer { display: block; }
.u-plan[data-pm="power"] .pd-dock { display: flex; }

/* the drawing keeps the room above the dock */
.u-plan[data-pm="power"] .u-z img { height: calc(100% - 5.8rem - var(--pd-d) - 14px); opacity: .58; transition: opacity .4s var(--e-x, ease); }
html.r13 body #lv-home .u-plan[data-pm="power"] .u-z img { top: calc(var(--q-hm-bar) + var(--s2)); height: calc(100% - var(--q-hm-bar) - var(--s2) - var(--pd-d) - 16px); }

.pd-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pd-frame { position: absolute; }
.pd-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pd-r { position: absolute; padding: 0; border: 0; background: none; border-radius: 6px; pointer-events: auto; cursor: pointer; }
.pd-r:focus-visible { outline: 2px solid #16161b; outline-offset: -2px; }

/* the chosen room */
.pd-hi { fill: rgba(22, 22, 27, .07); stroke: rgba(22, 22, 27, .5); stroke-width: 2; opacity: 0; transition: opacity .3s var(--e-x, ease); }
.pd-hi.on { opacity: 1; }

/* the runs */
.pd-l { display: none; fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.pd-l.on { display: inline; }
.pd-l[data-c="lights"] { stroke: var(--pd-lights); } .pd-l[data-c="power"] { stroke: var(--pd-power); }
.pd-l[data-c="heavy"] { stroke: var(--pd-heavy); } .pd-l[data-c="data"] { stroke: var(--pd-data); stroke-dasharray: none; }

/* the points */
.pd-p { --k: var(--pd-power); transition: opacity .25s var(--e-x, ease); }
.pd-p[data-c="lights"] { --k: var(--pd-lights); } .pd-p[data-c="heavy"] { --k: var(--pd-heavy); } .pd-p[data-c="data"] { --k: var(--pd-data); }
.pd-p.off { display: none; }
.pd-p.dim { opacity: .2; }
.pd-p circle:first-child { fill: #fff; stroke: var(--k); stroke-width: 2.6; }
.pd-g { fill: none; stroke: var(--k); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.pd-g .g-f { fill: var(--k); stroke: none; }
.pd-p .pd-pi { transition: transform .35s var(--e-x, ease); }
.pd-g { transition: opacity .2s var(--e-x, ease); }
.pd-frame.traced .pd-p .pd-pi { transform: scale(.42); }
.pd-frame.traced .pd-g { opacity: 0; }
.pd-frame.traced .pd-p circle:first-child { fill: var(--k); stroke: #fff; stroke-width: 4; }
.pd-frame.traced .pd-l { stroke-width: 2.3; }
.pd-db rect { fill: #16161b; stroke: #fff; stroke-width: 3; }
.pd-db path { fill: #fff; }

/* the dock */
.pd-dock { position: absolute; z-index: 3; left: var(--s4, 1rem); right: var(--s4, 1rem); bottom: 10px; flex-direction: column; gap: 6px; color: #16161b; }
.pd-ui { display: flex; align-items: center; justify-content: space-between; gap: .9rem; min-height: calc(56px * var(--ui-scale, 1)); padding: .5rem .55rem .5rem 1.1rem; border-radius: calc(24px * var(--ui-scale, 1)); background: #fff; box-shadow: var(--mf-sh-float, 0 1px 3px rgba(22, 22, 27, .16)); }
.pd-t { min-width: 0; display: grid; gap: 1px; }
.pd-t p, .pd-foot { margin: 0; }
.pd-line { font: var(--ty-callout, 500 15px/1.33 var(--sans)); font-weight: 600; letter-spacing: var(--tr-callout, 0); text-wrap: balance; }
.pd-sub { font: var(--ty-cap, 500 12px/1.33 var(--sans)); letter-spacing: var(--tr-cap, .01em); color: rgba(22, 22, 27, .66); }
.pd-all { flex: none; min-height: var(--q-ctl, 44px); padding: 0 1rem; border: 0; border-radius: var(--r-pill, 999px); background: #16161b; color: #fff; font: var(--ty-foot, 600 13px/1.2 var(--sans)); font-weight: 600; white-space: nowrap; cursor: pointer; }
.pd-all[aria-pressed="true"] { background: rgba(22, 22, 27, .08); color: #16161b; }
.pd-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pd-chip { display: inline-flex; align-items: center; gap: .4em; min-height: 36px; padding: 0 .7rem; border: 0; border-radius: var(--r-pill, 999px); background: #fff; color: rgba(22, 22, 27, .74); font: var(--ty-foot, 500 12.5px/1.2 var(--sans)); font-weight: 500; white-space: nowrap; box-shadow: var(--mf-sh-float, 0 1px 3px rgba(22, 22, 27, .16)); cursor: pointer; }
.pd-chip { position: relative; }
.pd-chip::after { content: ""; position: absolute; inset: -4px 0; }   /* the finger's target is 44px tall; the chip stays compact so the drawing keeps its room */
.pd-chip.on { background: #16161b; color: #fff; }
.pd-sw { width: .68em; height: .68em; border-radius: 50%; background: var(--k); box-shadow: 0 0 0 1px rgba(255, 255, 255, .55); }
.pd-sw[data-c="lights"] { --k: var(--pd-lights); } .pd-sw[data-c="power"] { --k: var(--pd-power); } .pd-sw[data-c="heavy"] { --k: var(--pd-heavy); } .pd-sw[data-c="data"] { --k: var(--pd-data); }
.pd-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5em; font: var(--ty-cap, 500 12px/1.33 var(--sans)); letter-spacing: var(--tr-cap, .01em); color: rgba(22, 22, 27, .66); }
.pd-foot b { font-weight: 650; color: #16161b; }
