/* ExtruQ G-code layer viewer, responsive and read-only. */
.eq-gcode-dialog{
 width:min(1280px,calc(100vw - 24px))!important;max-width:1280px;
 max-height:min(96dvh,1030px)!important;
}
.eq-gcode-shell{padding:20px!important;max-height:93dvh;overflow:auto;overscroll-behavior:contain;}
.eq-gcode-head{display:flex;justify-content:space-between;gap:16px;align-items:start;}
.eq-gcode-head h2{margin:4px 0 3px;font-size:21px;overflow-wrap:anywhere;}
.eq-gcode-x{min-width:38px;min-height:38px;font-size:24px;flex:none;}
.eq-gcode-stats{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 14px;}
.eq-gcode-stats span{background:var(--nav);color:var(--text);
 border:1px solid var(--line);padding:7px 11px;border-radius:10px;
 font-size:12px;font-weight:660;}
.eq-gcode-nav{display:grid;grid-template-columns:auto 38px minmax(90px,1fr) 38px auto;
 align-items:center;gap:9px;margin:0 0 10px;}
.eq-gcode-nav button{min-height:41px;padding:9px 11px;font-weight:720;}
.eq-gcode-nav input{width:100%;accent-color:var(--accent);cursor:pointer;}
.eq-gcode-all{background:var(--nav);border:1px solid var(--line);
 color:var(--text);border-radius:9px;padding:9px 12px;}
