.workspace-plan-dialog {position:fixed;inset:0;margin:auto;width:calc(100vw - 24px);height:calc(100dvh - 24px);max-width:none;max-height:calc(100dvh - 24px);overflow:hidden;border-radius:12px}
.plan-workbench {display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;height:100%}
.plan-workbench-header {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 22px;border-bottom:1px solid #e1e7ef}
.plan-workbench-header h2 {margin:4px 0 5px;font-size:21px;color:#244d86}
.plan-workbench-header p {margin:0;color:#7c899a;font-size:11px}
.plan-workbench-header .icon-button {width:38px;height:38px;background:#f1f5fa}
.plan-toolbar {display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:10px 20px;background:white;border-bottom:1px solid #e1e7ef}
.plan-zoom-controls,.plan-mode-controls {display:flex;gap:6px;align-items:center}
.plan-zoom-controls .icon-button {width:34px;height:34px;border:1px solid #e0e7f0;background:#f8faff}
.plan-zoom-controls output {min-width:64px;text-align:center;font-size:12px;color:#5275a2}
.plan-mode-controls [aria-pressed="true"] {background:#eaf1fc;color:#245b9f;border-color:#9ebce1}
.plan-room-count {font-size:11px;color:#7b899c}
.expanded-plan-viewport {position:relative;overflow:hidden;touch-action:none;user-select:none;background:#edf2f7;min-height:0;outline-offset:-4px}
.expanded-plan-viewport.place-mode {cursor:crosshair}
.expanded-plan-viewport.pan-mode {cursor:grab}
.expanded-plan-viewport.pan-mode:active {cursor:grabbing}
.expanded-plan-stage {position:absolute;top:0;left:0;transform-origin:0 0;box-shadow:0 3px 20px #244d8620;background:white}
.expanded-plan-stage>img {width:100%;height:100%;display:block;pointer-events:none}
.expanded-room-pin {position:absolute;transform:translate(-50%,-100%);border:1px solid white;border-radius:5px;background:#477bbd;color:white;font-size:11px;font-weight:600;padding:6px 8px;min-width:30px;min-height:30px;white-space:nowrap;box-shadow:0 2px 5px #244d8630;cursor:pointer;touch-action:none}
.place-mode .expanded-room-pin {pointer-events:none;opacity:.8}
.expanded-room-pin:hover,.expanded-room-pin:focus-visible {background:#1e5da9;z-index:2}
.expanded-active-pin {position:absolute;display:grid;place-items:center;width:38px;height:38px;transform:translate(-50%,-83.333333%);pointer-events:none;color:#174f98;z-index:3;filter:drop-shadow(0 1px 2px white)}
.expanded-active-pin .icon {width:38px;height:38px;fill:#edf4ff;stroke-width:1.8}
.plan-workbench-footer {display:flex;align-items:center;gap:10px;padding:13px 20px;border-top:1px solid #e1e7ef;background:white}
.plan-workbench-footer>div {margin-right:auto;min-width:0}
.plan-workbench-footer p {margin:0 0 4px;font-size:11px;color:#7b899c;line-height:1.5}
.plan-workbench-footer span {font-size:10px;color:#5275a2}
.plan-workbench button:disabled {opacity:.45;cursor:default}
.pin-picker-actions {display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.pin-picker-actions .button {font-size:11px;padding:9px 12px;white-space:nowrap}
@media(max-width:720px){.workspace-plan-dialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0}.plan-workbench-header{padding:12px 15px}.plan-workbench-header h2{font-size:17px}.plan-toolbar{padding:8px 12px;gap:8px}.plan-toolbar .button{font-size:10px;padding:8px 10px}.plan-workbench-footer{padding:10px 12px;flex-wrap:wrap}.plan-workbench-footer>div{flex-basis:100%}.plan-workbench-footer .button{font-size:11px;padding:9px 12px}.plan-workbench-footer>button:first-of-type{margin-left:auto}}

/* One plan interaction surface across rooms, equipment, doors, terminals and controls. */
.inline-plan-toolbar{display:flex;justify-content:flex-end;padding:0 0 10px;gap:10px}
.inline-plan-viewport{height:clamp(300px,45vh,540px);overflow:hidden;background:#eef3f8;border:1px solid #d7e2ef;border-radius:10px;touch-action:none;user-select:none;cursor:grab;isolation:isolate}
.inline-plan-viewport:focus-visible{outline:3px solid #6d9cd9;outline-offset:2px}
.inline-plan-viewport.is-dragging{cursor:grabbing}
.inline-plan-stage{position:absolute;left:0;top:0;transform-origin:0 0;background:#fff;box-shadow:0 2px 10px #142d4f20}
.inline-plan-stage>img{display:block;width:100%;height:100%;pointer-events:none;user-select:none}
.inline-plan-stage .layout-existing-pin{font:600 11px/1.25 var(--font-body,Arial,sans-serif);min-width:30px;min-height:30px;background:#2865af;color:#fff;border:2px solid #fff;box-shadow:0 2px 6px #19375b50;gap:5px;max-width:200px;opacity:1}
.inline-plan-stage .layout-existing-pin>span:first-child,.expanded-room-pin>span:first-child{max-width:145px;overflow:hidden;text-overflow:ellipsis}
.plan-marker-count{background:white;color:#245b9e;border-radius:12px;min-width:18px;height:18px;padding:1px 4px;display:inline-flex;align-items:center;justify-content:center;font-size:10px}
.inline-plan-stage .plan-room-reference,.expanded-room-pin.plan-room-reference{background:#1b777c}
.plan-reference-dot{font-size:14px}.plan-reference-note{font-size:11px;line-height:1.6;color:#32666c;margin:8px 0}
.plan-pin-choices{background:white;border:1px solid #bdd1e8;border-radius:10px;padding:12px;margin-top:12px;max-height:290px;overflow:auto}
.plan-pin-choices>div{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;font-size:12px}
.plan-record-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;background:#f8fbff;border:1px solid #e1e9f4;border-radius:7px;padding:10px 12px;margin-top:6px;width:100%;cursor:pointer;color:#213f63}
.plan-record-choice strong,.plan-record-choice small{display:block}.plan-record-choice strong{font-size:12px}.plan-record-choice small{font-size:11px;font-weight:400;margin-top:3px;color:#5d7695}.plan-record-choice:hover,.plan-record-choice:focus-visible{background:#e9f2ff;border-color:#6298d7}
.plan-unlocated{font-size:12px;border-top:1px solid #dbe5f1;padding-top:10px;margin-top:12px}.plan-unlocated summary{cursor:pointer;color:#526b89}.plan-unlocated p{font-size:11px;color:#6a7f98}
.expanded-plan-choices{padding:0 20px;max-height:32vh;overflow:auto;flex-shrink:0}.expanded-plan-choices:empty{display:none}
.expanded-room-pin{display:inline-flex;align-items:center;gap:5px}.expanded-plan-choices .plan-pin-choices{max-height:none}
@media(max-width:600px){.inline-plan-viewport{height:340px}.inline-plan-toolbar .plan-zoom-controls{width:100%;justify-content:flex-end}.inline-plan-stage .layout-existing-pin{font-size:10px}.plan-record-choice{align-items:flex-start;flex-direction:column;gap:2px}}

.plan-workbench:has(.expanded-plan-choices){grid-template-rows:auto auto minmax(0,1fr) auto auto}
.inline-plan-stage{visibility:hidden}.inline-plan.is-ready .inline-plan-stage{visibility:visible}
