/* STEP viewer and STEP to STL converter (step.js). Shared tool styles are in tools.css. */

/* tools.css gives .tool-btn and .tool-bar a display value, which beats the hidden attribute. */
#tool .tool-btn[hidden],#tool .tool-bar[hidden],#tool .step-noview[hidden]{display:none}

/* Stage: drop zone, progress card, Reset view, and the no-WebGL message */
.step-drop{z-index:1}
.step-drop .step-icon{color:var(--blue);width:32px;height:32px;margin:0 auto 2px}
.step-drop .step-pick{margin:6px auto 0}
.step-private{font-size:13px;color:var(--gray)}
/* Reset view floats on the stage (chip material in tools.css), like the mesh tools' one. */
.step-reset{position:absolute;top:12px;right:12px;z-index:1;padding:0 14px;font-size:13.5px}
.step-noview{position:absolute;inset:0;display:grid;place-items:center;padding:24px;text-align:center;font-size:14.5px;color:var(--gray)}

/* Progress without a known total: a sliding bar */
.step-indeterminate i>span{width:30%!important;animation:step-slide 1.2s var(--ease-in-out) infinite}
@keyframes step-slide{from{transform:translateX(-100%)}to{transform:translateX(340%)}}

/* Readout cells come from tools.css (.tool-stats > div with dt above dd). */
.step-stats dd{overflow-wrap:anywhere}
.step-stats-bar{padding-bottom:4px;transition:opacity 240ms var(--ease-out)}
@starting-style{.step-stats-bar{opacity:0}}

/* The viewer page has nothing to download until a part is open, so its actions bar waits for one. */
#tool[data-mode=view] .step-actions:has(.step-download[disabled]){display:none}
.step-detail{display:inline-flex;align-items:center;gap:10px;margin-right:auto}
.step-notice{color:var(--fg)}

@media (max-width:560px){
  .step-detail{flex:1 1 100%;margin-right:0}
  .step-detail select{flex:1}
  .step-stats>div:nth-child(2){grid-column:1/-1} /* the size, after the file name */
}
@media (prefers-reduced-motion:reduce){.step-indeterminate i>span{animation:none;width:100%!important;opacity:.5}}