.eq-gcode-all.is-selected{background:var(--accent);color:#fff;}
.eq-gcode-number{font-size:12px;min-width:135px;font-weight:750;text-align:right;white-space:nowrap;}
.eq-gcode-body{display:grid;grid-template-columns:minmax(0,1fr) 298px;gap:14px;min-height:480px;}
.eq-gcode-pane{position:relative;min-width:0;min-height:485px;overflow:hidden;
 border:1px solid #324456;background:#101b26;border-radius:14px;}
.eq-gcode-pane canvas{width:100%;height:485px;min-height:485px;display:block;cursor:grab;touch-action:pan-y;}
.eq-gcode-pane canvas:active{cursor:grabbing;}
.eq-gcode-pane-top{position:absolute;top:10px;left:11px;right:11px;
 pointer-events:none;display:flex;gap:8px;justify-content:space-between;align-items:center;}
.eq-gcode-pane-top span{font-size:10px;font-weight:800;letter-spacing:.1em;color:#c1d8e6;
 background:#182d3dbd;padding:7px;border-radius:8px;}
.eq-gcode-pane-top button{pointer-events:auto;background:#263e4f!important;
 border:1px solid #53758b!important;color:#fff!important;min-height:34px;padding:6px 12px;}
.eq-gcode-help{position:absolute;bottom:9px;left:12px;right:12px;color:#9baebe;
 pointer-events:none;font-size:11px;text-align:center;text-shadow:0 1px 3px #000;}
.eq-gcode-options{border:1px solid var(--line);border-radius:13px;background:var(--nav);
 padding:14px;min-width:0;display:flex;flex-direction:column;gap:10px;max-height:540px;overflow-y:auto;}
.eq-gcode-options h3{font-size:13px;margin:4px 0 2px;font-weight:800;}
.eq-gcode-option{display:flex;gap:9px;align-items:center;font-size:12px;line-height:1.3;
 cursor:pointer;color:var(--text);}
.eq-gcode-option input{accent-color:var(--accent);width:17px;height:17px;flex:none;}
.eq-gcode-legend{display:grid;gap:7px;margin:0 0 7px;}
.eq-gcode-legend-item{display:flex;align-items:center;gap:9px;font-size:11px;color:var(--text);}
.eq-gcode-legend-item i{display:inline-block;width:14px;height:10px;border-radius:4px;flex:none;}
.eq-gcode-details{font-size:12px;color:var(--muted);line-height:1.5;margin-top:auto;}
.eq-gcode-message{font-size:12px;min-height:18px;margin:12px 0 2px;color:var(--muted);}
.eq-gcode-message.is-error{color:#e46b75;font-weight:650;}
.eq-gcode-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;
 margin-top:11px;border-top:1px solid var(--line);padding-top:11px;}
.eq-gcode-footer small{font-size:11px;color:var(--muted);}
.eq-gcode-footer button{min-height:41px;padding:8px 17px;}
.fs-unpublished-section{margin-top:19px;border-top:1px solid var(--line);padding-top:16px;}
.fs-unpublished-section .fs-file-heading{margin-bottom:7px;}
.fs-unpublished-intro{font-size:12px;color:var(--muted);margin:5px 0 12px;line-height:1.5;}
.fs-file-ops .eq-gcode-view-button{border:1px solid var(--accent)!important;
 background:var(--soft)!important;color:var(--text)!important;font-weight:780;}
.fs-unpublished-card{border-style:dashed!important;}
@media(max-width:810px){
 .eq-gcode-dialog{width:calc(100vw - 12px)!important;max-height:96dvh!important;}
 .eq-gcode-shell{padding:13px!important;max-height:94dvh;}
 .eq-gcode-body{grid-template-columns:1fr;min-height:auto;}
 .eq-gcode-pane,.eq-gcode-pane canvas{min-height:355px;height:400px;}
 .eq-gcode-options{display:flex;flex-direction:column;max-height:none;gap:10px;padding:12px;}
 .eq-gcode-options h3{margin:5px 0;}
 .eq-gcode-legend{grid-template-columns:repeat(2,minmax(0,1fr));}
 .eq-gcode-details{margin-top:0;}
 .eq-gcode-nav{grid-template-columns:auto 30px minmax(60px,1fr) 30px;gap:5px;}
 .eq-gcode-nav button{min-width:0;padding:8px 6px;}
 .eq-gcode-number{grid-column:1/-1;text-align:left;min-width:0;}
 .eq-gcode-footer{align-items:stretch;flex-direction:column;}
 .eq-gcode-footer button{width:100%;}
}


/* Scroll safety: the 3D canvas NEVER captures wheel/touch before activation. */
.eq-gcode-pane.is-locked canvas{pointer-events:none!important;touch-action:pan-y!important;cursor:default;}
.eq-gcode-activation{
 position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;
 align-items:center;justify-content:center;gap:11px;pointer-events:none;
 background:linear-gradient(180deg,transparent 5%,rgba(13,27,40,.12) 35%,rgba(13,27,40,.12) 65%,transparent 95%);
}
.eq-gcode-activation button{
 pointer-events:auto!important;background:#126F91!important;
 color:#fff!important;border:1px solid #75CFE9!important;border-radius:12px;
 padding:13px 21px;min-height:52px;font-size:15px;font-weight:800;
 box-shadow:0 9px 30px #050d15a0;
}
.eq-gcode-activation small{
 color:#f6fafb;font-size:12px;max-width:240px;text-align:center;
 text-shadow:0 1px 8px #061222;
}
.eq-gcode-pane:not(.is-locked) .eq-gcode-activation{display:none;}
.eq-gcode-pane:not(.is-locked) canvas{pointer-events:auto;touch-action:none!important;}
.eq-gcode-pane-top{z-index:4;}
.eq-gcode-pane-top #eqGcodeLock{background:#126F91!important;}
.eq-gcode-option-title{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:750;}
.eq-gcode-option-title select{
 min-height:40px;padding:7px 9px;border-radius:10px;max-width:100%;
 color:var(--text);background:var(--input);border:1px solid var(--line);
}
.eq-gcode-color-hint{font-size:11px;line-height:1.5;color:var(--muted);margin:0;}
.eq-gcode-slot-colors{display:grid;gap:9px;}
.eq-gcode-tool-row{display:grid;gap:7px;border:1px solid var(--line);
 background:var(--card);border-radius:12px;padding:10px;}
.eq-gcode-tool-head{display:flex;align-items:center;justify-content:space-between;font-size:13px;}
.eq-gcode-tool-controls{display:grid;grid-template-columns:minmax(0,1fr) 44px 37px;gap:6px;align-items:center;}
.eq-gcode-tool-controls select{min-width:0;width:100%;min-height:40px;max-width:100%;
 border:1px solid var(--line);border-radius:9px;background:var(--input);
 color:var(--text);padding:7px 8px;font-size:11px;}
.eq-gcode-tool-controls input[type=color]{width:44px;min-height:40px;padding:2px;
 border:1px solid var(--line);background:transparent;border-radius:9px;cursor:pointer;}
.eq-gcode-tool-controls button{padding:6px;min-height:40px;font-size:20px;}
.eq-gcode-save,.eq-gcode-reset{width:100%;min-height:42px;font-size:12px;font-weight:750;}
.eq-gcode-save{background:var(--accent);color:#fff!important;border-radius:9px;}
.eq-gcode-reset{padding:9px;}
@media(max-width:810px){
 .eq-gcode-pane{min-height:400px;}
 .eq-gcode-option-title select{max-width:100%;}
 .eq-gcode-help{font-size:10px;}
}

/* Exact Orca G-code viewer controls, 2026-11-21. */
.eq-gcode-step-nav{
  display:grid;grid-template-columns:auto minmax(90px,1fr) minmax(200px,1.4fr);
  align-items:center;gap:10px;border-top:1px solid var(--line);
  padding:11px 0 13px;margin-top:3px;
}
.eq-gcode-step-nav strong{font-size:12px;font-weight:800;white-space:nowrap;}
.eq-gcode-step-nav input[type=range]{width:100%;accent-color:var(--accent);cursor:pointer;}
.eq-gcode-step-nav input:disabled{opacity:.4;cursor:default;}
.eq-gcode-step-info{font-size:11px;color:var(--muted);min-width:0;line-height:1.35;}
.eq-gcode-view-presets{
 position:absolute;top:57px;left:11px;right:11px;z-index:4;
 display:flex;gap:5px;flex-wrap:wrap;pointer-events:none;
}
.eq-gcode-view-presets button{
 pointer-events:auto;min-height:31px;padding:5px 8px;
 color:#e2ecf5!important;background:#20374Cdd!important;
 border:1px solid #46627C!important;border-radius:9px;font-size:11px;font-weight:750;
}
.eq-gcode-view-presets button:hover{background:#315772!important;}
.eq-gcode-feature-filters{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:6px;margin-top:0;
}
.eq-gcode-feature-option{
 display:flex;align-items:center;gap:5px;min-width:0;font-size:10.5px;
 color:var(--text);cursor:pointer;
}
.eq-gcode-feature-option input{width:14px;height:14px;flex:none;accent-color:var(--accent);}
.eq-gcode-feature-option i{flex:none;width:9px;height:9px;border-radius:50%;}
.eq-gcode-feature-option span{overflow-wrap:anywhere;}
.eq-gcode-nav{grid-template-columns:auto 38px minmax(85px,1fr) 38px auto;}
.eq-gcode-options{max-height:550px;}
@media(max-width:810px){
 .eq-gcode-step-nav{grid-template-columns:1fr minmax(100px,2fr);gap:5px 10px;}
 .eq-gcode-step-info{grid-column:1/-1;}
 .eq-gcode-view-presets{top:51px;gap:4px;}
 .eq-gcode-view-presets button{font-size:10px;padding:5px 7px;}
 .eq-gcode-feature-filters{grid-template-columns:repeat(2,minmax(0,1fr));}
}

.eq-gcode-step-nav{grid-template-columns:auto minmax(90px,1fr) minmax(155px,1.2fr) auto;}
.eq-gcode-source-button{min-height:36px;padding:7px 10px;font-size:11px;white-space:nowrap;}
.eq-gcode-source{
 margin:0 0 13px;border:1px solid var(--line);border-radius:12px;
 background:#112032;color:#b7dbeb;font:11px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;
 max-height:180px;overflow:auto;padding:9px 12px;white-space:pre;
}
.eq-gcode-source[hidden]{display:none!important;}
.eq-gcode-source-current{
 background:#144A65;color:#fff;font-weight:700;
 border-left:3px solid #69E2D0;padding-left:5px;margin-left:-8px;
}
.eq-gcode-option-title select{background:var(--input);color:var(--text);}
@media(max-width:810px){
 .eq-gcode-step-nav{grid-template-columns:1fr minmax(95px,2fr) auto;}
 .eq-gcode-step-info{grid-column:1/-1;}
 .eq-gcode-source{max-height:140px;}
}

/* ExtruQ G-code preview v7 – direct layer navigation and refined controls. */
.eq-gcode-nav{
  grid-template-columns:auto auto 38px minmax(100px,1fr) 38px auto minmax(104px,max-content)!important;
  gap:9px;
  align-items:center;
  padding:6px 0 9px;
}
.eq-gcode-nav-title{
  font-size:12px;font-weight:800;color:var(--muted);white-space:nowrap;
  letter-spacing:.025em;
}
.eq-gcode-layer-field{
  display:flex;align-items:center;gap:6px;min-width:0;
  color:var(--text);font-weight:700;font-size:11px;white-space:nowrap;
  padding:5px 7px 5px 10px;border:1px solid var(--line);border-radius:11px;
  background:var(--nav);
}
.eq-gcode-layer-field input{
  appearance:textfield;-moz-appearance:textfield;
  width:62px;min-width:48px;max-width:76px;height:32px;
  border:1px solid var(--line);border-radius:8px;
  text-align:center;background:var(--input);color:var(--text);
  font:800 14px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;
}
.eq-gcode-layer-field input::-webkit-inner-spin-button,
.eq-gcode-layer-field input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}
.eq-gcode-layer-field input:focus-visible{
  outline:2px solid #26cdb9;outline-offset:2px;
}
.eq-gcode-layer-total{color:var(--muted);font-size:11px;font-weight:650;}
.eq-gcode-number{
  min-width:110px;text-align:right;white-space:nowrap;
  color:var(--muted);font-size:12px;letter-spacing:.005em;
}
.eq-gcode-nav input[type=range],
.eq-gcode-step-nav input[type=range]{
  appearance:none;-webkit-appearance:none;min-height:32px;height:32px;
  background:transparent;border:0;padding:0;cursor:pointer;outline-offset:3px;
}
.eq-gcode-nav input[type=range]::-webkit-slider-runnable-track,
.eq-gcode-step-nav input[type=range]::-webkit-slider-runnable-track{
  height:8px;border-radius:20px;border:1px solid #486279;
  background:linear-gradient(90deg,#21cbb9 0%,#35dbc6 var(--eq-pct,100%),
    #284255 var(--eq-pct,100%),#284255 100%);
}
.eq-gcode-nav input[type=range]::-webkit-slider-thumb,
.eq-gcode-step-nav input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;
  width:19px;height:19px;border-radius:50%;margin-top:-6px;
  border:3px solid #f8fcff;background:#147989;
  box-shadow:0 0 0 2px #164657,0 2px 5px #071a27a8;
}
.eq-gcode-nav input[type=range]::-moz-range-track,
.eq-gcode-step-nav input[type=range]::-moz-range-track{
  height:8px;border-radius:20px;background:linear-gradient(90deg,
  #21cbb9 0%,#35dbc6 var(--eq-pct,100%),#284255 var(--eq-pct,100%));
}
.eq-gcode-nav input[type=range]::-moz-range-thumb,
.eq-gcode-step-nav input[type=range]::-moz-range-thumb{
  width:14px;height:14px;border-radius:50%;border:3px solid #fff;background:#147989;
}
.eq-gcode-nav input[type=range]:focus-visible,
.eq-gcode-step-nav input[type=range]:focus-visible{
  outline:2px solid #36dbc6;border-radius:20px;
}
.eq-gcode-nav button:disabled,.eq-gcode-step-nav button:disabled{opacity:.46;cursor:default;}
.eq-gcode-step-nav{
  grid-template-columns:auto minmax(90px,1fr) auto minmax(140px,1.1fr) auto!important;
  column-gap:10px;row-gap:4px;
}
.eq-gcode-step-nav strong{color:var(--muted);font-size:11px;}
.eq-gcode-quick-solo{
  display:inline-flex;align-items:center;gap:6px;font-size:11px;
  font-weight:750;white-space:nowrap;cursor:pointer;
}
.eq-gcode-quick-solo input{
  width:17px;height:17px;accent-color:#26d5bb;
}
.eq-gcode-step-info{font-size:11px;min-width:0;}
.eq-gcode-pane{
  background:radial-gradient(ellipse 90% 80% at 48% 37%,
    #1b2e42 0%,#142336 50%,#0e1b2b 100%)!important;
  border:1px solid #3b5c74;
}
.eq-gcode-options{border:1px solid var(--line);}
.eq-gcode-view-presets button:focus-visible,
.eq-gcode-nav button:focus-visible{outline:2px solid #29dbc6;outline-offset:2px;}
@media(max-width:1100px){
 .eq-gcode-nav{grid-template-columns:auto auto 36px minmax(80px,1fr) 36px auto!important;}
 .eq-gcode-number{grid-column:1/-1;text-align:right;min-width:0;}
 .eq-gcode-step-nav{grid-template-columns:auto minmax(90px,1fr) auto!important;}
 .eq-gcode-step-info{grid-column:1/-2;}
 .eq-gcode-source-button{grid-column:3;grid-row:2;}
}
@media(max-width:810px){
 .eq-gcode-nav{grid-template-columns:auto auto 34px minmax(80px,1fr) 34px!important;}
 .eq-gcode-nav-title{grid-column:1;}
 .eq-gcode-layer-field{grid-column:1/3;grid-row:2;width:max-content;}
 .eq-gcode-number{grid-column:3/-1;grid-row:2;align-self:center;}
 .eq-gcode-step-nav{grid-template-columns:auto minmax(80px,1fr)!important;}
 .eq-gcode-quick-solo{grid-column:1/-1;}
 .eq-gcode-step-info{grid-column:1/-1;}
 .eq-gcode-source-button{grid-column:1/-1;grid-row:auto;justify-self:start;}
}
