/* RozdzielnicaPRO.pl v0.7.17.3
 * WIĘKSZA ROZDZIELNICA: prawdziwe narzędzia w poziomym doku, bez klonów.
 * Sześć niezależnych przycisków +/−. Brak zmian geometrii elektrycznej. */

/* Przyciski sekcji: poza aktualizowanym tekstem nagłówka zadania. */
html[data-theme="dark"] body .game-shell .pro-fold-section{position:relative}
html[data-theme="dark"] body .game-shell .pro-fold-section>.panel-title{
  padding-right:48px!important;
}
html[data-theme="dark"] body .game-shell .pro-fold-toggle{
  display:inline-flex!important;align-items:center;justify-content:center;
  width:29px;min-width:29px;height:29px;
  padding:0!important;border:1px solid #4c7ca0!important;
  border-radius:7px!important;background:#173a56!important;
  color:#bfe5ff!important;font:bold 21px/1 Arial,sans-serif!important;
  cursor:pointer;transition:background .15s,border-color .15s;
}
html[data-theme="dark"] body .game-shell .pro-fold-toggle:hover{
  background:#23618a!important;border-color:#79c4fd!important;color:#fff!important;
}
html[data-theme="dark"] body .game-shell .pro-fold-toggle:focus-visible{
  outline:2px solid #80d0ff!important;outline-offset:2px!important;
}
html[data-theme="dark"] body .game-shell .pro-fold-toggle-panel{
  position:sticky!important;z-index:5;top:7px;
  float:right!important;margin:-37px 9px 7px 0!important;
}
html[data-theme="dark"] body .game-shell .pro-fold-toggle-inline{
  position:relative!important;flex:0 0 29px!important;
  margin-left:4px!important;
}
html[data-theme="dark"] body .game-shell .player-progress-head>.pro-fold-toggle,
html[data-theme="dark"] body .game-shell .learning-v0712>div:first-child>.pro-fold-toggle{
  margin-left:auto!important;
}
html[data-theme="dark"] body .game-shell .player-progress-head,
html[data-theme="dark"] body .game-shell .learning-v0712>div:first-child{
  display:flex;align-items:center;gap:7px;flex-wrap:wrap;
}
html[data-theme="dark"] body .game-shell .player-progress-head>b,
html[data-theme="dark"] body .game-shell .learning-v0712>div:first-child>b{
  min-width:0;flex:1 1 auto;
}
/* Aktywne zadanie może zostać zwinięte niezależnie od dwóch sekcji postępu. */
html[data-theme="dark"] body .game-shell .active-task.pro-folded>
:is(h2,p,.task-goals,.reward,.task-help-controls,.task-hint-box,.wiring-progress){
  display:none!important;
}
html[data-theme="dark"] body .game-shell .player-progress.pro-folded> :not(.player-progress-head){
  display:none!important;
}
html[data-theme="dark"] body .game-shell .learning-v0712.pro-folded> :not(:first-child){
  display:none!important;
}
/* Panele boczne mogą mieć dołączane dynamicznie dzieci, dlatego
 * ukrywamy DOM przez CSS, nigdy go nie usuwamy. */
html[data-theme="dark"] body .game-shell :is(.cable-panel,.catalog-panel,.details-panel).pro-folded>
:not(.panel-title):not(.pro-fold-toggle){
  display:none!important;
}
html[data-theme="dark"] body .game-shell .pro-folded>.panel-title{
  border-bottom-color:transparent!important;
}

