/* v0.7.9 — APARATURA PRO 2.0
   Spójna fikcyjna rodzina aparatów modułowych do symulatora. */

.mount-grid .mounted-device>.device{
  background:
    linear-gradient(90deg,#a8ada9 0%,#d9dcd8 3%,#f9faf7 8%,#fff 48%,#f2f3ef 91%,#b4bab6 97%,#858c88 100%)!important;
  border:1px solid #5e6562!important;
  border-radius:2px!important;
  box-shadow:
    inset 1px 0 #fff,
    inset -1px 0 #6e757180,
    inset 0 1px #fff,
    0 3px 6px #0005!important;
  overflow:hidden!important;
}

/* jedna linia wzornicza producenta PRO */
.mount-grid .mounted-device .brand-strip{
  left:4px!important;
  right:4px!important;
  top:38px!important;
  height:18px!important;
  padding:0 4px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  background:linear-gradient(#fafbf8,#e5e8e4)!important;
  color:#1e2628!important;
  border:1px solid #b8bfbb!important;
  border-top:3px solid #2a98c7!important;
  font:bold 7px Arial!important;
  letter-spacing:.45px!important;
  text-shadow:0 1px #fff!important;
  box-shadow:inset 0 1px #fff!important;
}
.mount-grid .mounted-device .brand-strip:after{
  content:'P-SERIES';
  margin-left:auto;
  color:#6d7779;
  font:bold 4px Arial;
  letter-spacing:.35px;
}

/* akcent funkcjonalny, branding pozostaje ten sam */
.mounted-device[data-code^="FR"] .brand-strip{border-top-color:#d34a40!important}
.mounted-device[data-code^="RCD"] .brand-strip,
.mounted-device[data-code^="RCBO"] .brand-strip{border-top-color:#298fc5!important}
.mounted-device[data-code^="SPD"] .brand-strip{border-top-color:#df922b!important}
.mounted-device[data-code^="B"] .brand-strip,
.mounted-device[data-code^="C"] .brand-strip{border-top-color:#424a48!important}

/* nadruki frontowe */
.mount-grid .mounted-device .device-type{
  margin-top:20px!important;
  font-size:16px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:-.15px!important;
  color:#111718!important;
}
.mount-grid .mounted-device .device-rating{
  margin-top:3px!important;
  color:#202729!important;
  font-size:10px!important;
  font-weight:900!important;
}
.mount-grid .mounted-device .device-meta{
  margin-top:3px!important;
  color:#566063!important;
  font:bold 5.2px Arial!important;
  letter-spacing:.04px!important;
}
.mount-grid .mounted-device .device-function{
  left:4px!important;
  right:4px!important;
  bottom:34px!important;
  min-height:16px!important;
  padding:3px 2px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#f1f3ef!important;
  border-top:1px solid #bec5c1!important;
  border-bottom:1px solid #bec5c1!important;
  color:#465052!important;
  font:bold 4.7px Arial!important;
  letter-spacing:.12px!important;
}

/* numeracja i zaciski śrubowe */
.mount-grid .mounted-device .device-topterm,
.mount-grid .mounted-device .device-bottomterm{
  left:4px!important;
  right:4px!important;
  height:27px!important;
  background:linear-gradient(#f5f6f3,#d6dad6 50%,#a9afab)!important;
  border:1px solid #747c78!important;
  box-shadow:inset 0 2px #fff,inset 0 -2px #6b736f55!important;
}
.mount-grid .mounted-device .device-topterm{top:5px!important}
.mount-grid .mounted-device .device-bottomterm{bottom:5px!important}
.mount-grid .mounted-device .device-topterm .wire-terminal,
.mount-grid .mounted-device .device-bottomterm .wire-terminal{
  background:
    radial-gradient(circle at 48% 47%,#343b39 0 18%,#8d9692 20% 29%,#d9ddda 31% 52%,#606865 55% 100%)!important;
  border-color:#535b58!important;
  box-shadow:inset 0 0 0 2px #b8bfbb,0 1px 2px #0005!important;
}

/* delikatny nadruk normy/serii */
.mount-grid .mounted-device>.device:after{
  position:absolute!important;
  left:5px!important;
  right:5px!important;
  top:61px!important;
  color:#667173!important;
  font:bold 4px Arial!important;
  letter-spacing:.08px!important;
  text-align:center!important;
  pointer-events:none!important;
}
.mounted-device[data-code^="B"]>.device:after,
.mounted-device[data-code^="C"]>.device:after{content:'PRO • IEC 60898-1'!important}
.mounted-device[data-code^="RCD"]>.device:after{content:'PRO • RCCB • TYPE A'!important}
.mounted-device[data-code^="RCBO"]>.device:after{content:'PRO • RCBO • TYPE A'!important}
.mounted-device[data-code^="FR"]>.device:after{content:'PRO • MAIN ISOLATOR'!important}
.mounted-device[data-code^="SPD"]>.device:after{content:'PRO • SPD • TYPE 2'!important}

/* podział szerokich aparatów na fizyczne moduły */
.mounted-device[data-modules="2"]>.device{
  background-image:
    linear-gradient(90deg,transparent calc(50% - .5px),#8e969244 calc(50% - .5px) calc(50% + .5px),transparent calc(50% + .5px)),
    linear-gradient(90deg,#a8ada9 0%,#e7e9e5 4%,#fff 10%,#f4f5f1 89%,#9ca39f 100%)!important;
}
.mounted-device[data-modules="3"]>.device{
  background-image:
    linear-gradient(90deg,transparent 32.8%,#8e969244 33.1%,transparent 33.4%,transparent 66.1%,#8e969244 66.4%,transparent 66.7%),
    linear-gradient(90deg,#a8ada9 0%,#e7e9e5 4%,#fff 10%,#f4f5f1 89%,#9ca39f 100%)!important;
}
.mounted-device[data-modules="4"]>.device{
  background-image:
    linear-gradient(90deg,transparent 24.7%,#8e969244 25%,transparent 25.3%,transparent 49.7%,#8e969244 50%,transparent 50.3%,transparent 74.7%,#8e969244 75%,transparent 75.3%),
    linear-gradient(90deg,#a8ada9 0%,#e7e9e5 3%,#fff 8%,#f4f5f1 91%,#9ca39f 100%)!important;
}

/* dźwignie — nadal wysoko, zgodnie z poprawką v0.7.8 */
.mount-grid .mounted-device .lever{
  left:50%!important;
  top:94px!important;
  height:34px!important;
  transform:translateX(-50%)!important;
  border:1px solid #0c0f0e!important;
  border-radius:2px!important;
  box-shadow:inset 0 3px 2px #ffffff2e,inset 0 -4px 4px #0008,0 2px 3px #0005!important;
}
.mount-grid .mounted-device.switch-off .lever{
  transform:translateX(-50%) translateY(6px)!important;
}
.mounted-device[data-modules="1"] .lever{width:28px!important}
.mounted-device[data-modules="2"] .lever{width:57px!important}
.mounted-device[data-modules="3"] .lever{width:86px!important}
.mounted-device[data-modules="4"] .lever{width:116px!important}

/* MCB — czarna dźwignia */
.mounted-device[data-code^="B"] .lever,
.mounted-device[data-code^="C"] .lever{
  background:
    linear-gradient(90deg,#101313 0,#353a38 18%,#626865 46%,#202423 54%,#454a47 82%,#101313 100%)!important;
}
/* FR — czerwony uchwyt */
.mounted-device[data-code^="FR"] .lever{
  background:linear-gradient(#e55349 0%,#be332c 44%,#7e1713 52%,#ce3d34 59%,#8b1915 100%)!important;
}
/* RCD — niebieski uchwyt, także 4P */
.mounted-device[data-code^="RCD"] .lever{
  background:
    linear-gradient(90deg,#0c4e77 0,#2b94ca 18%,#46a9d6 46%,#0a507b 54%,#2788bd 82%,#0a4569 100%)!important;
}
/* RCBO — ciemny uchwyt z niebieskim znacznikiem */
.mounted-device[data-code^="RCBO"] .lever{
  background:
    linear-gradient(90deg,#111515 0 43%,#298fc5 44% 56%,#111515 57% 100%)!important;
}

.mount-grid .mounted-device .lever span{
  color:#252c2d!important;
  font:bold 7px Arial!important;
  text-shadow:0 1px #fff!important;
}
.mount-grid .mounted-device .lever span:first-child{top:-10px!important}
.mount-grid .mounted-device .lever span:last-child{bottom:-10px!important}

/* TEST dla RCD/RCBO */
.mounted-device[data-code^="RCD"] .test-btn,
.mounted-device[data-code^="RCBO"] .test-btn{
  top:76px!important;
  right:7px!important;
  width:18px!important;
  height:18px!important;
  border:1px solid #666f6b!important;
  border-radius:3px!important;
  background:linear-gradient(#f3f4f1,#cfd4d0)!important;
  color:#17465c!important;
  font:bold 8px Arial!important;
  box-shadow:inset 0 1px #fff,0 1px 2px #0004!important;
}
.mounted-device[data-code^="RCBO"] .test-btn.yellow{
  background:linear-gradient(#f1cf63,#d3a72d)!important;
  color:#493604!important;
}

/* 4P RCD — większa strefa testu i wspólny uchwyt */
.mounted-device[data-code="RCD4"] .test-btn{
  right:10px!important;
}
.mounted-device[data-code="RCD4"] .device-type{
  font-size:18px!important;
}

/* SPD 1P+N / 3P+N — status kaset zamiast dźwigni */
.mounted-device[data-code^="SPD"] .spd-window{
  top:94px!important;
  height:23px!important;
  border:1px solid #5d6562!important;
  border-radius:2px!important;
  box-shadow:inset 0 1px #ffffff77,0 1px 2px #0004!important;
}
.mounted-device[data-code="SPD"] .spd-window{
  width:30px!important;
  background:linear-gradient(#39a159 0 67%,#dce0dc 68% 100%)!important;
}
.mounted-device[data-code="SPD4"] .spd-window{
  width:112px!important;
  background:
    repeating-linear-gradient(90deg,
      #39a159 0 23px,
      #d7dcd8 23px 27px
    )!important;
}
.mounted-device[data-code="SPD4"] .spd-window:after{
  content:'L1   L2   L3   N';
  position:absolute;
  left:3px;right:3px;bottom:2px;
  color:#294a34;
  font:bold 4px Arial;
  text-align:center;
  word-spacing:9px;
}

/* wskaźnik stanu nie koliduje z dźwignią */
.switch-state-badge{
  top:70px!important;
  right:6px!important;
  width:8px!important;
  height:8px!important;
  min-width:8px!important;
}

/* miniatury katalogu PRO 2.0 */
.catalog-card .mini-device{
  background:linear-gradient(90deg,#b4b9b5,#fafbf8 12%,#fff 50%,#e4e7e3 88%,#9ea5a1)!important;
  border-color:#6c7471!important;
  box-shadow:inset 1px 0 #fff,0 2px 3px #0003!important;
}
.catalog-card .mini-device:before{
  content:'PRO'!important;
  background:linear-gradient(#fafbf8,#e1e5e1)!important;
  color:#232a2c!important;
  border-top:2px solid #2a98c7!important;
  border-bottom:1px solid #b2b9b5!important;
}
.catalog-card[data-part^="FR"] .mini-device:before{border-top-color:#d34a40!important}
.catalog-card[data-part^="RCD"] .mini-device:before,
.catalog-card[data-part^="RCBO"] .mini-device:before{border-top-color:#298fc5!important}
.catalog-card[data-part^="SPD"] .mini-device:before{border-top-color:#df922b!important}

.mini-4p{width:72px!important}
.catalog-card[data-part="RCD4"] .mini-device i{
  width:52px!important;
  background:linear-gradient(#2d96cd,#0b527c)!important;
}
.catalog-card[data-part="SPD4"] .mini-device i{
  width:54px!important;
  background:
    repeating-linear-gradient(90deg,#3ba158 0 11px,#d4d9d5 11px 14px)!important;
}
.mini-rcbo i,
.catalog-card[data-part^="RCBO"] .mini-device i{
  background:linear-gradient(90deg,#171a1a 0 43%,#2b92c5 44% 56%,#171a1a 57% 100%)!important;
}

/* 4P czytelność zacisków */
.mounted-device[data-code="RCD4"] .wire-terminal,
.mounted-device[data-code="SPD4"] .wire-terminal{
  width:14px!important;
  height:14px!important;
  min-width:14px!important;
  font-size:4.7px!important;
}
