/* PAMEL Widok instalacji 0.35 — nakładka PRD4, bez wpływu na silnik CLOUD */
#v-installation{--iv-ink:#18313a;--iv-border:#bfd2d7;--iv-green:#87ba39;min-width:0}
#v-installation button:focus-visible,#v-installation input:focus-visible,#v-installation select:focus-visible{outline:3px solid #e2bd70;outline-offset:2px}
.iv-switch{margin:0 0 16px;padding:15px 18px;border:1px solid #49616b;border-radius:18px;background:linear-gradient(120deg,#182f3d,#234a4d);box-shadow:0 12px 27px #0002;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}
.iv-switch p{margin:4px 0 0;color:#d1e1de;font-size:13px}
.iv-switch button,.iv-toolbar button,.iv-bottom button{min-height:43px;border-radius:12px}
.iv-switch button{padding:12px 22px;font-weight:800;background:linear-gradient(145deg,#e3f1c9,#a5d26c);color:#15351b;border:0}
.iv-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 15px}
.iv-head h1{font-size:clamp(25px,3vw,38px);letter-spacing:-.035em;margin:0}
.iv-head p{margin:4px 0 0;color:#b7ccd2;font-size:13px}
.iv-head-buttons{display:flex;gap:8px;flex-wrap:wrap}
.iv-head-buttons button,.iv-toolbar button,.iv-toolbar .iv-upload{padding:11px 14px;border:1px solid #638388;color:#e8f4f1;background:#173543;font-size:14px;font-weight:750;border-radius:12px;cursor:pointer}
.iv-head-buttons button.primary,#ivSave{background:linear-gradient(135deg,#a5d86f,#6fb737)!important;color:#163115!important;border:0}
#ivCancel{background:#2d4150}
.iv-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:13px;margin-bottom:12px;border:1px solid #45616f;border-radius:15px;background:#122a34}
.iv-toolbar[hidden],.iv-head-buttons [hidden]{display:none!important}
.iv-upload{display:inline-flex;align-items:center;gap:8px}
.iv-upload input{display:none}
.iv-hint{font-size:13px;color:#bcd2d6;min-height:24px;margin:8px 2px}
.iv-scroll{overflow-x:auto;overflow-y:hidden;max-width:100%;border:1px solid #365566;border-radius:20px;background:#dce6e8;scrollbar-color:#65848f #e9f0f0}
.iv-stage{width:100%;min-width:720px;aspect-ratio:16/10;position:relative;background:linear-gradient(150deg,#fff,#edf3f5);overflow:hidden;isolation:isolate}
.iv-stage:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(76,107,115,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(76,107,115,.035) 1px,transparent 1px);background-size:25px 25px;pointer-events:none;z-index:0}
.iv-stage>img.iv-photo{position:absolute;inset:7% 13%;height:86%;width:74%;display:block;object-fit:contain;pointer-events:none;z-index:1;user-select:none}
.iv-stage.iv-custom-photo>img.iv-photo{inset:0;height:100%;width:100%;object-fit:contain}
.iv-stage.iv-editing{outline:5px solid #9bd66a;outline-offset:-5px}
.iv-stage.iv-editing .iv-item{touch-action:none;cursor:grab}
.iv-stage.iv-editing .iv-item:active{cursor:grabbing}
.iv-elements{position:absolute;inset:0;pointer-events:none;z-index:3}
.iv-item{position:absolute;pointer-events:auto;display:flex;flex-direction:column;gap:4px;justify-content:center;min-height:66px;box-sizing:border-box;min-width:0;padding:9px 12px;background:rgba(250,254,255,.94);border:1px solid #bad0d4;color:var(--iv-ink);border-radius:13px;box-shadow:0 10px 28px rgba(20,48,56,.19),inset 0 1px 0 rgba(255,255,255,.95);text-align:left;user-select:none;cursor:pointer;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:box-shadow .17s ease,border-color .17s ease}
.iv-item:hover{border-color:#76aab0;box-shadow:0 15px 32px rgba(20,48,56,.22)}
.iv-item small{font-size:11px;font-weight:800;color:#486571;line-height:1.17;overflow-wrap:anywhere}
.iv-item strong{font-variant-numeric:tabular-nums;font-size:21px;font-weight:900;line-height:1.1;color:#133944;overflow-wrap:anywhere}
.iv-item .iv-glyph{display:flex;align-items:center;gap:8px;font-size:20px;line-height:1}
.iv-glyph svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.iv-item.iv-small{width:102px;min-height:61px;padding:7px 9px}
.iv-item.iv-small strong{font-size:16px}
.iv-item.iv-medium{width:148px}
.iv-item.iv-large{width:208px;min-height:92px}
.iv-item.iv-large strong{font-size:27px}
.iv-item.iv-on{border-color:#6fba5b;background:rgba(236,255,230,.94)}
.iv-item.iv-on strong,.iv-item.iv-on .iv-glyph{color:#246f36}
.iv-item.iv-off{border-color:#cbced2;background:rgba(248,250,252,.94)}
.iv-item.iv-off strong,.iv-item.iv-off .iv-glyph{color:#4b6472}
.iv-item.iv-unknown{border-style:dashed;opacity:.88}
.iv-item.iv-selected{outline:3px solid #9bce67;outline-offset:2px}
.iv-item.iv-label{background:rgba(255,255,255,.80);border:1px solid #c2d5da;text-align:center}
.iv-item.iv-label strong{font-size:16px}
.iv-bottom{position:relative;bottom:auto;z-index:1;margin-top:14px;display:flex;gap:9px;flex-wrap:wrap;align-items:center;justify-content:center;padding:12px;border:1px solid #436474;border-radius:19px;background:linear-gradient(135deg,rgba(18,38,50,.97),rgba(24,55,65,.97));box-shadow:0 19px 48px #0005}
.iv-bottom button{padding:12px 17px;font-weight:850;border:1px solid #52727b;background:#234654;color:#f3fcfd}
.iv-bottom #ivStop{background:linear-gradient(160deg,#bb433a,#8e2927);border-color:#da7770;color:#fff}
.iv-bottom button:disabled{opacity:.48;cursor:not-allowed}
.iv-bottom button:hover:not(:disabled),.iv-head button:hover:not(:disabled),.iv-toolbar button:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-1px)}
.iv-bottom button:active:not(:disabled){transform:translateY(1px)}
.iv-prompt{border:1px solid #627b84;border-radius:20px;background:#132935;color:#eef6f6;max-width:min(540px,calc(100vw - 25px));width:100%;padding:21px;box-sizing:border-box}
.iv-prompt::backdrop{background:rgba(5,19,25,.72)}
.iv-prompt h2{font-size:21px;margin:0 0 13px}
.iv-prompt p{color:#bfd0d2;line-height:1.45}
.iv-prompt label{display:flex;flex-direction:column;gap:4px;margin:10px 0;font-size:13px;font-weight:700;color:#e1eeee}
.iv-prompt input,.iv-prompt select{width:100%;min-height:40px;padding:9px 11px;border-radius:9px;background:#f8fbfb;color:#1e3c45;border:1px solid #a1bdc4;box-sizing:border-box;font-size:15px}
.iv-prompt .iv-check{display:flex;flex-direction:row;align-items:center;gap:10px}
.iv-prompt input[type=checkbox]{min-height:auto;width:22px;height:22px}
.iv-dialog-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:20px}
.iv-dialog-actions button{border-radius:10px;padding:11px 17px;font-weight:800;border:1px solid #7d9a9f;background:#204554;color:#eef6f6}
.iv-dialog-actions button.primary{background:#8dca50;color:#153719;border-color:#8dca50}
.iv-dialog-actions button.iv-delete{background:#5b2932;color:#fff;border-color:#86565b;margin-right:auto}
.iv-subhint{font-size:12px;color:#9cbbc1}
@media(max-width:760px){.iv-stage{min-width:720px}.iv-bottom{justify-content:space-between;gap:6px;padding:8px}.iv-bottom button{flex:1 1 27%;font-size:12px;padding:11px 7px}.iv-head{align-items:flex-start}.iv-head-buttons{width:100%}.iv-head-buttons button{flex:1 1 auto}.iv-toolbar{padding:10px}.iv-hint{font-size:12px}.iv-prompt{padding:15px}.iv-stage .iv-item{backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){#v-installation *{transition:none!important;scroll-behavior:auto!important}}

#ivStage .iv-item{border-radius:12px;background:linear-gradient(135deg,#192d3af5,#0a1724ed);border:1px solid #6591a0;color:#ecfaff;box-shadow:0 5px 14px #03121c70}
#ivStage .iv-glyph{display:inline-grid;place-items:center;color:#9cddea;background:#122d3a;border-radius:9px;padding:3px}
#ivStage .iv-glyph svg{width:24px;height:24px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none}
#ivStage .iv-item.iv-on{border-color:#6be3b3;box-shadow:inset 3px 0 #6be3b3,0 0 13px #59eab329}
#ivStage .iv-item.iv-on .iv-glyph{color:#74f2bd}
#ivStage .iv-item.iv-unknown .iv-glyph{color:#99a9b6}
#ivStage .iv-item[data-instrument^="temp:"] .iv-glyph{color:#64caff}
#ivStage .iv-item.iv-on[data-instrument="power"] .iv-glyph{color:#ffae68}
@media(prefers-reduced-motion:no-preference){
 .iv-on[data-instrument="fan"] .iv-glyph svg{animation:pamelSpin 2.4s linear infinite}
 .iv-on:is([data-instrument="power"],[data-instrument="smoke"]) .iv-glyph svg{animation:pamelGlow 1.8s ease-in-out infinite alternate}
}
@keyframes pamelSpin{to{transform:rotate(360deg)}}@keyframes pamelGlow{to{opacity:.62;transform:translateY(-2px);filter:drop-shadow(0 0 3px currentColor)}}

#ivStage{background:#091721}
#ivStage:not(.iv-custom-photo)>img.iv-photo{inset:0;width:100%;height:100%;object-fit:cover}
#ivStage .iv-item small{color:#c6dce5}
#ivStage .iv-item strong{color:#f1faff}
#ivStage .iv-item.iv-on strong{color:#86f4c7}
#ivStage .iv-item.iv-off strong{color:#bed0d9}
#ivStage .iv-glyph{align-self:flex-start}