/* Dock nad rozdzielnicą (zachowuje jedyne prawdziwe elementy prawego panelu). */
html[data-theme="dark"] body .game-shell>.workspace>.pro-focus-dock{
  width:100%;max-width:100%;min-width:0;
  box-sizing:border-box;
  flex:0 0 auto!important;
  position:sticky;top:57px;z-index:24;
  background:linear-gradient(120deg,#142a40,#102237)!important;
  border:1px solid #456985;border-radius:10px;
  padding:9px;margin:0 0 8px;
  box-shadow:0 8px 25px #0008;
}
html[data-theme="dark"] body .game-shell>.workspace>.pro-focus-dock[hidden]{
  display:none!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock>.rightbar{
  display:grid!important;
  grid-template-columns:minmax(240px,1.05fr) minmax(335px,1.55fr) minmax(195px,.75fr)!important;
  grid-auto-flow:row!important;
  grid-auto-rows:auto!important;
  align-items:start!important;
  width:100%!important;max-width:100%!important;
  height:auto!important;max-height:none!important;min-height:0!important;
  min-width:0!important;
  overflow:visible!important;
  position:static!important;
  gap:8px!important;
  margin:0!important;padding:0!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock>.rightbar>.panel{
  min-width:0!important;
  height:242px!important;
  max-height:242px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#547a96 #102236;
  margin:0!important;
  background:linear-gradient(160deg,#1b364c,#10263a)!important;
  border:1px solid #456985!important;border-radius:8px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock>.rightbar>.panel:nth-child(n+4){
  grid-column:1/-1;
  height:auto!important;max-height:240px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .panel-title{
  position:sticky;top:0;z-index:2;
  padding-right:46px!important;
  min-height:40px!important;
  padding-top:11px!important;padding-bottom:11px!important;
  background:#1c3952!important;
  font:800 10px/1.3 Inter,"Segoe UI",sans-serif!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .pro-fold-toggle-panel{
  position:sticky!important;
  float:right!important;
  top:5px!important;
  margin:-36px 8px 4px 0!important;
  z-index:5!important;
}
/* Szeroki katalog: FILTRY w jednym wierszu i APARATY przewijane poziomo. */
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .category-tabs{
  grid-template-columns:repeat(5,minmax(70px,1fr))!important;
  display:grid!important;gap:5px!important;
  padding:8px!important;min-width:0!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .category-tabs>button{
  grid-column:auto!important;
  min-width:0!important;
  font-size:9px!important;
  padding:6px 3px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .catalog-grid{
  display:grid!important;
  grid-template-rows:minmax(0,1fr)!important;
  grid-template-columns:none!important;
  grid-auto-flow:column!important;
  grid-auto-columns:minmax(103px,117px)!important;
  max-width:100%;min-width:0;
  overflow-x:auto!important;overflow-y:hidden!important;
  scrollbar-width:thin;scrollbar-color:#527d9c #11273d;
  overscroll-behavior-inline:contain;
  gap:7px!important;padding:5px 8px 8px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .catalog-card{
  width:100%!important;
  min-width:0!important;min-height:112px!important;height:116px!important;
  padding:6px 4px!important;gap:3px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .catalog-card .mini-device{
  transform:scale(.78);transform-origin:center center;
  margin:-5px 0!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .catalog-card>b{
  font-size:9px!important;line-height:1.15!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .catalog-card>small{
  font-size:8px!important;line-height:1.2!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .cable-buttons{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:4px!important;padding:6px 7px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .cable-buttons button{
  min-height:30px!important;padding:5px 1px!important;font-size:9px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .wire-colors{
  gap:5px!important;padding:0 7px 6px!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .wire-colors .wire{
  min-height:37px!important;padding:3px!important;font-size:9px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .wire-colors .wire:before{
  width:13px!important;height:13px!important;flex-basis:13px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .wiring-console{
  margin:0 7px 7px!important;padding:7px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .details-content{
  display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;
  gap:8px!important;padding:10px 8px!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .detail-device{
  width:44px!important;min-width:0!important;
}
html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .details-content #detailName{
  font-size:10px!important;line-height:1.3!important;
}

/* Mostki i grzebienie jeden POD drugim w obu widokach. */
html[data-theme="dark"] body .bridge-console .bridge-mode-grid,
html[data-theme="dark"] body .bridge-console .bridge-actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  gap:7px!important;
}
html[data-theme="dark"] body .bridge-console .bridge-mode-grid>button,
html[data-theme="dark"] body .bridge-console .bridge-actions>button{
  display:block!important;width:100%!important;
  min-height:34px!important;
  padding:8px 10px!important;
  font:800 10px/1.3 Inter,"Segoe UI",sans-serif!important;
  text-align:center!important;
  overflow-wrap:anywhere!important;
  border-radius:7px!important;
}
html[data-theme="dark"] body .bridge-console .bridge-console-head{
  display:flex;align-items:center;gap:8px;
}
html[data-theme="dark"] body .bridge-console .bridge-console-head>b{
  flex:1 1 auto;min-width:0;
  font-size:10px!important;line-height:1.4!important;
}
html[data-theme="dark"] body .bridge-console .bridge-help{
  padding:10px!important;
  font:500 10px/1.5 Inter,"Segoe UI",sans-serif!important;
}

/* Odwracalny focus dla laptopów/tabletów. */
@media(max-width:1100px){
  html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock>.rightbar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock>.rightbar>.details-panel{
    grid-column:1/-1!important;height:110px!important;
  }
  html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .category-tabs{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:720px){
  html[data-theme="dark"] body .game-shell>.workspace>.pro-focus-dock{
    position:relative!important;top:auto!important;
    padding:6px!important;
  }
  html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock>.rightbar{
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock>.rightbar>.panel{
    grid-column:1!important;
    height:auto!important;max-height:240px!important;
  }
  html[data-theme="dark"] body.pro-tools-docked .pro-focus-dock .category-tabs{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html[data-theme="dark"] body .pro-fold-toggle{transition:none!important}
}